McpServerEndpointAnnotation
Classsealednet10.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 Constructors Initializes a new instance of the
McpServerEndpointAnnotation class. Properties1
Section titled PropertiesFunc<IResourceWithEndpoints, CancellationToken, Task<Uri?>> Gets the callback that resolves the MCP server endpoint URL from the resource.
Methods1
Section titled Methods Creates an
McpServerEndpointAnnotation that resolves the MCP server URL from a named endpoint.