Skip to content

Add stdio support for EverythingServer sample (continues #950) - #1880

Open
FengFafa97 wants to merge 8 commits into
modelcontextprotocol:mainfrom
FengFafa97:fix-889-stdio
Open

FengFafa97 wants to merge 8 commits into
modelcontextprotocol:mainfrom
FengFafa97:fix-889-stdio

Conversation

@FengFafa97

@FengFafa97 FengFafa97 commented Sep 16, 2026 •

Copy link
Copy Markdown

Continues #950, fixes #889.

This picks up @asklar's branch splitting EverythingServer into
EverythingServer.Core / EverythingServer.Http / EverythingServer.Stdio,
rebases it onto current main, and fixes the build breaks that surfaced
from the rebase:

  • EverythingServerExtensions.cs: SampleAsync's named parameter was
    renamed to chatOptions upstream; updated the call site.
  • EverythingServer.Core.csproj: added the MCP9005 suppression
    (Sampling deprecated per SEP-2577) that EverythingServer.Http.csproj
    already had — it doesn't propagate across the project reference.
  • EverythingServer.Http/Program.cs: restored the MCPEXP002 pragma
    around the experimental RunSessionHandler assignment, matching the
    original Program.cs and docs/experimental.md.
  • launchSettings.json: removed trailing commas that broke JSON parsing
    and silently disabled both launch profiles.

Verification:

  • dotnet build: 0 warnings, 0 errors.
  • Manually ran both samples and completed a live MCP initialize
    handshake against each (stdio via piped JSON-RPC, HTTP via a direct
    POST to the Streamable HTTP endpoint).

Out of scope for this PR: main's Program.cs also gained new
sample content since @asklar's branch was cut (icon/ServerInfo metadata
showcase, explicit stateful SessionMode). Not ported here to keep this
PR focused on restoring a green build; happy to follow up separately.

Co-Authored-By: Claude Sonnet 5

Copilot AI and others added 6 commits November 7, 2025 18:26
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>
@FengFafa97

Copy link
Copy Markdown
Author

Hi @jeffhandley — an update on #950: This PR has been rebased onto the current main branch, conflicts have been resolved, and local builds are passing (both stdio and HTTP examples successfully complete the initial handshake). The PR's CI workflow is currently awaiting maintainer approval—could someone please take a look when convenient? I am happy to adjust the scope of work or hand it over if the team prefers to take it from here.

@FengFafa97

Copy link
Copy Markdown
Author

Hi @halter73 and @jeffhandley — this part is ready for review. This is the version @asklar split off from #950 and rebased onto the current main branch; my own changes are included in commit 5a080c1 (affecting 4 files, +8/−3), primarily fixing build failures caused by the rebase. The branch is synced with main, dotnet build succeeds, the local test suite passes, and both stdio and HTTP samples complete the initial handshake successfully. The associated workflows are currently awaiting approval. I am happy to adjust the scope as needed, or to hand over the work if you would prefer to take it from here.

@FengFafa97

Copy link
Copy Markdown
Author

@tarekgh — apologies for the extra ping. Since #950 mentioned the team might take this forward, could you let me know whether this PR is still wanted, or whether #889 is planned differently? Happy to rework it or close it either way.

@tarekgh

tarekgh commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

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:

  • Keep shared handlers in Core and transport-specific setup in the HTTP and Stdio projects. Keep dnx and MCPB packaging out of scope.
  • Carry forward the existing server identity/icons and Echo tool icons from current main, rather than dropping those demonstrations during the restructuring.
  • Make the HTTP protocol behavior explicit. If this remains a behavior-preserving restructuring, retain the current stateful configuration and document that its session-dependent demonstrations use older protocol revisions. If native 2026-07-28 support is included, adapt the relevant handlers to MRTR and subscriptions/listen; changing the HTTP session mode alone is not sufficient.
  • Validate both transports beyond the initialization handshake, especially sampling, resource subscriptions, notification delivery, and clean shutdown, covering the protocol versions the sample intends to support.

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 2026-07-28 support. Either approach is reasonable, but we should agree on the scope before asking for further changes.

Once this PR is completed and merged, we can close #950 as superseded.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make EverythingServer capable of running either stdio or http

5 participants