modelcontextprotocol / modelcontextprotocol/python-sdk
Trailing slash in `.well-known/oauth-protected-resource` response may violate “Canonical Server URI” requirement
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 24.3k
- フォーク
- 4k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 31
説明
Question
As I understand it, https://your-mcp.com/.well-known/oauth-protected-resource should return:
{
"resource": "https://your-mcp.com",
"authorization_servers": [
"https://your-auth.com"
],
"scopes_supported": [],
"bearer_methods_supported": [
"header"
]
}
However, it actually returns:
{
"resource": "https://your-mcp.com/",
"authorization_servers": [
"https://your-auth.com/"
],
"scopes_supported": [],
"bearer_methods_supported": [
"header"
]
}
Note the trailing / in both the resource and authorization_servers values.
According to the MCP spec’s “resource-parameter-implementation” section, I believe this violates the requirement for canonicalization:
https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#resource-parameter-implementation
Is this a bug, or am I misunderstanding the requirement?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず .well-known/oauth-protected-resource のレスポンスの実装箇所を特定し、その resource と authorization_servers の値を、リンク先の MCP の正規化要件と比較します。末尾のスラッシュに関する想定動作を確認し、その後、レスポンスの値について、完了を検証できるようにテストカバレッジを特定するか追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, authentication
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100