modelcontextprotocol / modelcontextprotocol/java-sdk
SEP-2243: HTTP Header Standardization for Streamable HTTP Transport
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 3.7k
- Fork
- 1.1k
- Merge medio
- 1g 15h
- PR unite (30g)
- 9
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal client di trasporto HTTP streamable del Java SDK e traccia il modo in cui vengono costruite le richieste POST. Usa SEP-2243 e i campi del corpo della richiesta descritti qui per determinare i valori degli header; il lavoro è completo quando le richieste POST applicabili inviano Mcp-Method e Mcp-Name, così che i server che applicano lo standard le accettino.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100