Skip to content

feat(sep-1932): Client check for dpop_jkt - #523

Draft
nbarbettini wants to merge 2 commits into
modelcontextprotocol:mainfrom
nbarbettini:feat/1932-client-dpop-jkt
Draft

nbarbettini wants to merge 2 commits into
modelcontextprotocol:mainfrom
nbarbettini:feat/1932-client-dpop-jkt

Conversation

@nbarbettini

Copy link
Copy Markdown
Contributor

Discussed here: https://discord.com/channels/1358869848138059966/1552316422951149639

Motivation and Context

There is a short window between authorization and token exchange where a stolen authorization code could be redeemed using an attacker-controlled DPoP key. The dpop_jkt authorization parameter closes that gap by declaring which key may redeem the code.

This change adds a client check for dpop_jkt assuming SEP-1932 ends up with a SHOULD for dpop_jkt.

The test client sends dpop_jkt, and the test authorization server stores it with the specific authorization code. During token exchange, the server compares it with the key in the DPoP proof. Omitting dpop_jkt produces a WARNING; sending a mismatched thumbprint produces a FAILURE. Authorization state is tracked per code internally so overlapping flows cannot overwrite each other.

How Has This Been Tested?

  • Full test suite: 627 tests passed
  • Typecheck, ESLint, and Prettier passed
  • Positive test for a matching dpop_jkt
  • Negative tests for omission and mismatch
  • Test covering overlapping authorization flows with different DPoP keys

Breaking Changes

No API or configuration changes.

Clients participating in the DPoP extension may receive a new WARNING if they omit dpop_jkt, assuming SEP-1932 ends up with a SHOULD.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

nbarbettini and others added 2 commits September 24, 2026 14:38
…pop_jkt

SEP-1932 adopts RFC 9449 §10, so a client binds its authorization code to its DPoP key and the test authorization server rejects a mismatched thumbprint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@523

commit: abc3cb2

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant