Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

withMcpServer

Method
📦 Aspire.Hosting v13.5.4
interface ContainerResource {
// ... omitted for brevity
withMcpServer(
path?: string,
endpointName?: string): IResourceWithEndpoints;
}

Signature

methodwithMcpServerbuilder
Marks the resource as hosting a Model Context Protocol (MCP) server on the specified endpoint.
withMcpServer(
path?: string,
endpointName?: string): IResourceWithEndpoints
pathstringoptional= /mcp
endpointNamestringoptional
IResourceWithEndpoints

Applies to

This method applies to the following types: