Secure your FastMCP server with AuthKit by WorkOS
New in version: 2.11.0
This guide shows you how to secure your FastMCP server using WorkOS’s AuthKit, a complete authentication and user management solution. This integration uses the Remote OAuth pattern, where AuthKit handles user login and your FastMCP server validates the tokens.
http://localhost:8000
).Enable Dynamic Client Registration
Note Your AuthKit Domain
https://your-project-12345.authkit.app
. You’ll need this for your FastMCP server configuration.AuthKitProvider
to handle all the OAuth integration automatically:
fastmcp
CLI to run it locally. Assuming you’ve saved the above code to server.py
(after replacing the authkit_domain
and base_url
with your actual values!), you can run the following command: