feat: adds OAuth/OIDC authentication for MCP #11
Reference in New Issue
Block a user
Delete Branch "feature/mcp-oauth-oidc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add OAuth/OIDC support for the MCP endpoint while preserving the existing static MCP_TOKEN fallback.
The MCP server can now run in token, oauth, or oauth_or_token auth modes. OAuth access tokens are validated as JWTs using JWKS, issuer, audience, expiration, and the required mcp:tools scope. The server also exposes OAuth protected resource metadata at /.well-known/oauth-protected-resource and returns a WWW-Authenticate challenge for OAuth failures.
Update environment examples, README documentation, dependencies, and bump the service version to 0.3.0. Add tests for static fallback, valid OAuth JWTs, invalid JWTs, missing scopes, missing auth challenges, and protected resource metadata.