modelcontextprotocol / modelcontextprotocol/csharp-sdk
Make EverythingServer capable of running either stdio or http
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Description
From this comment on #709 by @halter73:
It might be interesting to demonstrate how you can share code for an HTTP and stdio everything server. We could create EverythingServer.Http, EverythingSerever.Stdio and EverythingServer.Core projects. And the Core project could have an AddEverythingMcpHandlers(this IMcpServerBuilder builder, ConcurrentDictionary<string, ConcurrentDictionary<string, byte>> subscriptions) method. It might even make sense to add something like public class SubscriptionCollection : ConcurrentDictionary<string, ConcurrentDictionary<string, byte>> to the core project.
The only thing that couldn't be shared is Program.cs. The Stdio project would use hosted services to manage subscriptions, and the Http project would do the RunSessionHandler logic.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing EverythingServer project and its Program.cs, then read the linked discussion from #709. Compare the stdio hosted-service subscription flow with the HTTP RunSessionHandler flow. Done means the shared handler and subscription logic are separated into a core project while both transports retain their respective startup code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100