feat: add auth-test-server for OAuth conformance testing#1384
Open
feat: add auth-test-server for OAuth conformance testing#1384
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
This was referenced Jan 14, 2026
- MCP server with Bearer token authentication - Uses SDK's requireBearerAuth middleware - Validates tokens via AS introspection endpoint (RFC 7662) - Serves Protected Resource Metadata at /.well-known/oauth-protected-resource - Designed for server auth conformance tests
- Add admin-action tool requiring 'admin' scope - Add scope-checking middleware for privileged tools - Returns 403 insufficient_scope for missing admin scope - Add scopes_supported to PRM response
7206ab4 to
e9377fb
Compare
felixweinberger
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an auth-test-server to the conformance test suite for testing server-side OAuth implementation.
What's New
src/conformance/auth-test-server.ts- MCP server with OAuth authenticationsrc/conformance/README.mdwith documentationFeatures
requireBearerAuthmiddleware for authentication/.well-known/oauth-protected-resourceMCP_CONFORMANCE_AUTH_SERVER_URLenvironment variableUsage
# Start with a fake auth server MCP_CONFORMANCE_AUTH_SERVER_URL=http://localhost:3000 \ npx tsx src/conformance/auth-test-server.tsRelated
This server is used by the conformance repo's server auth tests (modelcontextprotocol/conformance#105).