modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] Implement Dynamic Client Registration (RFC 7591) + pre-registered client support
オープン
まだ誰も着手していません。
auth
Client
enhancement
improves spec compliance
- 主要言語
- PHP
- スター
- 1.6k
- フォーク
- 173
- 平均マージ
- 2日 49分
- マージ済み PR(30日)
- 23
説明
Context
When no client credentials are pre-configured and AS metadata advertises registration_endpoint, the client must POST client_metadata to register itself dynamically. When credentials are pre-provided via Builder, skip registration.
Scope
Mcp\Client\Auth\DynamicClientRegistrar:- POST
client_metadata(client_name, redirect_uris, grant_types, token_endpoint_auth_method, software_id, software_version) toregistration_endpoint. - Persist returned
client_id/client_secret/client_secret_expires_atviaTokenStorageInterface.
- POST
Client\Builder::setOAuthClient(string $clientId, ?string $clientSecret = null)for pre-registration.
Conformance scenarios unblocked
auth/pre-registration (and unblocks every other auth scenario by providing a client_id).
Dependencies
Blocked by: #318 (AS metadata gives registration_endpoint).
Acceptance
- Unit tests for registration request shape + pre-registration bypass.
- Conformance:
auth/pre-registrationpasses.
cc @soyuka
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
#318 の AS メタデータ作業から始め、次に Mcp\Client\Auth\DynamicClientRegistrar、Client\Builder、TokenStorageInterface を調査します。auth/pre-registration の適合性シナリオを実行し、登録リクエストの構造と事前登録のバイパスについて要求された単体テストを追加します。シナリオが成功し、返された認証情報が永続化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- api, authentication
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100