Enable authentication with OAuth providers that don’t support Dynamic Client Registration.
New in version: 2.12.0
OAuth Proxy enables your FastMCP server to authenticate with OAuth providers that don’t support Dynamic Client Registration (DCR). This includes virtually all traditional OAuth providers: GitHub, Google, Azure, Facebook, Discord, and most enterprise identity systems.
While MCP clients expect to dynamically register and obtain credentials, these providers require manual app registration through their developer consoles. OAuth Proxy bridges this gap by presenting a DCR-compliant interface to MCP clients while using your pre-registered credentials with the upstream provider.
RemoteAuthProvider
OAuthProxy
(this guide)
Provider Type | DCR Support | Registration Method | Examples |
---|---|---|---|
Modern Auth Platforms | ✅ Yes | Automatic via API | WorkOS AuthKit, Some OIDC providers |
Traditional OAuth | ❌ No | Manual via console | GitHub, Google, Azure, Discord, Facebook |
Enterprise SSO | ❌ No | IT Administrator | Okta, AD FS, PingIdentity |
http://localhost:54321/callback
)OAuthProxy
class provides the complete proxy implementation:
https://github.com/login/oauth/authorize
)https://github.com/login/oauth/access_token
)TokenVerifier
instance to validate the provider’s tokenshttps://your-server.com
)"http://localhost:*"
, "https://*.example.com/*"
).None
(default): Only localhost redirect URIs allowed (http://localhost:*
, http://127.0.0.1:*
)[]
: All redirect URIs allowed (not recommended for production)allowed_client_redirect_uris
parameter:Provider | Token Type | Verification Method | Built-in Support |
---|---|---|---|
GitHub | Opaque | API validation (/user endpoint) | ✅ GitHubProvider |
JWT | JWKS signature verification | ✅ GoogleProvider | |
Azure AD | JWT | JWKS signature verification | Configure JWTVerifier |
Discord | Opaque | API validation | ✅ DiscordOAuthProxyProvider |
Custom | Varies | Implement TokenVerifier | Extend base class |
TokenVerifier
:
JWTVerifier
with the provider’s JWKS endpointTokenVerifier
to validate via the provider’s API