Skip to content

WIP: SEP-990 conformance test improvements (review feedback + validation)#146

Closed
pcarleton wants to merge 7 commits intomainfrom
paulc/pcp-5-review-xaa-conformance-pr-110-sep-990-sagar-okta
Closed

WIP: SEP-990 conformance test improvements (review feedback + validation)#146
pcarleton wants to merge 7 commits intomainfrom
paulc/pcp-5-review-xaa-conformance-pr-110-sep-990-sagar-okta

Conversation

@pcarleton
Copy link
Member

Draft PR for reviewing the diff of changes on top of #110.

Changes on top of PR #110

Address PR review comments (daf77b8)

  • Delete unused separate token-exchange and jwt-bearer scenarios (only keep complete e2e flow)
  • Add missing required token exchange params per SEP-990: requested_token_type, audience, resource
  • Use idp_client_id for token exchange, not AS client_id
  • Client discovers resource and auth server via PRM metadata instead of receiving auth_server_url via context
  • Server IdP handler verifies all required token exchange params with detailed error messages

Add client auth and ID-JAG validation (f1778ee)

  • Client authenticates to AS via client_secret_basic (Authorization: Basic) per Section 5
  • AS verifies ID-JAG typ header is oauth-id-jag+jwt
  • AS verifies ID-JAG client_id matches authenticating client (Section 5.1)
  • AS verifies ID-JAG resource matches MCP server resource
  • Client checks AS metadata grant_types_supported includes jwt-bearer
  • IdP sets ID-JAG client_id to AS client_id (not IdP client_id) per Section 6.1

Bug fixes (406ee27)

  • Share MockTokenVerifier between AS and MCP server (matches all other auth scenarios)
  • Remove private_key_jwt from advertised auth methods (only client_secret_basic is implemented)

Related: #110

sagar-okta and others added 7 commits January 30, 2026 18:27
- Delete unused separate token-exchange and jwt-bearer scenarios,
  keeping only the complete e2e flow (review comment)
- Add missing required token exchange params per SEP-990 spec:
  requested_token_type, audience, resource (review comment)
- Use ctx.idp_client_id for token exchange client_id instead of
  AS client_id (review comment)
- Client discovers resource and auth server via PRM metadata
  instead of receiving auth_server_url via context (review comment)
- Server IdP handler verifies all required token exchange params
  with detailed error messages (review comment)
- Add resource, client_id, jti claims to ID-JAG per SEP-990 spec
- Verify ID-JAG typ header (oauth-id-jag+jwt) in JWT bearer handler
- Remove auth_server_url from context schema
Server-side (AS) now verifies:
- client_secret_basic authentication on JWT bearer grant
- ID-JAG typ header is oauth-id-jag+jwt
- ID-JAG client_id claim matches the authenticating client (Section 5.1)
- ID-JAG resource claim matches the MCP server resource identifier
- Client credentials provided via context (client_secret)

Server-side (IdP) now:
- Sets ID-JAG client_id to the MCP Client's AS client_id (not the
  IdP client_id), per Section 6.1

Example client now:
- Authenticates to AS via client_secret_basic (Authorization: Basic)
  instead of sending client_id in body
- Checks AS metadata grant_types_supported includes jwt-bearer
  before attempting the flow
- Add shared MockTokenVerifier between AS and MCP server so the MCP
  server only accepts tokens actually issued by the auth server,
  matching the pattern used by all other auth scenarios
- Remove private_key_jwt from tokenEndpointAuthMethodsSupported since
  the handler only implements client_secret_basic
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 13, 2026

Open in StackBlitz

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

commit: 406ee27

@pcarleton pcarleton closed this Feb 13, 2026
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.

2 participants