Skip to content

cloud: MCP server 2.4.0 (agents 0.33.0) - #21

Merged
linxule merged 1 commit into
mainfrom
chore/mcp-2.4.0
Nov 7, 2026
Merged

linxule merged 1 commit into
mainfrom
chore/mcp-2.4.0

Conversation

@linxule

@linxule linxule commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Bumps the memex cloud Worker (cloud/) to the latest MCP packages.

Package From To
@modelcontextprotocol/server 2.3.1 2.4.0
@modelcontextprotocol/core (via server) 2.3.1 2.4.0
@modelcontextprotocol/client (agents peer, lockfile only) 2.3.1 2.4.0
agents 0.28.1 0.33.0
@modelcontextprotocol/sdk (v1, agents peer) 1.32.1 removed

Why agents moves too. agents pins its MCP peers exactly: 0.28.1 to 0.31.0 require @modelcontextprotocol/server 2.3.1, so npm refuses 2.4.0 alongside them. 0.32.0 is the first release that peers on 2.4.0; 0.33.0 is current. Since 0.31.0 the v1 SDK is an optional peer, so it and its express/hono tree (about 80 packages) leave the lockfile. The 0.29 to 0.33 breaking notes are about agents/skills, the Pi harness and browserTool; this Worker imports only createMcpHandler from agents/mcp/server. 0.31.0 also makes createMcpHandler pass the workers-oauth-provider token to tool callbacks as context.http.authInfo, which is additive; scopes here are still read from ctx.auth/ctx.props in src/index.ts.

MCP 2.4.0 upgrade notes checked against the code. No change needed:

  • x-mcp-header on a number parameter is now rejected: not used.
  • outputSchema from z.object(...).meta({ id }) is no longer wrapped in { result }: the cloud tools declare no outputSchema.
  • Bundled Ajv uses fast-uri 3.1.8, which rejects $id/$ref with an invalid scheme: no such schemas.

Only cloud/package.json (two version strings) and cloud/package-lock.json change. No version bump, tag or release; cloud/src/version.ts is unchanged.

Verification (local, Node 26.13 / npm 11.20)

  • npm ci: ok
  • npm run typecheck (wrangler types + tsc): ok
  • npm test: 4 files, 25 tests passed (same as on main before the bump)
  • npx wrangler deploy --dry-run --outdir <tmp>: ok, 1515 KiB / 277 KiB gzip
  • npm ls: server, client and core all resolve to a single 2.4.0

Deploy and overlap

🤖 Generated with Claude Code

agents pins its MCP peers exactly; 0.28.1 requires server 2.3.1, so the
server bump needs agents >= 0.32.0 (0.33.0 is current). agents now pulls
@modelcontextprotocol/client 2.4.0 as its peer, and since 0.31.0
@modelcontextprotocol/sdk is an optional peer, so the v1 SDK and its
express/hono tree leave the lockfile.

No code change: nothing here uses x-mcp-header, outputSchema with
.meta({ id }), or $id/$ref values that fast-uri 3.1.8 rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linxule

linxule commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Local wrangler dev A/B, main (agents 0.28.1 / server 2.3.1) vs this branch (agents 0.33.0 / server 2.4.0)

Handler: createMcpHandler from agents/mcp/server, which is agents' stateless v2 handler (createStatelessMcpHandler). Between 0.28.1 and 0.33.0 its compiled source differs only by the additive ctx.auth → authInfo mapping. Origin, JSON/SSE and method handling are unchanged. Auth was a SYNC_TOKEN bearer with dummy local values; protocol 2025-11-25.

Probe main branch
initialize, no Origin 200 text/event-stream 200 text/event-stream
tools/list, no Origin 200 text/event-stream 200 text/event-stream
tools/call projects, no Origin 200 text/event-stream 200 text/event-stream
initialize / tools/list / tools/call, Origin: https://claude.ai 403 application/json "Invalid Origin: claude.ai" same
OPTIONS preflight from https://claude.ai 204, ACAO https://claude.ai same
DELETE 405 application/json same
GET 405 application/json same
POST without auth 401 401
POST with Accept: application/json only 406 406
tools/list at 2026-07-28 (no initialize) 200 application/json 200 application/json

Every row matches, headers included. The browser-Origin 403 and SSE-for-2025 behaviour are already on main, so this PR does not introduce them. Neither is changed here.

🤖 Generated with Claude Code

@linxule
linxule merged commit 47c9515 into main Nov 7, 2026
4 checks passed
@linxule
linxule deleted the chore/mcp-2.4.0 branch November 7, 2026 19:07
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