mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
Merge branch 'main' into 2-14-deprecations
This commit is contained in:
commit
98d9a2b9d0
34 changed files with 1266 additions and 373 deletions
|
|
@ -5,21 +5,18 @@ sidebarTitle: descope
|
|||
|
||||
# `fastmcp.server.auth.providers.descope`
|
||||
|
||||
|
||||
Descope authentication provider for FastMCP.
|
||||
|
||||
This module provides DescopeProvider - a complete authentication solution that integrates
|
||||
with Descope's OAuth 2.1 and OpenID Connect services, supporting Dynamic Client Registration (DCR)
|
||||
for seamless MCP client authentication.
|
||||
|
||||
|
||||
## Classes
|
||||
|
||||
### `DescopeProviderSettings` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/providers/descope.py#L25" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
### `DescopeProvider` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/providers/descope.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
|
||||
Descope metadata provider for DCR (Dynamic Client Registration).
|
||||
|
||||
This provider implements Descope integration using metadata forwarding.
|
||||
|
|
@ -29,20 +26,20 @@ as a resource server.
|
|||
|
||||
IMPORTANT SETUP REQUIREMENTS:
|
||||
|
||||
1. Enable Dynamic Client Registration in Descope Console:
|
||||
- Go to the [Inbound Apps page](https://app.descope.com/apps/inbound) of the Descope Console
|
||||
- Click **DCR Settings**
|
||||
- Enable **Dynamic Client Registration (DCR)**
|
||||
- Define allowed scopes
|
||||
1. Create an MCP Server in Descope Console:
|
||||
|
||||
2. Note your Project ID:
|
||||
- Save your Project ID from [Project Settings](https://app.descope.com/settings/project)
|
||||
- Example: P2abc...123
|
||||
- Go to the [MCP Servers page](https://app.descope.com/mcp-servers) of the Descope Console
|
||||
- Create a new MCP Server
|
||||
- Ensure that **Dynamic Client Registration (DCR)** is enabled
|
||||
- Note your Well-Known URL
|
||||
|
||||
2. Note your Well-Known URL:
|
||||
- Save your Well-Known URL from [MCP Server Settings](https://app.descope.com/mcp-servers)
|
||||
- Format: `https://.../v1/apps/agentic/P.../M.../.well-known/openid-configuration`
|
||||
|
||||
For detailed setup instructions, see:
|
||||
https://docs.descope.com/identity-federation/inbound-apps/creating-inbound-apps#method-2-dynamic-client-registration-dcr
|
||||
|
||||
|
||||
**Methods:**
|
||||
|
||||
#### `get_routes` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/providers/descope.py#L126" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
|
@ -57,6 +54,6 @@ This returns the standard protected resource routes plus an authorization server
|
|||
metadata endpoint that forwards Descope's OAuth metadata to clients.
|
||||
|
||||
**Args:**
|
||||
- `mcp_path`: The path where the MCP endpoint is mounted (e.g., "/mcp")
|
||||
This is used to advertise the resource URL in metadata.
|
||||
|
||||
- `mcp_path`: The path where the MCP endpoint is mounted (e.g., "/mcp")
|
||||
This is used to advertise the resource URL in metadata.
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ IMPORTANT SETUP REQUIREMENTS:
|
|||
|
||||
2. Environment Configuration:
|
||||
- Set SCALEKIT_ENVIRONMENT_URL (e.g., https://your-env.scalekit.com)
|
||||
- Set SCALEKIT_CLIENT_ID from your OAuth application
|
||||
- Set SCALEKIT_RESOURCE_ID from your created resource
|
||||
- Set MCP_URL to your FastMCP server's public URL
|
||||
- Set BASE_URL to your FastMCP server's public URL
|
||||
- (Optional) Set SCALEKIT_REQUIRED_SCOPES to enforce token scopes
|
||||
|
||||
For detailed setup instructions, see:
|
||||
https://docs.scalekit.com/mcp/overview/
|
||||
|
|
@ -61,4 +61,3 @@ metadata endpoint that forwards Scalekit's OAuth metadata to clients.
|
|||
**Args:**
|
||||
- `mcp_path`: The path where the MCP endpoint is mounted (e.g., "/mcp")
|
||||
This is used to advertise the resource URL in metadata.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue