Skip to content
DocsTry Aspire
DocsTry

IResourceWithEndpoints.withMcpServer

Method
📦 Aspire.Hosting v13.4.0
interface IResourceWithEndpoints {
// ... 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

Defined on

This method is defined on the following type: