The 27 things nobody tells you about MCP auth.
Auth0, Keycloak, and Cloudflare Workers all promise drop-in OAuth for your MCP server. They all skip the parts that matter. Here's what their official docs leave out — and what costs you a weekend to discover the hard way.
The 7 DCR blockers Auth0's docs don't mention
Why Claude.ai's connector flow keeps dying on Auth0 — even after you flip 'Allow Skipping User Consent'. The third-party-client mode and the three checkboxes that finally make Dynamic Client Registration work.
Why your audience claim is silently empty
Realm-level vs client-level audience scopes, the issuer trailing-slash trap that fails JWT validation 100% of the time, and the one realm setting that decides whether refresh tokens survive a redeploy.
The 4 KV namespaces nobody warns you about
Why a stock OAuth-provider Worker can't issue tokens for Claude.ai without anonymous Dynamic Client Registration — and the signing-key rotation strategy that doesn't break live agent sessions.
Spend a weekend reverse-engineering it. Or spend €49.
Why this stack — what each provider unlocks
Same MCP server. Three doors in. The guide ships drop-in configs for whichever one your company already runs.
Why teams choose Auth0
- SSO, MFA, and 30+ social logins live on day one — without writing a single line of identity code
- The shortest path to SOC 2, HIPAA, and ISO 27001 audit checkboxes covering MCP access
- Login Actions: inject custom rules at token-issue time without ever redeploying your MCP server
Why teams choose Keycloak
- Self-hosted Okta-grade auth — zero per-user fees, no usage caps, your data stays on your own infra
- One realm = one tenant: hard data isolation by design, not by convention
- Native federation: Active Directory, LDAP, and 12 social IdPs from a single admin console
Why teams choose Cloudflare
- Token issuance at the edge — sub-50ms /authorize and /token responses from any region
- Free DDoS, bot mitigation, and rate-limiting on your auth endpoints — the same network that fronts 20% of the web
- Cloudflare Access in front: your team's existing corporate SSO protects every MCP request in five minutes
MCP Auth Setup Guide — Watchword Example
Production-grade authentication for Watchword — and the same blueprint for any MCP server your team ships. Bearer tokens, JWT/JWKS against Auth0, Keycloak, Cognito, and Cloudflare Access, OAuth 2.1 + PKCE for AI agents and chat clients discovery, and reverse-proxy patterns. Every step uses Watchword's real env vars, not pseudo-code.
- Bearer tokens (WORDSTORE_AUTH_TOKENS) for solo dev — and the precise signals that tell you to graduate from them
- JWT/JWKS validation against Auth0, Keycloak, Cognito, and Cloudflare Access — drop-in configs you can copy
- Cloudflare Worker OAuth 2.1 proxy: Authorization Code + PKCE + Dynamic Client Registration (RFC 7591) for Claude.ai connectors
- RFC 9728 Protected Resource Metadata so MCP clients auto-discover your authorization server
- Audience scoping (WORDSTORE_AUTH_JWT_AUDIENCE), per-user identity claims, and audit logs that name humans
- Reverse-proxy patterns: Caddy, Nginx, Traefik in front of Watchword — or any MCP server you build
- 27 production-verified setup gotchas across Auth0, Keycloak, and Cloudflare Workers — including the 7 Auth0 DCR blockers that aren't in the official docs
Your Watchword could already be online
Full OAuth is the next step, not the first one. If you need a public MCP endpoint today — for solo dev, demos, or just to get Claude.ai to see your server — start with bearer tokens on render.com. Blueprint deploy, Turso storage, HTTPS out of the box. Five minutes from fork to a working URL.
- One-button render.com Blueprint — three secrets and a git push, render builds the rest
- Bearer tokens via WORDSTORE_AUTH_TOKENS — the same ones the first chapter of this guide covers
- Same Watchword: when you outgrow bearer, swap to OAuth by editing env vars — no infra redeploy