modelcontextprotocol / modelcontextprotocol/kotlin-sdk
SEP-2243: Send required Mcp-Method/Mcp-Name HTTP headers
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 248
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 23
Description
Description
Per SEP-2243 (HTTP Standard Headers), MCP clients MUST send the following HTTP headers on POST requests:
Mcp-Method: Set to the JSON-RPCmethodvalue from the request body (REQUIRED on every POST)Mcp-Name: Set fromparams.name(for tools/call, prompts/get) orparams.uri(for resources/read, resources/subscribe, resources/unsubscribe) when present
Context
The cxxmcp (C++ SDK) conformance testing revealed that the official conformance test suite's reference client (TypeScript SDK) does not send these headers, making the conformance suite self-contradictory. See:
- typescript-sdk#2176 — TypeScript SDK bug report
- conformance#323 — Conformance suite self-contradiction
- typescript-sdk#2178 — Fix PR for TypeScript SDK
Impact
Servers that enforce SEP-2243 (reject missing Mcp-Method with HTTP 400) are incompatible with clients that don't send these headers. This affects cross-SDK interoperability.
Request
Please implement Mcp-Method and Mcp-Name header support per SEP-2243 to ensure cross-SDK compatibility.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing SEP-2243 and tracing where the Kotlin SDK constructs HTTP POST requests. Confirm how JSON-RPC method and params.name or params.uri are available, then verify that applicable requests send the required headers and that missing names are handled as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100