[v2] Add a runnable example for routing requests to tenant-specific APIs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
HTTP ガイドの https://ts.sdk.modelcontextprotocol.io/v2/serving/http#pass-authentication-through のセクションと examples/scoped-tools の例を読み、既存の認証 API と例の慣例を確認してください。2 つのモックバックエンドと、検証済みのテナント ID を承認済み URL に対応付けるサーバー側の map を備えた、実行可能な例を追加してください。並行リクエストと、テナントがない場合や不明な場合も扱ってください。例が実行でき、これらのケースがテストされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
I'm building a single MCP endpoint that serves multiple tenants, each with its own backend API. The HTTP guide shows how createMcpHandler receives verified authInfo, and examples/scoped-tools shows per-tool authorization. I couldn't find a runnable example that takes the next step and uses that verified identity to select the tenant's backend.
I tried this locally on v2.4.0 with two fictional tenants. Concurrent requests resolved to different configured backend URLs, and a request without tenant context was rejected. This passed in both the legacy and 2026-07-28 protocol modes using fixture identities.
What did you expect?
Would you be open to a small runnable example using the existing SDK APIs? I can contribute an example with two mock backends, a server-side map from verified tenant IDs to approved URLs, and tests for concurrent requests and missing or unknown tenants. Would this fit alongside scoped-tools or in the HTTP guide?
Code to reproduce
https://ts.sdk.modelcontextprotocol.io/v2/serving/http#pass-authentication-through
SDK version
@modelcontextprotocol/[email protected], @modelcontextprotocol/[email protected]
Area
Documentation
- 主要言語
- TypeScript
- スター
- 13.8k
- フォーク
- 2.5k
- 平均マージ
- 6日 23時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/typescript-sdk のほかの issue
-
v2
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#3270 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`callTool` with `allowInputRequired: true` throws on an `input_required` result when the tool declares an `outputSchema`対応中かも @mgoldsborough が 6 日前に担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/typescript-sdk#3249 ·
メンテナーはふだん 1 日以内に返信
-
TypeScript client accepts an unknown `resultType` in the first `server/discover` reply対応中かも @Tidehyc が 7 日前に担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#3235 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
UriTemplate.match() throws a TypeError on an empty expression it accepts対応中かも @yunusemrejs が 12 日前に担当しました。 オープンv1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
modelcontextprotocol/typescript-sdk#3221 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
`OpenIdProviderDiscoveryMetadataSchema` strips `revocation_endpoint`, so clients can't revoke against OIDC-only authorization servers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンv1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/typescript-sdk#3213 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/typescript-sdk の issue をすべて見る
似ている issue
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#212827 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Use one constant for the 10,000-character input limit対応中かも @NginxL が今日担当しました。 オープンgood first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aniru-dh21/snap-validate#51 ·
メンテナーはふだん 1 日以内に返信
-
dependencies effort: small good first issue priority: low
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
TMHSDigital/screencast-mcp#509 ·
メンテナーはふだん 1 日以内に返信
-
from-review tech-debt testing
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
blamechris/chroxy#9520 ·
メンテナーはふだん 1 日以内に返信