π The fast, Pythonic way to build MCP servers and clients.
Update docstrings
William Easton9a076cd5f6c5
diff --git a/src/fastmcp/client/auth/oauth.py b/src/fastmcp/client/auth/oauth.pyindex a92f2f181..664dcc28c 100644--- a/src/fastmcp/client/auth/oauth.py+++ b/src/fastmcp/client/auth/oauth.py@@ -156,7 +156,7 @@ class OAuth(OAuthClientProvider):scopes: OAuth scopes to request. Can be aspace-separated string or a list of strings.client_name: Name for this client during registration- token_storage: AsyncKeyValue for token storage, the default disk store is used if not provided+ token_storage: An AsyncKeyValue-compatible token store, tokens are stored in memory if not providedadditional_client_metadata: Extra fields for OAuthClientMetadatacallback_port: Fixed port for OAuth callback (default: random available port)"""diff --git a/src/fastmcp/server/auth/oauth_proxy.py b/src/fastmcp/server/auth/oauth_proxy.pyindex 44c606f1b..61f366f27 100644--- a/src/fastmcp/server/auth/oauth_proxy.py+++ b/src/fastmcp/server/auth/oauth_proxy.py@@ -337,7 +337,7 @@ class OAuthProxy(OAuthProvider):Example: {"audience": "https://api.example.com"}extra_token_params: Additional parameters to forward to the upstream token endpoint.Useful for provider-specific parameters during token exchange.- client_storage: Storage implementation for OAuth client registrations.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""# Always enable DCR since we implement it locally for MCP clientsclient_registration_options = ClientRegistrationOptions(diff --git a/src/fastmcp/server/auth/oidc_proxy.py b/src/fastmcp/server/auth/oidc_proxy.pyindex b24673470..589e0e2d3 100644--- a/src/fastmcp/server/auth/oidc_proxy.py+++ b/src/fastmcp/server/auth/oidc_proxy.py@@ -236,8 +236,7 @@ class OIDCProxy(OAuthProxy):If None (default), only localhost redirect URIs are allowed.If empty list, all redirect URIs are allowed (not recommended for production).These are for MCP clients performing loopback redirects, NOT for the upstream OAuth app.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not providedtoken_endpoint_auth_method: Token endpoint authentication method for upstream server.Common values: "client_secret_basic", "client_secret_post", "none".If None, authlib will use its default (typically "client_secret_basic").diff --git a/src/fastmcp/server/auth/providers/auth0.py b/src/fastmcp/server/auth/providers/auth0.pyindex 59a82b65a..67ddf8b49 100644--- a/src/fastmcp/server/auth/providers/auth0.py+++ b/src/fastmcp/server/auth/providers/auth0.py@@ -106,8 +106,7 @@ class Auth0Provider(OIDCProxy):redirect_path: Redirect path configured in Auth0 applicationallowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.If None (default), all URIs are allowed. If empty list, no URIs are allowed.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""settings = Auth0ProviderSettings.model_validate({diff --git a/src/fastmcp/server/auth/providers/azure.py b/src/fastmcp/server/auth/providers/azure.pyindex 367203e43..a621a9ea3 100644--- a/src/fastmcp/server/auth/providers/azure.py+++ b/src/fastmcp/server/auth/providers/azure.py@@ -6,10 +6,9 @@ using the OAuth Proxy pattern for non-DCR OAuth flows.from __future__ import annotations-import httpx-from key_value.aio.protocols import AsyncKeyValuefrom typing import TYPE_CHECKING+from key_value.aio.protocols import AsyncKeyValuefrom pydantic import SecretStr, field_validatorfrom pydantic_settings import BaseSettings, SettingsConfigDict@@ -107,7 +106,6 @@ class AzureProvider(OAuthProxy):additional_authorize_scopes: list[str] | None | NotSetT = NotSet,allowed_client_redirect_uris: list[str] | NotSetT = NotSet,client_storage: AsyncKeyValue | None = None,- ):) -> None:"""Initialize Azure OAuth provider.@@ -127,8 +125,7 @@ class AzureProvider(OAuthProxy):permissions. These are not used for token validation.allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.If None (default), all URIs are allowed. If empty list, no URIs are allowed.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""settings = AzureProviderSettings.model_validate({diff --git a/src/fastmcp/server/auth/providers/github.py b/src/fastmcp/server/auth/providers/github.pyindex 86657f9b7..89692fbf1 100644--- a/src/fastmcp/server/auth/providers/github.py+++ b/src/fastmcp/server/auth/providers/github.py@@ -215,8 +215,7 @@ class GitHubProvider(OAuthProxy):timeout_seconds: HTTP request timeout for GitHub API callsallowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.If None (default), all URIs are allowed. If empty list, no URIs are allowed.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""settings = GitHubProviderSettings.model_validate(diff --git a/src/fastmcp/server/auth/providers/google.py b/src/fastmcp/server/auth/providers/google.pyindex a4cc37136..721613d92 100644--- a/src/fastmcp/server/auth/providers/google.py+++ b/src/fastmcp/server/auth/providers/google.py@@ -234,8 +234,7 @@ class GoogleProvider(OAuthProxy):timeout_seconds: HTTP request timeout for Google API callsallowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.If None (default), all URIs are allowed. If empty list, no URIs are allowed.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""settings = GoogleProviderSettings.model_validate(diff --git a/src/fastmcp/server/auth/providers/workos.py b/src/fastmcp/server/auth/providers/workos.pyindex d69576c58..e1b0631b7 100644--- a/src/fastmcp/server/auth/providers/workos.py+++ b/src/fastmcp/server/auth/providers/workos.py@@ -182,8 +182,7 @@ class WorkOSProvider(OAuthProxy):timeout_seconds: HTTP request timeout for WorkOS API callsallowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.If None (default), all URIs are allowed. If empty list, no URIs are allowed.- client_storage: Storage implementation for OAuth client registrations.- Defaults to file-based storage if not specified.+ client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided"""settings = WorkOSProviderSettings.model_validate(