fix(runtime): adapt node/Hono req → Web Request for MCP transport#1632
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staging e2e (round 3) found
initialize→ 400 "MCP transport requires a standard HTTP request". The MCP transport needs a Web-standardRequest, but the runtime HTTP adapter passes a node/Hono-style req (plainheadersobject, path-onlyurl). Unit tests passed a realRequest, hiding it.handleMcpnow reconstructs a WebRequest(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/listshould work end-to-end.🤖 Generated with Claude Code