Authorization for AI

Secure auth for MCP servers

Give AI agents access to your app with OAuth 2.1 flows, tool permissions, PKCE, scopes, and more.

Auth for MCP has never been easier

WorkOS AuthKit handles all the complexity of the OAuth Authorization Server. You just build the MCP tools and resource endpoints.


from fastmcp import FastMCP
from fastmcp.server.auth.providers.workos import AuthKitProvider

# The AuthKitProvider automatically discovers WorkOS endpoints
# and configures JWT token validation
auth_provider = AuthKitProvider(
    authkit_domain="https://your-project-12345.authkit.app",
    base_url="http://localhost:8000"  # Use your actual server URL
)

mcp = FastMCP(name="AuthKit Secured App", auth=auth_provider)
“WorkOS was the obvious choice for our MCP OAuth. Fast iteration, enterprise features built-in, and it just worked. Shipped Rube to everyone from indie devs to enterprise customers in two weeks.”
Rahul Tarak
Founding Engineer
“We wanted to ship an MCP server quickly and with WorkOS we were able to integrate in a matter of days to handle everything related to OAuth. This let us focus on building the best MCP server for our customers.”
Matthew McClure
Co-founder & VP of Developer Experience

Watch sessions from
MCP Night by WorkOS

Ready to get started with MCP?

This site uses cookies to improve your experience. Please accept the use of cookies on this site. You can review our cookie policy here and our privacy policy here. If you choose to refuse, functionality of this site will be limited.