Skip to content
Docs Try Aspire

withMcpServer

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface ContainerResource {
// ... omitted for brevity
withMcpServer(
path?: string,
endpointName?: string): IResourceWithEndpoints;
}

Signature

method withMcpServer builder
Configures an MCP server endpoint on the resource
withMcpServer(
path?: string,
endpointName?: string): IResourceWithEndpoints
path string optional = /mcp
endpointName string optional
IResourceWithEndpoints

Applies to

This function is an extension method on the following types: