[Client] Implement Authorization Server Metadata discovery (RFC 8414)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- php
- Domain
- api, authentication
Research direction
Start by reviewing Mcp\Client\Auth\AuthorizationServerMetadataDiscoverer and the existing Mcp\Server\Transport\Http\OAuth\OidcDiscovery for compatible metadata shapes. Check the auth/metadata-* and auth/scope-from-scopes-supported conformance scenarios, then verify RFC 8414 discovery, OIDC fallback, issuer caching, and the requested unit-test coverage.
Written by the indexing model from the issue text.
Description
Context
Once the AS issuer is known (from PRM), the client must fetch its metadata at /.well-known/oauth-authorization-server (RFC 8414) to learn the authorization_endpoint, token_endpoint, registration_endpoint, scopes_supported, token_endpoint_auth_methods_supported, and grant_types_supported.
Scope
Mcp\Client\Auth\AuthorizationServerMetadataDiscoverer.- Cache resolved metadata per issuer (TTL via PSR-16 if
TokenStorageis backed by it). - Fall back to OpenID Connect discovery (
/.well-known/openid-configuration) when RFC 8414 endpoint 404s.
Conformance scenarios unblocked
auth/metadata-* (full set), auth/scope-from-scopes-supported.
Dependencies
Blocked by: #317 (PRM provides the issuer URL).
Acceptance
- Unit tests covering RFC 8414 + OIDC fallback.
- Reuses existing
Mcp\Server\Transport\Http\OAuth\OidcDiscoveryfor shape parity if practical.
cc @soyuka
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 173
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/php-sdk
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan OpenServer
Difficulty 1/5 Under an hour Newbie friendliness 78/100
modelcontextprotocol/php-sdk#468 · 2 comments ·
-
needs confirmation needs maintainer action Server
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/php-sdk#398 · 1 reaction ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
modelcontextprotocol/php-sdk#510 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
modelcontextprotocol/php-sdk#504 ·
All issues in modelcontextprotocol/php-sdk
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·