Repository navigation
test(wasm32): HTTP MCP through the host's fetch - #276
Merged
Merged
Conversation
A scripted MCP server replaces the global fetch: connect, discover and call a tool from the loop, with the Mcp-Session-Id replayed on every request after the handshake (mutation-checked: dropping the replay fails it). The Workers guide notes the missing idle read timeout and #275. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
Merged
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.
HTTP MCP was documented as available on wasm32 (Cloudflare Workers) but never run there.
tests/wasm32.rs: a scripted MCP server replaces the globalfetch(reqwest's wasm client calls it per request, as in a Worker). An agent connects withwith_mcp_server_http, discovers a tool and calls it from the loop. Asserts the tool result and the request sequence:initialize, thennotifications/initialized,tools/list,tools/call, each replayingMcp-Session-Id. Mutation-checked: dropping the session replay inHttpTransportfails the test.Local: all 10 wasm32 tests pass under Node; wasm32 clippy clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG