Support using WithStreamServerTransport for multiple in-process mcp servers
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu từ đăng ký builder.Services.AddSingleton(new StreamServerTransport(inputStream, outputStream)) và kiểm tra cách StreamServerTransport được kết nối với một MCP Server trong cùng tiến trình. Theo dõi các giả định về kênh và vòng đời dịch vụ, sau đó xác minh rằng có thể khai báo nhiều lớp MCP Server trong cùng tiến trình với các kênh riêng biệt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 4.5k
- Fork
- 814
- Merge trung bình
- 9 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/csharp-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/csharp-sdk#1867 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
modelcontextprotocol/csharp-sdk#678 · 1 bình luận ·
-
enhancement needs confirmation P3 ready for work
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/csharp-sdk#515 · 6 bình luận · 3 reaction ·
Tất cả issue của modelcontextprotocol/csharp-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug needs response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Adyen/adyen-dotnet-api-library#1869 ·
-
Status: Needs Triage Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug effort:S P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
nightscout/nocturne#1602 ·