40 references to Mcp
Aspire.Dashboard (34)
Components\Dialogs\McpServerDialog.razor.cs (7)
67
if ((DashboardOptions.Value.
Mcp
.PublicUrl ?? DashboardOptions.Value.
Mcp
.EndpointUrl) is { Length: > 0 } mcpUrl)
84
if (DashboardOptions.Value.
Mcp
.AuthMode == McpAuthMode.ApiKey)
86
_mcpConfigProperties.Add(new McpConfigPropertyViewModel { Name = $"{McpApiKeyAuthenticationHandler.McpApiKeyHeaderName} (header)", Value = DashboardOptions.Value.
Mcp
.PrimaryApiKey! });
98
private bool McpEnabled => !DashboardOptions.Value.
Mcp
.Disabled.GetValueOrDefault();
100
private bool IsCliMcpMode => DashboardOptions.Value.
Mcp
.UseCliMcp == true;
109
if (DashboardOptions.Value.
Mcp
.AuthMode == McpAuthMode.ApiKey)
Components\Layout\MainLayout.razor.cs (3)
187
return Options.CurrentValue.
Mcp
.GetEndpointAddress() != null &&
188
Options.CurrentValue.
Mcp
.AuthMode == McpAuthMode.Unsecured &&
189
!Options.CurrentValue.
Mcp
.SuppressUnsecuredMessage;
Components_Dialogs_McpServerDialog_razor.g.cs (4)
697
DashboardOptions.Value.
Mcp
.PrimaryApiKey
760
FluentUIExtensions.GetClipboardCopyAdditionalAttributes(DashboardOptions.Value.
Mcp
.PrimaryApiKey, ControlsStringsLoc[nameof(ControlsStrings.GridValueCopyToClipboard)], ControlsStringsLoc[nameof(ControlsStrings.GridValueCopied)])
1259
DashboardOptions.Value.
Mcp
.PrimaryApiKey
1322
FluentUIExtensions.GetClipboardCopyAdditionalAttributes(DashboardOptions.Value.
Mcp
.PrimaryApiKey, ControlsStringsLoc[nameof(ControlsStrings.GridValueCopyToClipboard)], ControlsStringsLoc[nameof(ControlsStrings.GridValueCopied)])
Components_Layout_MainLayout_razor.g.cs (2)
575
if (Options.CurrentValue.
Mcp
.GetEndpointAddress() != null && !Options.CurrentValue.
Mcp
.Disabled.GetValueOrDefault())
Configuration\PostConfigureDashboardOptions.cs (8)
46
options.
Mcp
.EndpointUrl = mcpUrl;
65
options.
Mcp
.AuthMode = McpAuthMode.Unsecured;
74
options.
Mcp
.AuthMode ??= string.IsNullOrEmpty(options.
Mcp
.PrimaryApiKey) ? McpAuthMode.Unsecured : McpAuthMode.ApiKey;
92
if (string.IsNullOrEmpty(options.
Mcp
.PrimaryApiKey) && !string.IsNullOrEmpty(options.Api.PrimaryApiKey))
95
options.
Mcp
.PrimaryApiKey = options.Api.PrimaryApiKey;
98
if (string.IsNullOrEmpty(options.
Mcp
.SecondaryApiKey) && !string.IsNullOrEmpty(options.Api.SecondaryApiKey))
100
options.
Mcp
.SecondaryApiKey = options.Api.SecondaryApiKey;
Configuration\ValidateDashboardOptions.cs (4)
101
if (!options.
Mcp
.TryParseOptions(out var mcpParseErrorMessage))
115
if (effectiveApiAuthMode is null && options.
Mcp
.AuthMode is not null)
117
effectiveApiAuthMode = options.
Mcp
.AuthMode switch
128
var hasApiKey = !string.IsNullOrEmpty(options.Api.PrimaryApiKey) || !string.IsNullOrEmpty(options.
Mcp
.PrimaryApiKey);
DashboardEndpointsBuilder.cs (1)
98
if (!dashboardOptions.
Mcp
.Disabled.GetValueOrDefault())
DashboardWebApplication.cs (3)
200
var isAllHttps = browserHttpsPort is not null && IsHttpsOrNull(dashboardOptions.Otlp.GetGrpcEndpointAddress()) && IsHttpsOrNull(dashboardOptions.Otlp.GetHttpEndpointAddress()) && IsHttpsOrNull(dashboardOptions.
Mcp
.GetEndpointAddress());
408
_dashboardOptionsMonitor.CurrentValue.
Mcp
.AuthMode == McpAuthMode.Unsecured)
597
EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.
Mcp
.GetEndpointAddress(), "Mcp", httpProtocols: HttpProtocols.Http1AndHttp2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.Mcp);
Mcp\McpApiKeyAuthenticationHandler.cs (1)
33
var options = _dashboardOptions.CurrentValue.
Mcp
;
Mcp\McpCompositeAuthenticationHandler.cs (1)
42
if (options.
Mcp
.AuthMode is McpAuthMode.ApiKey)
Aspire.Dashboard.Components.Tests (4)
Layout\MainLayoutTests.cs (4)
144
o.
Mcp
.SuppressUnsecuredMessage = mcpSuppressUnsecuredMessage;
205
o.
Mcp
.EndpointUrl = "http://localhost:6274";
206
o.
Mcp
.AuthMode = McpAuthMode.Unsecured;
210
o.
Mcp
.TryParseOptions(out _);
Aspire.Dashboard.Tests (2)
Integration\TelemetryApiTests.cs (2)
60
Assert.NotNull(options.
Mcp
.GetPrimaryApiKeyBytesOrNull());
61
Assert.Equal(apiKey.Length, options.
Mcp
.GetPrimaryApiKeyBytesOrNull()!.Length);