modelcontextprotocol / modelcontextprotocol/java-sdk

SEP-2243: HTTP Header Standardization for Streamable HTTP Transport

未關閉
#990 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

area/server area/transport enhancement P1
主要語言
Java
星號
3.7k
分支
1.1k
平均合併
1 天 15 小時
30 天內合併 PR
9

描述

Description

Per SEP-2243 (HTTP Standard Headers), MCP clients MUST send the following HTTP headers on POST requests:

  • Mcp-Method: Set to the JSON-RPC method value from the request body (REQUIRED on every POST)
  • Mcp-Name: Set from params.name (for tools/call, prompts/get) or params.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:

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.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 Java SDK 的 streamable HTTP transport client 著手,追蹤 POST 請求的建構方式。使用 SEP-2243 和此處描述的請求本文欄位來決定標頭值;完成的標準是適用的 POST 請求傳送 Mcp-Method 和 Mcp-Name,讓執行該標準的伺服器能夠接受它們。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。