Authenticate FastMCP servers with WorkOS Connect
New in version: 2.12.0
Secure your FastMCP server with WorkOS Connect authentication. This integration uses the OAuth Proxy pattern to handle authentication through WorkOS Connect while maintaining compatibility with MCP clients.
http://localhost:8000
)Create OAuth Application
Get Credentials
client_
)https://your-app.authkit.app
)Configure Redirect URI
http://localhost:8000/auth/callback
(for development)/auth/callback
/auth/callback
, but you can customize it using the redirect_path
parameter.WorkOSProvider
:
WorkOSProvider()
.
FASTMCP_SERVER_AUTH=WORKOS
automatically provisions WorkOS as the default auth provider for all FastMCP servers. This is optional - you can still manually instantiate WorkOSProvider()
without it. Learn more about registered providers.WORKOS
to automatically provision WorkOS authentication for FastMCP servers without explicitly passing an auth parameter.client_01K33Y6GGS7T3AWMPJWKW42Y3Q
)https://your-app.authkit.app
)["openid", "profile", "email"]
).env
file:
https://your-app.authkit.app
)