Skip to content

Commit c8c5fb3

Browse files
authored
Add MCP endpoint to Aspire Dashboard image (#6796)
1 parent 14959ad commit c8c5fb3

10 files changed

Lines changed: 23 additions & 10 deletions

File tree

.portal-docs/docker-hub/README.aspire-dashboard.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ The dashboard must be configured when it is started. The configuration is done v
3030
* `ASPNETCORE_URLS` specifies one or more HTTP endpoints through which the dashboard frontend is served. The frontend endpoint is used to view the dashboard in a browser. Defaults to `http://localhost:18888`.
3131
* `DOTNET_DASHBOARD_OTLP_ENDPOINT_URL` specifies the [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) endpoint. This endpoint hosts an OTLP service and receives telemetry using gRPC. When the dashboard is launched by the .NET Aspire app host this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. Defaults to `http://localhost:18889`.
3232
* `DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` specifies the [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. Defaults to `http://localhost:18890`.
33-
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode` and `Dashboard:Otlp:AuthMode` to `Unsecured`.
33+
* `ASPIRE_DASHBOARD_MCP_ENDPOINT_URL` specifies the Aspire MCP endpoint. When this value isn't specified then the MCP server is hosted with an `ASPNETCORE_URLS` endpoint. The MCP server can be disabled by configuring `Dashboard:Mcp:Disabled` to `true`. Defaults to `http://localhost:18891`.
34+
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode`, `Dashboard:Otlp:AuthMode` and `Dashboard:Mcp:AuthMode` to `Unsecured`.
3435
* `DOTNET_DASHBOARD_CONFIG_FILE_PATH` specifies the path for an optional JSON configuration file.
3536

3637
### Frontend authentication

.portal-docs/mar/README.aspire-dashboard.portal.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ The dashboard must be configured when it is started. The configuration is done v
4949
* `ASPNETCORE_URLS` specifies one or more HTTP endpoints through which the dashboard frontend is served. The frontend endpoint is used to view the dashboard in a browser. Defaults to `http://localhost:18888`.
5050
* `DOTNET_DASHBOARD_OTLP_ENDPOINT_URL` specifies the [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) endpoint. This endpoint hosts an OTLP service and receives telemetry using gRPC. When the dashboard is launched by the .NET Aspire app host this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. Defaults to `http://localhost:18889`.
5151
* `DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` specifies the [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. Defaults to `http://localhost:18890`.
52-
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode` and `Dashboard:Otlp:AuthMode` to `Unsecured`.
52+
* `ASPIRE_DASHBOARD_MCP_ENDPOINT_URL` specifies the Aspire MCP endpoint. When this value isn't specified then the MCP server is hosted with an `ASPNETCORE_URLS` endpoint. The MCP server can be disabled by configuring `Dashboard:Mcp:Disabled` to `true`. Defaults to `http://localhost:18891`.
53+
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode`, `Dashboard:Otlp:AuthMode` and `Dashboard:Mcp:AuthMode` to `Unsecured`.
5354
* `DOTNET_DASHBOARD_CONFIG_FILE_PATH` specifies the path for an optional JSON configuration file.
5455

5556
#### Frontend authentication

README.aspire-dashboard.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ The dashboard must be configured when it is started. The configuration is done v
3232
* `ASPNETCORE_URLS` specifies one or more HTTP endpoints through which the dashboard frontend is served. The frontend endpoint is used to view the dashboard in a browser. Defaults to `http://localhost:18888`.
3333
* `DOTNET_DASHBOARD_OTLP_ENDPOINT_URL` specifies the [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) endpoint. This endpoint hosts an OTLP service and receives telemetry using gRPC. When the dashboard is launched by the .NET Aspire app host this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. Defaults to `http://localhost:18889`.
3434
* `DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` specifies the [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. Defaults to `http://localhost:18890`.
35-
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode` and `Dashboard:Otlp:AuthMode` to `Unsecured`.
35+
* `ASPIRE_DASHBOARD_MCP_ENDPOINT_URL` specifies the Aspire MCP endpoint. When this value isn't specified then the MCP server is hosted with an `ASPNETCORE_URLS` endpoint. The MCP server can be disabled by configuring `Dashboard:Mcp:Disabled` to `true`. Defaults to `http://localhost:18891`.
36+
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode`, `Dashboard:Otlp:AuthMode` and `Dashboard:Mcp:AuthMode` to `Unsecured`.
3637
* `DOTNET_DASHBOARD_CONFIG_FILE_PATH` specifies the path for an optional JSON configuration file.
3738

3839
#### Frontend authentication

eng/dockerfile-templates/aspire-dashboard/Dockerfile.envs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# Aspire Dashboard environment variables
77
{{if dotnetMajor = "8":ASPNETCORE_URLS=http://0.0.0.0:18888 \
88
DOTNET_DASHBOARD_OTLP_ENDPOINT_URL=http://0.0.0.0:18889 \
9-
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://0.0.0.0:18890^
9+
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://0.0.0.0:18890 \
10+
DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://0.0.0.0:18891^
1011
else:ASPNETCORE_URLS=http://+:18888 \
1112
DOTNET_DASHBOARD_OTLP_ENDPOINT_URL=http://+:18889 \
12-
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890}}
13+
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \
14+
DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891}}

eng/readme-templates/Use.aspire-dashboard.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ The dashboard must be configured when it is started. The configuration is done v
1717
* `ASPNETCORE_URLS` specifies one or more HTTP endpoints through which the dashboard frontend is served. The frontend endpoint is used to view the dashboard in a browser. Defaults to `http://localhost:18888`.
1818
* `DOTNET_DASHBOARD_OTLP_ENDPOINT_URL` specifies the [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) endpoint. This endpoint hosts an OTLP service and receives telemetry using gRPC. When the dashboard is launched by the .NET Aspire app host this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. Defaults to `http://localhost:18889`.
1919
* `DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` specifies the [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. Defaults to `http://localhost:18890`.
20-
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode` and `Dashboard:Otlp:AuthMode` to `Unsecured`.
20+
* `ASPIRE_DASHBOARD_MCP_ENDPOINT_URL` specifies the Aspire MCP endpoint. When this value isn't specified then the MCP server is hosted with an `ASPNETCORE_URLS` endpoint. The MCP server can be disabled by configuring `Dashboard:Mcp:Disabled` to `true`. Defaults to `http://localhost:18891`.
21+
* `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` specifies the dashboard doesn't use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode`, `Dashboard:Otlp:AuthMode` and `Dashboard:Mcp:AuthMode` to `Unsecured`.
2122
* `DOTNET_DASHBOARD_CONFIG_FILE_PATH` specifies the path for an optional JSON configuration file.
2223

2324
{{ARGS["top-header"]}}## Frontend authentication

src/aspire-dashboard/amd64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ENV \
3030
# Aspire Dashboard environment variables
3131
ASPNETCORE_URLS=http://+:18888 \
3232
DOTNET_DASHBOARD_OTLP_ENDPOINT_URL=http://+:18889 \
33-
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890
33+
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \
34+
DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891
3435

3536
ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ]

src/aspire-dashboard/arm64v8/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ENV \
3030
# Aspire Dashboard environment variables
3131
ASPNETCORE_URLS=http://+:18888 \
3232
DOTNET_DASHBOARD_OTLP_ENDPOINT_URL=http://+:18889 \
33-
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890
33+
DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL=http://+:18890 \
34+
DOTNET_DASHBOARD_MCP_ENDPOINT_URL=http://+:18891
3435

3536
ENTRYPOINT [ "dotnet", "/app/Aspire.Dashboard.dll" ]

tests/Microsoft.DotNet.Docker.Tests/AspireDashboardImageTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class AspireDashboardImageTests(ITestOutputHelper outputHelper) : CommonR
2222

2323
private const int DashboardOtlpHttpPort = 18890;
2424

25+
private const int DashboardMcpPort = 18891;
26+
2527
protected override DotNetImageRepo ImageRepo => DotNetImageRepo.Aspire_Dashboard;
2628

2729
public static IEnumerable<object[]> GetImageData() =>
@@ -49,6 +51,7 @@ public void VerifyEnvironmentVariables(ProductImageData imageData)
4951
new EnvironmentVariableInfo("ASPNETCORE_URLS", $"{baseUrl}:{DashboardWebPort}"),
5052
new EnvironmentVariableInfo("DOTNET_DASHBOARD_OTLP_ENDPOINT_URL", $"{baseUrl}:{DashboardOtlpPort}"),
5153
new EnvironmentVariableInfo("DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL", $"{baseUrl}:{DashboardOtlpHttpPort}"),
54+
new EnvironmentVariableInfo("DOTNET_DASHBOARD_MCP_ENDPOINT_URL", $"{baseUrl}:{DashboardMcpPort}"),
5255
];
5356

5457
string imageTag = imageData.GetImage(ImageRepo, DockerHelper);

tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-amd64-Dockerfile.approved.txt

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Microsoft.DotNet.Docker.Tests/Baselines/GeneratedArtifactTests/VerifyInternalDockerfilesOutput/aspire-dashboard-arm64v8-Dockerfile.approved.txt

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)