Skip to content

fix(runtime): adapt node/Hono req → Web Request for MCP transport#1632

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/mcp-web-request-adapter
Jun 7, 2026
Merged

fix(runtime): adapt node/Hono req → Web Request for MCP transport#1632
xuyushun441-sys merged 1 commit into
mainfrom
fix/mcp-web-request-adapter

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Staging e2e (round 3) found initialize400 "MCP transport requires a standard HTTP request". The MCP transport needs a Web-standard Request, but the runtime HTTP adapter passes a node/Hono-style req (plain headers object, path-only url). Unit tests passed a real Request, hiding it.

handleMcp now reconstructs a Web Request (method, absolute URL from host+path, normalised headers, JSON body from the parsed body) when the inbound req isn't already Web-standard. +2 regression tests (node-style POST + GET). Full runtime suite 381 green.

After merge + cloud framework bump + redeploy + kernel rebuild, the keyed tools/list should work end-to-end.

🤖 Generated with Claude Code

…R-0036)

The MCP transport needs a Web-standard Request, but the runtime HTTP adapter
passes a node/Hono-style req (plain headers object, path-only url). handleMcp
400'd it ("MCP transport requires a standard HTTP request") → live endpoint
unusable even after routing+registration. Unit tests passed a real Request,
hiding it; caught in staging e2e on initialize.

handleMcp now reconstructs a Web Request (method, absolute URL from host+path,
normalised headers, JSON body) when the inbound req isn't already Web-standard.
+2 regression tests (node-style POST + GET). Full runtime suite 381 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 7, 2026 12:55am

Request Review

@xuyushun441-sys xuyushun441-sys merged commit 2537e28 into main Jun 7, 2026
7 of 8 checks passed
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling labels Jun 7, 2026
@xuyushun441-sys xuyushun441-sys deleted the fix/mcp-web-request-adapter branch June 7, 2026 00:53
@github-actions github-actions Bot added the size/m label Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants