Skip to content

Opt-in modern protocol negotiation for stdio MCP servers - #1646

Merged
RhysSullivan merged 1 commit into
mainfrom
stdio-modern-mcp
Aug 18, 2026
Merged

Opt-in modern protocol negotiation for stdio MCP servers#1646
RhysSullivan merged 1 commit into
mainfrom
stdio-modern-mcp

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Addresses a user report (tested on 1.5.41): the remote Streamable HTTP client negotiates spec 2026-07-28, but spawned stdio servers always opened with the legacy 2025 initialize handshake, so an SDK v2 server with its legacy lane disabled could not connect.

Stdio integrations now accept versionNegotiation: "auto" (addServer payload, SDK input, stored config) to probe server/discover and fall back to initialize on legacy servers. The default stays legacy per the SDK's own stdio guidance: the auto probe spawns a short-lived sibling process per connect and stalls for the probe timeout on silent legacy servers, which is the wrong default for spawn-per-call CLI servers.

The connect handshake span records the negotiated era (plugin.mcp.protocol_era) so integration authors can verify modern vs legacy from traces.

Tests: stdio-negotiation.test.ts runs the report's acceptance case against a real SDK v2 server with legacy: "reject" (auto connects modern, lists and calls tools; the default handshake fails; a both-era server stays legacy by default). The stdio e2e scenario now also adds an auto-mode server and proves fallback discovery end to end.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 415e5be Commit Preview URL

Branch Preview URL
Aug 18 2026, 03:38 AM

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1646

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1646

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1646

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1646

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1646

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1646

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1646

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1646

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1646

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1646

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1646

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1646

executor

npm i https://pkg.pr.new/executor@1646

commit: 415e5be

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 415e5be Aug 18 2026, 03:41 AM

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 18, 2026 15:42
@RhysSullivan
RhysSullivan merged commit 9ecc7cb into main Aug 18, 2026
27 checks passed
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.

1 participant