mcp-data-platform-v0.13.2
Fix HTTP-Level OAuth Discovery for MCP Clients
- Added
/.well-known/oauth-protected-resourceendpoint (RFC 9728) so MCP clients can discover the authorization server - Added
MCPAuthGatewayHTTP middleware on the Streamable HTTP endpoint (/) that returns HTTP 401 withWWW-Authenticate: Bearer resource_metadata="<url>"when no credentials are present - Enhanced SSE endpoint with
RequireAuthWithOAuthmiddleware that includes the sameWWW-Authenticateheader in 401 responses
Root Cause
The Streamable HTTP endpoint had no HTTP-level auth middleware. It never returned HTTP 401, so Claude.ai had no trigger to start the OAuth flow. The server accepted the connection (tools/list bypasses auth), but every tool call failed with authentication failed: no API key found in context because the token was never acquired.
Auth Flow (Before)
- Claude.ai POSTs to
/— server accepts (no HTTP-level auth check) - tools/list succeeds (MCP auth middleware skips non-tool-call methods)
- tools/call fails — no Bearer token in request, all authenticators fail
Auth Flow (After)
- Claude.ai POSTs to
/— gets HTTP 401 +WWW-Authenticate: Bearer resource_metadata="<issuer>/.well-known/oauth-protected-resource" - Claude.ai fetches protected resource metadata — discovers authorization server
- Claude.ai fetches
/.well-known/oauth-authorization-server— gets authorization/token endpoints - Claude.ai completes OAuth flow (authorize → Keycloak login → callback → token exchange)
- Claude.ai retries with
Authorization: Bearer <jwt>— tool calls succeed
Compatibility
- Both Bearer token (OAuth) and API key (
X-API-Key) auth work simultaneously - API key clients are unaffected —
MCPAuthGatewaypasses through requests withX-API-Keyheader - SSE transport also updated with OAuth discovery support
Pull Requests
- #56 Fix HTTP-level OAuth discovery for MCP clients
Changelog
Others
Installation
Homebrew (macOS)
brew install txn2/tap/mcp-data-platformClaude Code CLI
claude mcp add mcp-data-platform -- mcp-data-platformDocker
docker pull ghcr.io/txn2/mcp-data-platform:v0.13.2Verification
All release artifacts are signed with Cosign. Verify with:
cosign verify-blob --bundle mcp-data-platform_0.13.2_linux_amd64.tar.gz.sigstore.json \
mcp-data-platform_0.13.2_linux_amd64.tar.gz