[Client][Auth] SEP-2352: Key DCR registrations and tokens by AS issuer; reject cross-AS credential reuse

Open
#361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php

Research direction

Start with TokenStorage (#315), DCR (#320), and the PRM/AS metadata discovery work in #317 and #318. Review the server metadata document under src/Server/Transport/Http/OAuth/ and trace how the advertised AS issuer reaches client credential and token storage. Done means credentials and token cache entries are issuer-scoped and cross-AS reuse is rejected while CIMD client IDs remain portable.

Written by the indexing model from the issue text.

Description

2026-07-28 auth Client enhancement improves spec compliance

Implements SEP-2352 for the MCP Spec 2026-07-28 release.

Tracked by umbrella #338.

Spec summary

Clarifies that clients must key DCR/pre-registered credentials by AS issuer, maintain separate registration state per AS, and error on AS mismatch. CIMD client_ids remain portable. Clients MUST NOT assume cross-AS credential validity.

PHP SDK changes

  • TokenStorage (#315) and DCR (#320) must be indexed by AS issuer URL, not just by MCP server URL.
  • Token cache key should be (resource_server, as_issuer) tuples.
  • PRM/AS metadata discovery (#317, #318) must drive the binding.
  • Client must error if a stored credential's bound issuer != the issuer currently advertised by the resource.
  • Server-side: minimal — server PRM metadata document in src/Server/Transport/Http/OAuth/ must continue to advertise its AS issuer unambiguously.

Related

  • Umbrella #338
  • Extends #315 (TokenStorage) and #320 (DCR) with per-issuer keying
Dominant language
PHP
Stars
1.6k
Forks
173
Avg merge
2d 49m
Merged PRs (30d)
23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/php-sdk

All issues in modelcontextprotocol/php-sdk

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.