Skip to content

Conversation

@pcarleton
Copy link
Member

Summary

  • Add three new conformance scenarios to test that clients correctly use the appropriate token endpoint authentication method based on server metadata:

    • auth/token-endpoint-auth-basic: Tests client_secret_basic (HTTP Basic auth)
    • auth/token-endpoint-auth-post: Tests client_secret_post (credentials in body)
    • auth/token-endpoint-auth-none: Tests public client (no auth)
  • Extend createAuthServer helper with new options:

    • tokenEndpointAuthMethodsSupported for configurable metadata
    • onTokenRequest callback now receives full Request object
    • onRegistrationRequest callback for custom client credentials

This supports testing the client_secret_basic authentication support being added in:

Test plan

  • All three scenarios pass with TypeScript SDK client
  • All three scenarios pass with Python SDK client (with client_secret_basic support)
  • Existing tests continue to pass

pcarleton and others added 4 commits November 20, 2025 13:28
Adds a new 'metadata' suite that runs just the auth/metadata-* scenarios
for faster iteration when testing metadata discovery specifically.

Usage: node dist/index.mjs client --suite metadata --command "..."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Set assert_lefthook_installed to false so the hooks gracefully skip
if lefthook is not installed on the system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add three new scenarios to test that clients correctly use the
appropriate authentication method based on server metadata:
- auth/token-endpoint-auth-basic: Tests client_secret_basic (HTTP Basic)
- auth/token-endpoint-auth-post: Tests client_secret_post
- auth/token-endpoint-auth-none: Tests public client (no auth)

Each scenario configures the server to only support one auth method
and verifies the client uses the correct method in token requests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Extend createAuthServer helper with:
- tokenEndpointAuthMethodsSupported option for metadata
- onTokenRequest callback now receives full Request object
- onRegistrationRequest callback for custom client credentials

This eliminates the duplicate auth server implementation in
token-endpoint-auth.ts and reduces code by ~140 lines.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 20, 2025

Open in StackBlitz

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

commit: 0d0c631

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