Repository navigation
Add stdio support for EverythingServer sample (continues #950) - #1880
FengFafa97 wants to merge 13 commits into
Conversation
Co-authored-by: asklar <22989529+asklar@users.noreply.github.com>
Co-authored-by: asklar <22989529+asklar@users.noreply.github.com>
- EverythingServerExtensions.cs: SampleAsync's named parameter was renamed to chatOptions upstream; update the call site. - EverythingServer.Core.csproj: suppress MCP9005 (Sampling deprecated per SEP-2577), matching the sibling EverythingServer.Http.csproj. - EverythingServer.Http/Program.cs: suppress MCPEXP002 around the experimental RunSessionHandler assignment, matching the original Program.cs and docs/experimental.md. - launchSettings.json: remove trailing commas that broke JSON parsing and silently disabled both launch profiles. Verified: dotnet build succeeds with 0 warnings/errors, and both transports complete a live MCP initialize handshake (stdio and Streamable HTTP). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi @jeffhandley — an update on #950: This PR has been rebased onto the current |
|
Hi @halter73 and @jeffhandley — this part is ready for review. This is the version @asklar split off from #950 and rebased onto the current |
|
Thanks for checking in and following up, @FengFafa97, and for picking up this work and resolving the rebase issues. The Core/HTTP/Stdio split matches the previously discussed direction, and I recommend keeping this PR moving forward. Specifically:
Since the protocol has evolved since the original proposal, @jeffhandley and @halter73, please confirm whether this PR should preserve the existing sample behavior only, or also update the HTTP sample for native Once this PR is completed and merged, we can close #950 as superseded. |
…om main - Core: move the ServerInfo (name/title/description/website/icons) and the multi-icon EchoTool registration from main's Program.cs into AddEverythingMcpHandlers so both the HTTP and stdio hosts expose them. - Http: restore SessionMode = Stateful (and its explanatory comment). The default is now Stateless, so without it sampling, resource subscriptions and RunSessionHandler silently lost their session. - Core: SubscriptionMessageSender sent "notifications/resource/updated"; the spec method is "notifications/resources/updated", so clients never received resource update notifications. Use NotificationMethods.ResourceUpdatedNotification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @tarekgh for the detailed review. I've pushed 91d1b4c (plus a merge of current
¹ The server rejects Two fixes came out of the validation:
On point 3, @jeffhandley @halter73: should this PR only preserve the existing behavior (stateful HTTP, with a note that the session-dependent demonstrations target Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com |
Continues #950, fixes #889.
This picks up @asklar's branch splitting
EverythingServerintoEverythingServer.Core/EverythingServer.Http/EverythingServer.Stdio,rebases it onto current
main, and fixes the build breaks that surfacedfrom the rebase:
EverythingServerExtensions.cs:SampleAsync's named parameter wasrenamed to
chatOptionsupstream; updated the call site.EverythingServer.Core.csproj: added theMCP9005suppression(Sampling deprecated per SEP-2577) that
EverythingServer.Http.csprojalready had — it doesn't propagate across the project reference.
EverythingServer.Http/Program.cs: restored theMCPEXP002pragmaaround the experimental
RunSessionHandlerassignment, matching theoriginal
Program.csanddocs/experimental.md.launchSettings.json: removed trailing commas that broke JSON parsingand silently disabled both launch profiles.
Verification:
dotnet build: 0 warnings, 0 errors.initializehandshake against each (stdio via piped JSON-RPC, HTTP via a direct
POST to the Streamable HTTP endpoint).
Out of scope for this PR:
main'sProgram.csalso gained newsample content since @asklar's branch was cut (icon/
ServerInfometadatashowcase, explicit stateful
SessionMode). Not ported here to keep thisPR focused on restoring a green build; happy to follow up separately.
Co-Authored-By: Claude Sonnet 5