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
:
New in version:Β 2.12.1
For production deployments, use environment variables instead of hardcoding credentials.
fastmcp.server.auth.providers.workos.WorkOSProvider
to use WorkOS authentication.FASTMCP_SERVER_AUTH
.
client_01K33Y6GGS7T3AWMPJWKW42Y3Q
)https://your-app.authkit.app
)openid profile email
or ["openid","profile","email"]
).env
file:
https://your-app.authkit.app
)