Skip to content
Docs Try Aspire

McpServerEndpointAnnotation Methods

Class Methods 1 member
Represents an annotation that identifies an endpoint on a resource that hosts a Model Context Protocol (MCP) server.
Creates an McpServerEndpointAnnotation that resolves the MCP server URL from a named endpoint.
public sealed class McpServerEndpointAnnotation
{
public static McpServerEndpointAnnotation FromEndpoint(
string endpointName,
string? path = "/mcp")
{
// ...
}
}
endpointName string The name of the endpoint on the resource that hosts the MCP server.
path string? optional An optional path to append to the endpoint URL. Defaults to "/mcp".