From 79eb4440674c0144ce95e6b3c6e6515034b2ae94 Mon Sep 17 00:00:00 2001 From: Maddy Montaquila Date: Wed, 11 Nov 2026 11:16:17 -0800 Subject: [PATCH 1/3] Graduate MCP endpoint declaration to stable Retain existing endpoint selection and path resolution behavior, document the declaration-only contract, and remove ASPIREMCP001 suppressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/list-of-diagnostics.md | 6 ++ .../PostgresBuilderExtensions.cs | 1 - .../McpServerResourceBuilderExtensions.cs | 13 ++-- .../WithMcpServerTests.cs | 65 +++++++++++++++++-- 4 files changed, 73 insertions(+), 12 deletions(-) diff --git a/docs/list-of-diagnostics.md b/docs/list-of-diagnostics.md index 06bed95b1f4..f9cd2e9445f 100644 --- a/docs/list-of-diagnostics.md +++ b/docs/list-of-diagnostics.md @@ -29,6 +29,12 @@ When automatic CLI bundle setup fails, `ASPIRE009` includes the setup command's | `ASPIREEXPORT018` | Warning | The source-generated Aspire export provider contract is experimental and may change or be removed in future releases. | [src/Aspire.Hosting/Ats/AspireExportProviderAttribute.cs](../src/Aspire.Hosting/Ats/AspireExportProviderAttribute.cs) | | `ASPIREPIPELINES005` | Warning | Pipeline output diffing APIs are experimental and may change or be removed in future releases. Suppress this diagnostic to opt in. | [src/Aspire.Hosting/PipelineOutputDiffingExtensions.cs](../src/Aspire.Hosting/PipelineOutputDiffingExtensions.cs) | +### Retired Experimental API Warnings + +| Diagnostic ID | Description | Location | +| ------------- | ----------- | -------- | +| `ASPIREMCP001` | MCP endpoint declaration via `WithMcpServer` is stable and no longer requires suppression. This declares an existing server for Aspire tooling discovery and proxying; it does not implement or configure an MCP transport. | [src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs](../src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs) | + ## Analyzer Warnings | Diagnostic ID | Severity | Description | Location | diff --git a/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs b/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs index ee59495d558..c9f5eaddaaf 100644 --- a/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs +++ b/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREMCP001 #pragma warning disable ASPIRETERMINAL001 using System.Globalization; diff --git a/src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs b/src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs index 146c0db1836..d523218dc8f 100644 --- a/src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting/McpServerResourceBuilderExtensions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using Aspire.Hosting.ApplicationModel; namespace Aspire.Hosting; @@ -18,13 +17,20 @@ public static class McpServerResourceBuilderExtensions /// /// The resource type. /// The resource builder. - /// An optional path to append to the endpoint URL when forming the MCP server address. Defaults to "/mcp". - /// An optional name of the endpoint that hosts the MCP server. If not specified, defaults to the first HTTPS or HTTP endpoint. + /// An optional path to append to the endpoint URL when forming the MCP server address. Defaults to "/mcp". + /// A leading slash is added if missing. A null or empty value uses the endpoint URL without an additional path. + /// An optional name of the endpoint that hosts the MCP server. If not specified, selects the endpoint + /// named https, falling back to the endpoint named http. Names are matched case-insensitively; + /// endpoints with other names must be selected explicitly, regardless of their URI scheme. /// A reference to the for chaining additional configuration. /// The resource builder. /// /// This method adds an to the resource, enabling the Aspire tooling /// to discover and proxy the MCP server exposed by the resource. + /// It does not create an endpoint, start an MCP server, or configure its transport or authentication. + /// The resource must already expose an MCP server at the selected endpoint and path. + /// Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + /// A missing selected endpoint causes resolution to throw a . /// /// /// Mark a resource as hosting an MCP server using the default endpoint: @@ -38,7 +44,6 @@ public static class McpServerResourceBuilderExtensions /// .WithMcpServer("/sse", endpointName: "https"); /// /// - [Experimental("ASPIREMCP001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] [AspireExport] public static IResourceBuilder WithMcpServer( this IResourceBuilder builder, diff --git a/tests/Aspire.Hosting.Tests/WithMcpServerTests.cs b/tests/Aspire.Hosting.Tests/WithMcpServerTests.cs index df4c0b3eec3..071f16ddc67 100644 --- a/tests/Aspire.Hosting.Tests/WithMcpServerTests.cs +++ b/tests/Aspire.Hosting.Tests/WithMcpServerTests.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREMCP001 - using Aspire.Hosting.Utils; using Microsoft.Extensions.DependencyInjection; @@ -42,12 +40,16 @@ public async Task WithMcpServer_DefaultsToHttpsEndpoint() using var appBuilder = TestDistributedApplicationBuilder.Create(); appBuilder.AddContainer("app", "image") + .WithEndpoint("http", e => + { + e.UriScheme = "http"; + e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 8080); + }) .WithEndpoint("https", e => { e.UriScheme = "https"; e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 8443); }) - .WithHttpEndpoint(name: "http") .WithMcpServer(); using var app = await appBuilder.BuildAsync(); @@ -112,8 +114,13 @@ public async Task WithMcpServer_ResolvesDefaultMcpPath() Assert.Equal("http://localhost:8080/mcp", resolvedUri!.ToString()); } - [Fact] - public async Task WithMcpServer_ResolvesCustomPath() + [Theory] + [InlineData("/sse", "http://localhost:8080/sse")] + [InlineData("custom/path", "http://localhost:8080/custom/path")] + [InlineData("", "http://localhost:8080/")] + [InlineData("/", "http://localhost:8080/")] + [InlineData("/mcp/", "http://localhost:8080/mcp/")] + public async Task WithMcpServer_ResolvesCustomPath(string path, string expectedUrl) { using var appBuilder = TestDistributedApplicationBuilder.Create(); @@ -123,7 +130,7 @@ public async Task WithMcpServer_ResolvesCustomPath() e.UriScheme = "http"; e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 8080); }) - .WithMcpServer("/sse", endpointName: "http"); + .WithMcpServer(path, endpointName: "http"); using var app = await appBuilder.BuildAsync(); @@ -134,7 +141,51 @@ public async Task WithMcpServer_ResolvesCustomPath() var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None); Assert.NotNull(resolvedUri); - Assert.Equal("http://localhost:8080/sse", resolvedUri!.ToString()); + Assert.Equal(expectedUrl, resolvedUri!.ToString()); + } + + [Theory] + [InlineData("management")] + [InlineData("MANAGEMENT")] + public async Task WithMcpServer_ResolvesExplicitlyNamedEndpoint(string endpointName) + { + using var appBuilder = TestDistributedApplicationBuilder.Create(); + + var container = appBuilder.AddContainer("app", "image") + .WithHttpEndpoint(name: "https") + .WithEndpoint("management", e => + { + e.UriScheme = "http"; + e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 8080); + }) + .WithMcpServer(endpointName: endpointName); + + var annotation = Assert.Single(container.Resource.Annotations.OfType()); + var resolvedUri = await annotation.EndpointUrlResolver(container.Resource, CancellationToken.None); + + Assert.Equal(new Uri("http://localhost:8080/mcp"), resolvedUri); + } + + [Theory] + [InlineData(null, "Could not create MCP server for resource 'app' as no endpoint was found matching one of the specified names: https, http")] + [InlineData("missing", "Could not create MCP server for resource 'app' as no endpoint was found with name 'missing'.")] + public async Task WithMcpServer_ThrowsWhenSelectedEndpointDoesNotExist(string? endpointName, string expectedMessage) + { + using var appBuilder = TestDistributedApplicationBuilder.Create(); + + var container = appBuilder.AddContainer("app", "image") + .WithEndpoint("management", e => + { + e.UriScheme = "https"; + e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 8443); + }) + .WithMcpServer(endpointName: endpointName); + + var annotation = Assert.Single(container.Resource.Annotations.OfType()); + var exception = await Assert.ThrowsAsync( + () => annotation.EndpointUrlResolver(container.Resource, CancellationToken.None)); + + Assert.Equal(expectedMessage, exception.Message); } [Fact] From 4cc07054ee3ad1e73e26dc550fb7edc01f0a9ad0 Mon Sep 17 00:00:00 2001 From: Maddy Montaquila Date: Wed, 11 Nov 2026 11:17:26 -0800 Subject: [PATCH 2/3] Refresh stable MCP TypeScript SDK snapshot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- ...TwoPassScanningGeneratedAspire.verified.ts | 139 ++++++++++++++---- 1 file changed, 110 insertions(+), 29 deletions(-) diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index 85fab726db7..bd066862aa7 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -1919,9 +1919,9 @@ export interface WithImageOptions { } export interface WithMcpServerOptions { - /** An optional path to append to the endpoint URL when forming the MCP server address. Defaults to `"/mcp"`. */ + /** An optional path to append to the endpoint URL when forming the MCP server address. Defaults to `"/mcp"`. A leading slash is added if missing. A null or empty value uses the endpoint URL without an additional path. */ path?: string; - /** An optional name of the endpoint that hosts the MCP server. If not specified, defaults to the first HTTPS or HTTP endpoint. */ + /** An optional name of the endpoint that hosts the MCP server. If not specified, selects the endpoint named `https`, falling back to the endpoint named `http`. Names are matched case-insensitively; endpoints with other names must be selected explicitly, regardless of their URI scheme. */ endpointName?: string; } @@ -15559,9 +15559,12 @@ export interface ContainerResource { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise; /** @@ -16427,9 +16430,12 @@ export interface ContainerResourcePromise extends PromiseLike * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise; /** @@ -17645,9 +17651,12 @@ class ContainerResourceImpl extends ResourceBuilderBase * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise { const path = options?.path; @@ -20153,9 +20162,12 @@ export interface CSharpAppResource { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; /** @@ -20861,9 +20873,12 @@ export interface CSharpAppResourcePromise extends PromiseLike * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; /** @@ -21620,9 +21635,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise { const path = options?.path; @@ -24251,9 +24269,12 @@ export interface DotnetToolResource { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): DotnetToolResourcePromise; /** @@ -24995,9 +25016,12 @@ export interface DotnetToolResourcePromise extends PromiseLike { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise; /** @@ -38616,9 +38658,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise { const path = options?.path; @@ -41366,9 +41411,12 @@ export interface TestDatabaseResource { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestDatabaseResourcePromise; /** @@ -42234,9 +42282,12 @@ export interface TestDatabaseResourcePromise extends PromiseLike * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise; /** @@ -48392,9 +48452,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise { const path = options?.path; @@ -51409,9 +51472,12 @@ export interface TestVaultResource { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise; /** @@ -52279,9 +52345,12 @@ export interface TestVaultResourcePromise extends PromiseLike * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise; /** @@ -53498,9 +53567,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise { const path = options?.path; @@ -58944,9 +59016,12 @@ export interface ResourceWithEndpoints { * * This method adds an `McpServerEndpointAnnotation` to the resource, enabling the Aspire tooling * to discover and proxy the MCP server exposed by the resource. + * It does not create an endpoint, start an MCP server, or configure its transport or authentication. + * The resource must already expose an MCP server at the selected endpoint and path. + * Endpoint selection and URL resolution occur when tooling consumes the annotation, not when this method is called. + * A missing selected endpoint causes resolution to throw a `DistributedApplicationException`. * @param options Additional options. * @returns The resource builder. - * @experimental */ withMcpServer(options?: WithMcpServerOptions): ResourceWithEndpointsPromise; /** @@ -59045,9 +59120,12 @@ export interface ResourceWithEndpointsPromise extends PromiseLike Date: Wed, 11 Nov 2026 11:19:44 -0800 Subject: [PATCH 3/3] Refresh stable MCP Go SDK snapshot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- ...TwoPassScanningGeneratedAspire.verified.go | 95 +++++++++++-------- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go b/tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go index e4d037133c5..fa844dc0539 100644 --- a/tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go +++ b/tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go @@ -3005,16 +3005,17 @@ type Aspire_Hosting_CodeGeneration_Go_TestsTestVaultResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) Aspire_Hosting_CodeGeneration_Go_TestsTestVaultResource // WithMergeEndpoint configures a named endpoint @@ -6428,16 +6429,17 @@ type CSharpAppResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) CSharpAppResource // WithMergeEndpoint configures a named endpoint @@ -12755,16 +12757,17 @@ type ContainerResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) ContainerResource // WithMergeEndpoint configures a named endpoint @@ -18110,16 +18113,17 @@ type DotnetToolResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) DotnetToolResource // WithMergeEndpoint configures a named endpoint @@ -22487,16 +22491,17 @@ type ExecutableResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) ExecutableResource // WithMergeEndpoint configures a named endpoint @@ -32254,16 +32259,17 @@ type ProjectResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) ProjectResource // WithMergeEndpoint configures a named endpoint @@ -37469,16 +37475,17 @@ type TestDatabaseResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) TestDatabaseResource // WithMergeEndpoint configures a named endpoint @@ -41236,16 +41243,17 @@ type TestRedisResource interface { // // This method adds an McpServerEndpointAnnotation to the resource, enabling the // Aspire tooling to discover and proxy the MCP server exposed by the resource. + // It does not create an endpoint, start an MCP server, or configure its + // transport or authentication. The resource must already expose an MCP server + // at the selected endpoint and path. Endpoint selection and URL resolution + // occur when tooling consumes the annotation, not when this method is called. A + // missing selected endpoint causes resolution to throw a + // DistributedApplicationException. // // Parameters: // - options: Optional parameters; see [WithMcpServerOptions]. // // Returns: The resource builder. - // - // # Experimental - // - // Notice: This API is EXPERIMENTAL and may be changed or removed in a later - // release. WithMcpServer(options ...*WithMcpServerOptions) TestRedisResource // WithMergeEndpoint configures a named endpoint @@ -44972,10 +44980,13 @@ func (o *WithHttpHealthCheckOptions) ToMap() map[string]any { // WithMcpServerOptions carries optional parameters for WithMcpServer. type WithMcpServerOptions struct { // Path is an optional path to append to the endpoint URL when forming the MCP - // server address. Defaults to "/mcp". + // server address. Defaults to "/mcp". A leading slash is added if missing. A + // null or empty value uses the endpoint URL without an additional path. Path *string `json:"path,omitempty"` // EndpointName is an optional name of the endpoint that hosts the MCP server. - // If not specified, defaults to the first HTTPS or HTTP endpoint. + // If not specified, selects the endpoint named https, falling back to the + // endpoint named http. Names are matched case-insensitively; endpoints with + // other names must be selected explicitly, regardless of their URI scheme. EndpointName *string `json:"endpointName,omitempty"` }