Dual-era servers serve modern Tool schemas unchanged to legacy clients
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
まず、プロトコルネゴシエーション、ツール登録、tools/list エントリーポイントをたどり、次に各プロトコル世代で Tool.InputSchema がどのように保存・シリアライズされるかを調べます。legacy と modern のスキーマ要件を比較し、どのバージョン対応 API が適切かを判断します。完了条件は、共有ツールデータを変更せずに legacy クライアントが準拠したスキーマを受け取り、modern クライアントが正規スキーマを保持し、並行リクエストが安全なままであることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
The Go SDK supports both legacy MCP (2025-11-25 and earlier) and modern MCP (2026-07-28), but a server registers one static Tool.InputSchema and appears to return that same schema from tools/list regardless of the negotiated/requested protocol version.
That can make a dual-era server emit a schema that is valid under 2026-07-28 but outside the 2025-11-25 Tool.inputSchema envelope.
Specification boundary
In 2025-11-25, Tool.inputSchema permits only:
{
$schema?: string;
type: "object";
properties?: { [key: string]: object };
required?: string[];
}
SEP-2106, shipped in 2026-07-28, changes this to:
{ $schema?: string; type: "object"; [key: string]: unknown }
This explicitly permits root composition keywords such as anyOf, oneOf, and allOf for modern clients.
Reproduction shape
- Create a Go SDK server using the normal dual-era/default protocol support.
- Register a tool whose root input schema contains
type: "object"plusanyOf. - Connect a client using protocol version
2025-11-25. - Call
tools/list. - Observe that the modern schema is returned unchanged even though root
anyOfwas not representable by the legacyTool.inputSchemadefinition.
A concrete downstream incident is documented in github/github-mcp-server#3126. That incident also involved a model-provider restriction, but this issue is specifically about MCP protocol-era conformance.
Expected SDK behavior / API
The SDK should provide a deliberate way for dual-era servers to remain schema-conformant. Possible approaches:
- Validate tool schemas against every enabled protocol version at registration/startup and reject modern-only schemas unless the server supplies a legacy representation.
- Provide a version-aware tool/schema callback or
tools/listprojection hook so applications can supply a legacy-compatible representation. - Document that dual-era servers must keep canonical tool schemas within the legacy intersection unless they opt into version-specific representations.
I do not think the SDK should silently strip modern keywords, because removing constraints can change tool semantics.
Immutability and concurrency
Any version-specific representation should:
- deep-clone or use copy-on-write per inventory/list response;
- never mutate shared
Tool,InputSchema,Properties, or nested schema maps in place; - remain safe when legacy and modern requests are served concurrently;
- preserve the canonical modern schema for modern clients and caches.
Provider compatibility is separate
This issue should not attempt to solve Anthropic/OpenAI tool-schema subsets. A client using modern MCP may still need a provider-specific schema adapter before forwarding tools to an LLM API. That is independent of the MCP protocol version selected between client and server.
Existing issues checked
- #990 implemented SEP-2106 for the modern protocol.
- #455 addressed decoding incompatible schemas from older JSON Schema drafts.
I did not find an issue covering version-specific tools/list schema representations for a dual-era server.
- 主要言語
- Go
- スター
- 5.4k
- フォーク
- 623
- 平均マージ
- 22時間 10分
- マージ済み PR(30日)
- 30
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/go-sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
modelcontextprotocol/go-sdk#1557 ·
メンテナーはふだん 1 日以内に返信
-
Streamable HTTP (2026-07-28): tools/call with an out-of-range number in arguments fails because extractName decodes Arguments into any再び着手できるかも @beiryu が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/go-sdk#1534 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Expose generic `SendNotification` on `ServerSession` for custom protocol extensions再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンneeds investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/go-sdk#745 · コメント 13 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
modelcontextprotocol/go-sdk#1555 ·
メンテナーはふだん 1 日以内に返信
-
mcp: 2026-07-28 client runs elicitation and sampling handlers for standalone server requests再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
modelcontextprotocol/go-sdk#1552 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/go-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
apache/dubbo-admin#1659 ·
メンテナーはふだん 8 日以内に返信
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behind対応中かも @arshil42 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100