McpServerEndpointAnnotation
Class sealed net8.0
Represents an annotation that identifies an endpoint on a resource that hosts a Model Context Protocol (MCP) server.
namespace Aspire.Hosting.ApplicationModel;
public sealed class McpServerEndpointAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation{ // ...}Remarks
Section titled Remarks This annotation is intended for discovery and proxying scenarios where the Aspire AppHost can act as a mediator between clients (such as the Aspire CLI) and MCP servers exposed by resources.
Constructors1
Section titled ConstructorsMcpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>>) Initializes a new instance of the
McpServerEndpointAnnotation class. Properties1
Section titled PropertiesMethods1
Section titled MethodsFromEndpoint(string, string?)static Creates an
McpServerEndpointAnnotation that resolves the MCP server URL from a named endpoint.