Skip to content

fix: preserve MCP method metadata in HTTP transport - #309

Open
elibosley wants to merge 1 commit into
geelen:mainfrom
elibosley:fix/preserve-mcp-method-header
Open

fix: preserve MCP method metadata in HTTP transport#309
elibosley wants to merge 1 commit into
geelen:mainfrom
elibosley:fix/preserve-mcp-method-header

Conversation

@elibosley

Copy link
Copy Markdown

Summary

Some MCP gateways need the request method metadata that newer MCP clients provide. This adds an SDK fetch wrapper that preserves existing headers and injects Mcp-Method from JSON-RPC request bodies when absent.

Validation

  • added a local method-aware HTTP gateway regression test
  • pnpm test:unit
  • pnpm check
  • pnpm build

@devmaha

devmaha commented Aug 6, 2026

Copy link
Copy Markdown

We recently forked mcp-remote and fixed a number of auth-related problems. If it's helpful, you can try the fork here: https://github.com/abluva/mcp-remote

We'll be maintaining it going forward, so feel free to open issues or PRs there if you run into anything else.

Newly released version 2.0.0 supports MCP 2026-07-28 stateless remote transport; stdio bridge (initialize shim, _meta strip, list-method shims); --protocol CLI; localhost OAuth skip; SDK 1.30

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.

2 participants