Skip to content

Executor as MCP server: serve spec 2026-07-28 and consolidate onto SDK v2 - #1611

Merged
RhysSullivan merged 10 commits into
mainfrom
mcp-delete-v1-assembly
Aug 16, 2026
Merged

Executor as MCP server: serve spec 2026-07-28 and consolidate onto SDK v2#1611
RhysSullivan merged 10 commits into
mainfrom
mcp-delete-v1-assembly

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Executor as an MCP server on spec 2026-07-28 (part 2 of 2, stacked on the client PR): every host serves modern clients, and all serving — both eras — consolidates onto SDK v2.

Serving the new spec:

  • Tool server: one SDK-agnostic core on the v2 McpServer, serving both eras. Native elicitation = input_required + HMAC-signed requestState (principal+method bound, TTL'd) over the existing pause/resume engine; legacy clients get real elicitation/create via the SDK's shim. MCP Apps helpers vendored wire-identical pending upstream ext-apps v2 ([codex] Put typed base URL first in combobox #702).
  • Neutral hosts (selfhost, local): era-routed after auth — modern requests to cached stateless handlers, legacy sessions on the v2 sessionful transport. stdio serves both eras via serveStdio. CORS preflights echo requested headers for dynamic Mcp-Param-<name>.
  • Cloudflare hosts: modern reads worker-side (no DO touch); modern tools/call routes into DOs for execution affinity via the executionId-keyed owner directory (continuations verify signed state in the worker; same cross-bearer 403 contract as legacy).

Consolidation (deletes the transitional machinery):

  • Cloud legacy sessions move off McpAgent onto our own Durable Object hosting the v2 stack: DO-storage EventStore (trim/oversize/best-effort), cross-stream replay of stranded POST responses onto the next standalone GET, compatibility priming for pre-2025-11-25 clients, SSE max-age rotation, transactional idle-dispose, parse guard so unknown/foreign session ids 404 cleanly.
  • Deleted: patches/agents@0.17.3.patch (911 lines), the agents dependency from every MCP path, the v1 tool-server assembly, the ext-apps runtime dependency, all transitional V2 naming. @modelcontextprotocol/sdk v1 survives only as a devDependency for legacy-client interop tests and the deliberately-legacy plugins/mcp test fixture.

Evidence: full CI green at this tip (19 checks incl. all cloud e2e shards). The four patch-behavior suites — priming reconnect, SSE replay, oversize response, transport-brick regression — plus session survival are the acceptance gate for the consolidation, all green. Modern serving proven live with a 2026-07-28-pinned client; legacy proven by real v1-SDK clients in tests.

Deployment prerequisite (before merge): both workers need the shared continuation-signing secret (≥32 bytes): wrangler secret put MCP_REQUEST_STATE_KEY. No generated fallback.

One-time cutover: cloud sessions created before this deploy get a clean 404 and clients re-initialize transparently. Deploy in a quiet window and watch reconnects. (If a staged rollback is ever needed, the additive-serving/consolidation seam survives in the commit history at mcp-server-v2-cloud.)


Closes #1449.
Supersedes #1562 — with thanks to @Schreezer, whose independent implementation validated the architecture; this PR adopts its stronger requestState binding (account/org/resource/tool/code-digest), the MCP_2026_07_28_ENABLED inbound rollback switch, and the CLI stdio-bridge era handling.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 16, 2026

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 ce87083 Aug 16 2026, 09:07 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 16, 2026

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 ce87083 Commit Preview URL

Branch Preview URL
Aug 16 2026, 09:06 PM

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: ce87083

@RhysSullivan RhysSullivan changed the title Delete the v1 MCP assembly and retire the transitional naming MCP spec 2026-07-28: client, servers, and SDK v2 consolidation Aug 16, 2026
@RhysSullivan
RhysSullivan changed the base branch from mcp-consolidate-cloud to main August 16, 2026 16:07
@RhysSullivan RhysSullivan changed the title MCP spec 2026-07-28: client, servers, and SDK v2 consolidation Consolidate MCP serving onto SDK v2 and delete the agents patch Aug 16, 2026
@RhysSullivan
RhysSullivan changed the base branch from main to mcp-server-v2-cloud August 16, 2026 16:16
@RhysSullivan RhysSullivan changed the title Consolidate MCP serving onto SDK v2 and delete the agents patch Executor as MCP server: serve spec 2026-07-28 and consolidate onto SDK v2 Aug 16, 2026
@RhysSullivan
RhysSullivan changed the base branch from mcp-server-v2-cloud to mcp-client-v2 August 16, 2026 16:58
@RhysSullivan
RhysSullivan force-pushed the mcp-delete-v1-assembly branch from c8908fe to ce87083 Compare August 16, 2026 21:04
@RhysSullivan
RhysSullivan changed the base branch from mcp-client-v2 to main August 16, 2026 21:04
@RhysSullivan
RhysSullivan marked this pull request as ready for review August 16, 2026 21:18
@RhysSullivan
RhysSullivan merged commit 0b1739b into main Aug 16, 2026
22 of 23 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.

MCP protocol: handle 'server/discover' before 'initialize'

1 participant