From 5a87a4787daf184aef9fc63157afa6acf3ec46d1 Mon Sep 17 00:00:00 2001
From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
Date: Fri, 1 Aug 2025 17:56:15 -0700
Subject: [PATCH] Update AuthKit vocab (#1338)
---
docs/docs.json | 28 ++++++---------------
docs/integrations/authkit.mdx | 14 +++++------
src/fastmcp/server/auth/providers/workos.py | 14 +++++------
3 files changed, 21 insertions(+), 35 deletions(-)
diff --git a/docs/docs.json b/docs/docs.json
index 7ae4c5fa4..7dd4b3961 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -65,10 +65,7 @@
{
"group": "Essentials",
"icon": "cube",
- "pages": [
- "servers/server",
- "deployment/running-server"
- ]
+ "pages": ["servers/server", "deployment/running-server"]
},
{
"group": "Core Components",
@@ -111,10 +108,7 @@
{
"group": "Essentials",
"icon": "cube",
- "pages": [
- "clients/client",
- "clients/transports"
- ]
+ "pages": ["clients/client", "clients/transports"]
},
{
"group": "Core Operations",
@@ -140,10 +134,7 @@
{
"group": "Authentication",
"icon": "user-shield",
- "pages": [
- "clients/auth/oauth",
- "clients/auth/bearer"
- ]
+ "pages": ["clients/auth/oauth", "clients/auth/bearer"]
}
]
},
@@ -151,6 +142,7 @@
"group": "Integrations",
"pages": [
"integrations/anthropic",
+ "integrations/authkit",
"integrations/chatgpt",
"integrations/claude-code",
"integrations/claude-desktop",
@@ -162,8 +154,7 @@
"integrations/openai",
"integrations/openapi",
"integrations/permit",
- "integrations/starlette",
- "integrations/authkit"
+ "integrations/starlette"
]
},
{
@@ -190,17 +181,12 @@
},
{
"anchor": "What's New",
- "pages": [
- "updates",
- "changelog"
- ]
+ "pages": ["updates", "changelog"]
},
{
"anchor": "Community",
"icon": "users",
- "pages": [
- "community/showcase"
- ]
+ "pages": ["community/showcase"]
}
]
},
diff --git a/docs/integrations/authkit.mdx b/docs/integrations/authkit.mdx
index 36422258c..c04a414e3 100644
--- a/docs/integrations/authkit.mdx
+++ b/docs/integrations/authkit.mdx
@@ -1,7 +1,7 @@
---
-title: WorkOS AuthKit 🤝 FastMCP
-sidebarTitle: WorkOS AuthKit
-description: Secure your FastMCP server with WorkOS AuthKit
+title: AuthKit 🤝 FastMCP
+sidebarTitle: AuthKit
+description: Secure your FastMCP server with AuthKit by WorkOS
icon: shield-check
tag: NEW
---
@@ -10,20 +10,20 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
-This guide shows you how to secure your FastMCP server using **WorkOS AuthKit**, a complete authentication and user management solution. This integration uses the [**Remote OAuth**](/servers/auth/remote-oauth) pattern, where WorkOS handles user login and your FastMCP server validates the tokens.
+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**](/servers/auth/remote-oauth) pattern, where AuthKit handles user login and your FastMCP server validates the tokens.
## Configuration
### Prerequisites
Before you begin, you will need:
-1. A **WorkOS Account** and a new **Project**.
-2. An **AuthKit** instance configured within your WorkOS project.
+1. A **[WorkOS Account](https://workos.com/)** and a new **Project**.
+2. An **[AuthKit](https://www.authkit.com/)** instance configured within your WorkOS project.
3. Your FastMCP server's URL (can be localhost for development, e.g., `http://localhost:8000`).
### Step 1: AuthKit Configuration
-In your WorkOS Dashboard, navigate to your AuthKit instance and configure the following settings:
+In your WorkOS Dashboard, enable AuthKit and configure the following settings:
diff --git a/src/fastmcp/server/auth/providers/workos.py b/src/fastmcp/server/auth/providers/workos.py
index 7a71e4550..ff38b275c 100644
--- a/src/fastmcp/server/auth/providers/workos.py
+++ b/src/fastmcp/server/auth/providers/workos.py
@@ -32,9 +32,9 @@ class AuthKitProviderSettings(BaseSettings):
@register_provider("AUTHKIT")
class AuthKitProvider(AuthProvider):
- """WorkOS AuthKit metadata provider for DCR (Dynamic Client Registration).
+ """AuthKit metadata provider for DCR (Dynamic Client Registration).
- This provider implements WorkOS AuthKit integration using metadata forwarding
+ This provider implements AuthKit integration using metadata forwarding
instead of OAuth proxying. This is the recommended approach for WorkOS DCR
as it allows WorkOS to handle the OAuth flow directly while FastMCP acts
as a resource server.
@@ -56,7 +56,7 @@ class AuthKitProvider(AuthProvider):
```python
from fastmcp.server.auth.providers.workos import AuthKitProvider
- # Create WorkOS metadata provider (JWT verifier created automatically)
+ # Create AuthKit metadata provider (JWT verifier created automatically)
workos_auth = AuthKitProvider(
authkit_domain="https://your-workos-domain.authkit.app",
base_url="https://your-fastmcp-server.com",
@@ -75,13 +75,13 @@ class AuthKitProvider(AuthProvider):
required_scopes: list[str] | None | NotSetT = NotSet,
token_verifier: TokenVerifier | None = None,
):
- """Initialize WorkOS metadata provider.
+ """Initialize AuthKit metadata provider.
Args:
- authkit_domain: Your WorkOS AuthKit domain (e.g., "https://your-app.authkit.app")
+ authkit_domain: Your AuthKit domain (e.g., "https://your-app.authkit.app")
base_url: Public URL of this FastMCP server
required_scopes: Optional list of scopes to require for all requests
- token_verifier: Optional token verifier. If None, creates JWT verifier for WorkOS
+ token_verifier: Optional token verifier. If None, creates JWT verifier for AuthKit
"""
super().__init__()
@@ -112,7 +112,7 @@ class AuthKitProvider(AuthProvider):
self.token_verifier = token_verifier
async def verify_token(self, token: str) -> AccessToken | None:
- """Verify a WorkOS token using the configured token verifier."""
+ """Verify an AuthKit token using the configured token verifier."""
return await self.token_verifier.verify_token(token)
def customize_auth_routes(self, routes: list[BaseRoute]) -> list[BaseRoute]: