-
Notifications
You must be signed in to change notification settings - Fork 607
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The current implementation register the stream support as a singleton:
builder.Services.AddSingleton<ITransport>(new StreamServerTransport(inputStream, outputStream));
This prevents declaring multiple MCP Server classes in-process and using them with a separate channels.
Reasons for this choice:
- creating MCP servers in a separate class library so that they can be instantiated in-process or out-of-process depending on the app
- ability to clearly separate the tools, prompts and resources. Currently I have to mix all the in-process prompts, resources and tools in a single MCP server to be used in-process.
- avoid creating a separate process just because of the library limitation (performance reasons)
As I mentioned in a discussion, the Model Context Protocol adhere to the "transparency" principle, but the library makes it very difficult to reach. This is the reason why I tagged this as a bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working