Skip to content

Host several MCP in one ASP.Net application #611

@wesley-wws

Description

@wesley-wws

Is your feature request related to a problem? Please describe.
Currently, I have multiple streamable MCP services, and deploying them is using too many server ports. Is there a way to consolidate multiple streamable MCP servers within a single ASP.NET application to reduce port usage?

Describe the solution you'd like
Could we add a property like Name, to [McpServerToolType] and use routing to differentiate which MCP service to connect to?

For example, carried by the following two classes with different Tools:

[McpServerToolType("Foo")]
class Foo {...}

[McpServerToolType("Bar")]
class Bar {...}

After calling app.MapMcp("mcp"), connecting to /mcp/Foo and /mcp/Bar can use different tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions