π The fast, Pythonic way to build MCP servers and clients.
chore: Update SDK documentation (#2157)
marvin-context-protocol[bot]77ae1cf2b58f
diff --git a/docs/python-sdk/fastmcp-server-auth-oauth_proxy.mdx b/docs/python-sdk/fastmcp-server-auth-oauth_proxy.mdxindex 0877bcad2..0781b0a26 100644--- a/docs/python-sdk/fastmcp-server-auth-oauth_proxy.mdx+++ b/docs/python-sdk/fastmcp-server-auth-oauth_proxy.mdx@@ -260,7 +260,7 @@ Handles provider-specific requirements:**Methods:**-#### `get_client` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L822" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_client` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L813" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_client(self, client_id: str) -> OAuthClientInformationFull | None@@ -272,7 +272,7 @@ provided to the DCR client during registration, not the upstream client ID.For unregistered clients, returns None (which will raise an error in the SDK).-#### `register_client` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L837" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_client` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L828" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_client(self, client_info: OAuthClientInformationFull) -> None@@ -286,7 +286,7 @@ redirect URI will likely be localhost or unknown to the proxied IDP. Theproxied IDP only knows about this server's fixed redirect URI.-#### `authorize` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L883" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `authorize` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L874" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonauthorize(self, client: OAuthClientInformationFull, params: AuthorizationParams) -> str@@ -300,7 +300,7 @@ Flow:3. Consent handler redirects to upstream IdP if approved/already approved-#### `load_authorization_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L940" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_authorization_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L931" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_authorization_code(self, client: OAuthClientInformationFull, authorization_code: str) -> AuthorizationCode | None@@ -312,7 +312,7 @@ Look up our client code and return authorization code objectwith PKCE challenge for validation.-#### `exchange_authorization_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L982" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_authorization_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L973" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonexchange_authorization_code(self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode) -> OAuthToken@@ -330,7 +330,7 @@ Implements the token factory pattern:PKCE validation is handled by the MCP framework before this method is called.-#### `load_refresh_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1152" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_refresh_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str) -> RefreshToken | None@@ -339,7 +339,7 @@ load_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str)Load refresh token from local storage.-#### `exchange_refresh_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1160" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_refresh_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1151" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonexchange_refresh_token(self, client: OAuthClientInformationFull, refresh_token: RefreshToken, scopes: list[str]) -> OAuthToken@@ -356,7 +356,7 @@ Implements two-tier refresh:6. Keep same FastMCP refresh token (unless upstream rotates)-#### `load_access_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1374" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_access_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1365" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_access_token(self, token: str) -> AccessToken | None@@ -375,7 +375,7 @@ The FastMCP JWT is a reference token - all authorization data comesfrom validating the upstream token via the TokenVerifier.-#### `revoke_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1438" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `revoke_token` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1429" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrevoke_token(self, token: AccessToken | RefreshToken) -> None@@ -387,7 +387,7 @@ Removes tokens from local storage and attempts to revoke them withthe upstream server if a revocation endpoint is configured.-#### `get_routes` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1482" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy.py#L1473" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_routes(self, mcp_path: str | None = None) -> list[Route]diff --git a/docs/python-sdk/fastmcp-server-http.mdx b/docs/python-sdk/fastmcp-server-http.mdxindex d06e214a0..40ae6fb9b 100644--- a/docs/python-sdk/fastmcp-server-http.mdx+++ b/docs/python-sdk/fastmcp-server-http.mdx@@ -7,13 +7,13 @@ sidebarTitle: http## Functions-### `set_http_request` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L75" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `set_http_request` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L77" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_http_request(request: Request) -> Generator[Request, None, None]```-### `create_base_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L99" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `create_base_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L101" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_base_app(routes: list[BaseRoute], middleware: list[Middleware], debug: bool = False, lifespan: Callable | None = None) -> StarletteWithLifespan@@ -32,7 +32,7 @@ Create a base Starlette app with common middleware and routes.- A Starlette application-### `create_sse_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L127" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `create_sse_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L129" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_sse_app(server: FastMCP[LifespanResultT], message_path: str, sse_path: str, auth: AuthProvider | None = None, debug: bool = False, routes: list[BaseRoute] | None = None, middleware: list[Middleware] | None = None) -> StarletteWithLifespan@@ -54,7 +54,7 @@ Returns:A Starlette application with RequestContextMiddleware-### `create_streamable_http_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L253" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `create_streamable_http_app` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L255" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_streamable_http_app(server: FastMCP[LifespanResultT], streamable_http_path: str, event_store: EventStore | None = None, auth: AuthProvider | None = None, json_response: bool = False, stateless_http: bool = False, debug: bool = False, routes: list[BaseRoute] | None = None, middleware: list[Middleware] | None = None) -> StarletteWithLifespan@@ -80,23 +80,23 @@ Return an instance of the StreamableHTTP server app.## Classes-### `StreamableHTTPASGIApp` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L30" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `StreamableHTTPASGIApp` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L32" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>ASGI application wrapper for Streamable HTTP server transport.-### `StarletteWithLifespan` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L68" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `StarletteWithLifespan` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>**Methods:**-#### `lifespan` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `lifespan` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L72" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonlifespan(self) -> Lifespan[Starlette]```-### `RequestContextMiddleware` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L83" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `RequestContextMiddleware` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/http.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Middleware that stores each request in a ContextVardiff --git a/docs/python-sdk/fastmcp-utilities-cli.mdx b/docs/python-sdk/fastmcp-utilities-cli.mdxindex eb4691358..4ed3ab1da 100644--- a/docs/python-sdk/fastmcp-utilities-cli.mdx+++ b/docs/python-sdk/fastmcp-utilities-cli.mdx@@ -7,7 +7,7 @@ sidebarTitle: cli## Functions-### `is_already_in_uv_subprocess` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L28" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `is_already_in_uv_subprocess` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L27" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonis_already_in_uv_subprocess() -> bool@@ -17,7 +17,7 @@ is_already_in_uv_subprocess() -> boolCheck if we're already running in a FastMCP uv subprocess.-### `load_and_merge_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L33" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `load_and_merge_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L32" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_and_merge_config(server_spec: str | None, **cli_overrides) -> tuple[MCPServerConfig, str]@@ -37,7 +37,7 @@ run, inspect, and dev commands.- Tuple of (MCPServerConfig, resolved_server_spec)-### `log_server_banner` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L151" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `log_server_banner` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/cli.py#L170" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonlog_server_banner(server: FastMCP[Any], transport: Literal['stdio', 'http', 'sse', 'streamable-http']) -> None