modelcontextprotocol / modelcontextprotocol/rust-sdk
SEP-2352 follow-up: key credential/state stores per authorization server
@alexhancock is already working on this.
Since Jul 16, 2026.
- Dominant language
- Rust
- Stars
- 3.9k
- Forks
- 645
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 36
Description
Follow-up to #879 / PR #965 (repurposed from a duplicate of #879).
PR #965 implements the SEP-2352 binding rule: stored credentials are stamped with the issuer that minted them, get_access_token() rejects issuer mismatches (AuthError::AuthorizationServerMismatch), and stale credentials are cleared on mismatch so the next flow re-registers with the new AS.
What it intentionally leaves out (from the PR's scope note): per-AS keying of custom credential/state stores. Today there is a single active credential set, so:
- Credentials for AS "A" are destroyed when the client talks to AS "B", even though the "A" credentials are still valid — switching back requires a full re-auth.
- A client connecting to multiple MCP servers backed by different authorization servers cannot hold credentials for both simultaneously.
Work: key stored credentials (and any registration state) by AS issuer so multiple credential sets can coexist, and select the right set based on the issuer of the currently discovered metadata.
Not required for 2026-07-28 conformance (the auth/authorization-server-migration scenario is covered by #965), so this is not on the 2026-07-28 milestone.
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.
Assessment
This issue has not been assessed yet.