Make docs MCP HTTP transport stateless#18
Conversation
Greptile SummaryThis PR makes the hosted Streamable HTTP transport fully stateless so any replica can handle any request, fixing
Confidence Score: 5/5Safe to merge. The stateless path is well-isolated and AsyncLocalStorage correctly scopes each per-request transport to its HTTP response. The core mechanism is sound, the port:0 fix is correct, and the regression tests directly cover the production failure scenario. The patch file deserves a second look if session-based mode is ever re-enabled, given the broadcast error log demotion to debug. Important Files Changed
Reviews (2): Last reviewed commit: "fix: address Greptile review feedback" | Re-trigger Greptile |
What does this PR do?
Makes the hosted Streamable HTTP transport stateless so requests can be routed to any replica without producing
Session not founderrors.The bundled
mcp-frameworkexposessession.enabledbut did not implement the disabled path. The patch now creates a request-scoped SDK transport with no session ID and routes responses through async request context. Cross-instance regression tests cover initialization on one replica followed bytools/liston another.This also restores the existing content-download CI step by sourcing versioned SDK examples from their new canonical repository,
appwrite/specs, and runs the regression tests in CI.How was it tested?
bun install --force --frozen-lockfilebun run testbun run buildbun run download-contentgit diff --checkRelated issues
No linked issue. This fixes the production multi-replica MCP session routing failure observed with Cursor and
mcp-remote.