π The fast, Pythonic way to build MCP servers and clients.
chore: Update SDK documentation (#3901)
marvin-context-protocol[bot]c2dafc1c88bf
diff --git a/docs/python-sdk-pages.json b/docs/python-sdk-pages.jsonindex e55c709df..86cfabc6b 100644--- a/docs/python-sdk-pages.json+++ b/docs/python-sdk-pages.json@@ -196,6 +196,7 @@"python-sdk/fastmcp-server-auth-providers-in_memory","python-sdk/fastmcp-server-auth-providers-introspection","python-sdk/fastmcp-server-auth-providers-jwt",+ "python-sdk/fastmcp-server-auth-providers-keycloak","python-sdk/fastmcp-server-auth-providers-oci","python-sdk/fastmcp-server-auth-providers-propelauth","python-sdk/fastmcp-server-auth-providers-scalekit",@@ -315,6 +316,7 @@"python-sdk/fastmcp-server-tasks-__init__","python-sdk/fastmcp-server-tasks-capabilities","python-sdk/fastmcp-server-tasks-config",+ "python-sdk/fastmcp-server-tasks-context","python-sdk/fastmcp-server-tasks-elicitation","python-sdk/fastmcp-server-tasks-handlers","python-sdk/fastmcp-server-tasks-keys",diff --git a/docs/python-sdk/fastmcp-client-client.mdx b/docs/python-sdk/fastmcp-client-client.mdxindex efbf56f08..f4285ebe9 100644--- a/docs/python-sdk/fastmcp-client-client.mdx+++ b/docs/python-sdk/fastmcp-client-client.mdx@@ -7,7 +7,7 @@ sidebarTitle: client## Classes-### `ClientSessionState` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L97" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ClientSessionState` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L96" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Holds all session-related state for a Client instance.@@ -16,13 +16,13 @@ This allows clean separation of configuration (which is copied) fromsession state (which should be fresh for each new client instance).-### `CallToolResult` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L114" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CallToolResult` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L113" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Parsed result from a tool call.-### `Client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L124" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `Client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>MCP client that delegates connection management to a Transport instance.@@ -85,7 +85,7 @@ async with client:**Methods:**-#### `session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L371" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L370" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonsession(self) -> ClientSession@@ -94,7 +94,7 @@ session(self) -> ClientSessionGet the current active session. Raises RuntimeError if not connected.-#### `initialize_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L381" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `initialize_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L380" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoninitialize_result(self) -> mcp.types.InitializeResult | None@@ -103,7 +103,7 @@ initialize_result(self) -> mcp.types.InitializeResult | NoneGet the result of the initialization request.-#### `set_roots` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L385" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_roots` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L384" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_roots(self, roots: RootsList | RootsHandler) -> None@@ -112,7 +112,7 @@ set_roots(self, roots: RootsList | RootsHandler) -> NoneSet the roots for the client. This does not automatically call `send_roots_list_changed`.-#### `set_sampling_callback` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L389" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_sampling_callback` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L388" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_sampling_callback(self, sampling_callback: SamplingHandler, sampling_capabilities: mcp.types.SamplingCapability | None = None) -> None@@ -121,7 +121,7 @@ set_sampling_callback(self, sampling_callback: SamplingHandler, sampling_capabilSet the sampling callback for the client.-#### `set_elicitation_callback` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L404" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_elicitation_callback` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L403" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_elicitation_callback(self, elicitation_callback: ElicitationHandler) -> None@@ -130,7 +130,7 @@ set_elicitation_callback(self, elicitation_callback: ElicitationHandler) -> NoneSet the elicitation callback for the client.-#### `is_connected` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L412" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `is_connected` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L411" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonis_connected(self) -> bool@@ -139,7 +139,7 @@ is_connected(self) -> boolCheck if the client is currently connected.-#### `new` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L416" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `new` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L415" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonnew(self) -> Client[ClientTransportT]@@ -155,7 +155,7 @@ share state with the original client.- A new Client instance with the same configuration but disconnected state.-#### `initialize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L461" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `initialize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L476" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoninitialize(self, timeout: datetime.timedelta | float | int | None = None) -> mcp.types.InitializeResult@@ -183,13 +183,13 @@ capabilities, protocol version, and optional instructions.- `RuntimeError`: If the client is not connected or initialization times out.-#### `close` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L762" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `close` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L786" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonclose(self)```-#### `ping` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L768" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `ping` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L792" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonping(self) -> bool@@ -198,7 +198,7 @@ ping(self) -> boolSend a ping request.-#### `cancel` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L773" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `cancel` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L797" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncancel(self, request_id: str | int, reason: str | None = None) -> None@@ -207,7 +207,7 @@ cancel(self, request_id: str | int, reason: str | None = None) -> NoneSend a cancellation notification for an in-progress request.-#### `progress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L790" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `progress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L814" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonprogress(self, progress_token: str | int, progress: float, total: float | None = None, message: str | None = None) -> None@@ -216,7 +216,7 @@ progress(self, progress_token: str | int, progress: float, total: float | None =Send a progress notification.-#### `set_logging_level` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L802" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_logging_level` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L826" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_logging_level(self, level: mcp.types.LoggingLevel) -> None@@ -225,7 +225,7 @@ set_logging_level(self, level: mcp.types.LoggingLevel) -> NoneSend a logging/setLevel request.-#### `send_roots_list_changed` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L806" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `send_roots_list_changed` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L830" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonsend_roots_list_changed(self) -> None@@ -234,7 +234,7 @@ send_roots_list_changed(self) -> NoneSend a roots/list_changed notification.-#### `complete_mcp` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L812" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `complete_mcp` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L836" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncomplete_mcp(self, ref: mcp.types.ResourceTemplateReference | mcp.types.PromptReference, argument: dict[str, str], context_arguments: dict[str, Any] | None = None) -> mcp.types.CompleteResult@@ -257,7 +257,7 @@ containing the completion and any additional metadata.- `McpError`: If the request results in a TimeoutError | JSONRPCError-#### `complete` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L843" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `complete` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L867" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncomplete(self, ref: mcp.types.ResourceTemplateReference | mcp.types.PromptReference, argument: dict[str, str], context_arguments: dict[str, Any] | None = None) -> mcp.types.Completion@@ -279,7 +279,7 @@ include with the completion request. Defaults to None.- `McpError`: If the request results in a TimeoutError | JSONRPCError-#### `generate_name` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L870" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `generate_name` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/client.py#L894" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythongenerate_name(cls, name: str | None = None) -> strdiff --git a/docs/python-sdk/fastmcp-client-tasks.mdx b/docs/python-sdk/fastmcp-client-tasks.mdxindex 547d9bc92..874089b71 100644--- a/docs/python-sdk/fastmcp-client-tasks.mdx+++ b/docs/python-sdk/fastmcp-client-tasks.mdx@@ -114,8 +114,8 @@ with fallback to polling (reliable). Optimally wakes up immediatelyon status changes when server sends notifications/tasks/status.**Args:**-- `state`: Desired state ('submitted', 'working', 'completed', 'failed').- If None, waits for any terminal state (completed/failed)+- `state`: Desired state ('working', 'input_required', 'completed', 'failed', 'cancelled').+ If None, waits until the task exits the 'working' state (completed, failed, cancelled, input_required, etc.)- `timeout`: Maximum time to wait in seconds**Returns:**@@ -125,7 +125,7 @@ on status changes when server sends notifications/tasks/status.- `TimeoutError`: If desired state not reached within timeout-#### `cancel` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L272" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `cancel` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L287" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncancel(self) -> None@@ -140,7 +140,7 @@ Note: If server executed immediately (graceful degradation), this is a no-opas there's no server-side task to cancel.-### `ToolTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L294" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ToolTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L309" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Represents a tool call that may execute in background or immediately.@@ -151,7 +151,7 @@ or executes synchronously (graceful degradation per SEP-1686).**Methods:**-#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L336" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L351" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonresult(self) -> CallToolResult@@ -166,7 +166,7 @@ Otherwise waits for background task to complete and retrieves result.- The parsed tool result (same as call_tool returns)-### `PromptTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L396" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `PromptTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L411" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Represents a prompt call that may execute in background or immediately.@@ -177,7 +177,7 @@ or executes synchronously (graceful degradation per SEP-1686).**Methods:**-#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L427" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L442" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonresult(self) -> mcp.types.GetPromptResult@@ -192,7 +192,7 @@ Otherwise waits for background task to complete and retrieves result.- The prompt result with messages and description-### `ResourceTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L461" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ResourceTask` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L476" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Represents a resource read that may execute in background or immediately.@@ -203,7 +203,7 @@ or executes synchronously (graceful degradation per SEP-1686).**Methods:**-#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L497" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/client/tasks.py#L512" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonresult(self) -> list[mcp.types.TextResourceContents | mcp.types.BlobResourceContents]diff --git a/docs/python-sdk/fastmcp-resources-base.mdx b/docs/python-sdk/fastmcp-resources-base.mdxindex aab4a1dd7..d9f76a057 100644--- a/docs/python-sdk/fastmcp-resources-base.mdx+++ b/docs/python-sdk/fastmcp-resources-base.mdx@@ -10,7 +10,7 @@ Base classes and interfaces for FastMCP resources.## Classes-### `ResourceContent` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L38" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ResourceContent` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L39" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Wrapper for resource content with optional MIME type and metadata.@@ -21,7 +21,7 @@ other types (dict, list, BaseModel, etc.) are automatically JSON-serialized.**Methods:**-#### `to_mcp_resource_contents` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L93" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_mcp_resource_contents` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L94" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_mcp_resource_contents(self, uri: AnyUrl | str) -> mcp.types.TextResourceContents | mcp.types.BlobResourceContents@@ -36,7 +36,7 @@ Convert to MCP resource contents type.- TextResourceContents for str content, BlobResourceContents for bytes-### `ResourceResult` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L120" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ResourceResult` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L121" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Canonical result type for resource reads.@@ -47,7 +47,7 @@ per-item MIME types, and metadata at both the item and result level.**Methods:**-#### `to_mcp_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L195" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_mcp_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L202" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_mcp_result(self, uri: AnyUrl | str) -> mcp.types.ReadResourceResult@@ -62,7 +62,7 @@ Convert to MCP ReadResourceResult.- MCP ReadResourceResult with converted contents-### `Resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L211" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `Resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L218" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Base class for all resources.@@ -70,13 +70,13 @@ Base class for all resources.**Methods:**-#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L236" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L243" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_function(cls, fn: Callable[..., Any], uri: str | AnyUrl) -> FunctionResource```-#### `set_default_mime_type` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L275" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_default_mime_type` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L282" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_default_mime_type(cls, mime_type: str | None) -> str@@ -85,7 +85,7 @@ set_default_mime_type(cls, mime_type: str | None) -> strSet default MIME type if not provided.-#### `set_default_name` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L282" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_default_name` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L289" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_default_name(self) -> Self@@ -94,7 +94,7 @@ set_default_name(self) -> SelfSet default name from URI if not provided.-#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L292" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L299" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonread(self) -> str | bytes | ResourceResult@@ -108,7 +108,7 @@ Subclasses implement this to return resource data. Supported return types:- ResourceResult: Full control over contents and result-level meta-#### `convert_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L304" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `convert_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L311" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonconvert_result(self, raw_value: Any) -> ResourceResult@@ -131,7 +131,7 @@ MCP Apps CSP/permissions) is propagated to each content item sothat hosts can read it from the ``resources/read`` response.-#### `to_mcp_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L375" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_mcp_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L405" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_mcp_resource(self, **overrides: Any) -> SDKResource@@ -140,7 +140,7 @@ to_mcp_resource(self, **overrides: Any) -> SDKResourceConvert the resource to an SDKResource.-#### `key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L398" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L428" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonkey(self) -> str@@ -149,7 +149,7 @@ key(self) -> strThe globally unique lookup key for this resource.-#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L403" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L433" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_with_docket(self, docket: Docket) -> None@@ -158,7 +158,7 @@ register_with_docket(self, docket: Docket) -> NoneRegister this resource with docket for background execution.-#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L409" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L439" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_to_docket(self, docket: Docket, **kwargs: Any) -> Execution@@ -173,7 +173,7 @@ Schedule this resource for background execution via docket.- `**kwargs`: Additional kwargs passed to docket.add()-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L430" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/base.py#L460" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]diff --git a/docs/python-sdk/fastmcp-resources-template.mdx b/docs/python-sdk/fastmcp-resources-template.mdxindex 540866c5a..7fc0cf305 100644--- a/docs/python-sdk/fastmcp-resources-template.mdx+++ b/docs/python-sdk/fastmcp-resources-template.mdx@@ -52,9 +52,23 @@ Supports RFC 6570 URI templates:- Query params: `{?var1,var2}`+### `expand_uri_template` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L112" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+expand_uri_template(uri_template: str, params: dict[str, Any]) -> str+```+++Expand a URI template with parameters β inverse of `match_uri_template`.++Supports the same RFC 6570 subset:+- Path params: `{var}`, `{var*}`+- Query params: `{?var1,var2}`++## Classes-### `ResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L112" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L144" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>A template for dynamically creating resources.@@ -62,13 +76,13 @@ A template for dynamically creating resources.**Methods:**-#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L139" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L171" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_function(fn: Callable[..., Any], uri_template: str, name: str | None = None, version: str | int | None = None, title: str | None = None, description: str | None = None, icons: list[Icon] | None = None, mime_type: str | None = None, tags: set[str] | None = None, annotations: Annotations | None = None, meta: dict[str, Any] | None = None, task: bool | TaskConfig | None = None, auth: AuthCheck | list[AuthCheck] | None = None) -> FunctionResourceTemplate```-#### `set_default_mime_type` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L172" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_default_mime_type` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L204" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_default_mime_type(cls, mime_type: str | None) -> str@@ -77,7 +91,7 @@ set_default_mime_type(cls, mime_type: str | None) -> strSet default MIME type if not provided.-#### `matches` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L178" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `matches` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L210" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonmatches(self, uri: str) -> dict[str, Any] | None@@ -86,7 +100,7 @@ matches(self, uri: str) -> dict[str, Any] | NoneCheck if URI matches template and extract parameters.-#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L182" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L214" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonread(self, arguments: dict[str, Any]) -> str | bytes | ResourceResult@@ -95,7 +109,7 @@ read(self, arguments: dict[str, Any]) -> str | bytes | ResourceResultRead the resource content.-#### `convert_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L188" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `convert_result` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L220" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonconvert_result(self, raw_value: Any) -> ResourceResult@@ -111,7 +125,7 @@ Handles ResourceResult passthrough and converts raw values usingResourceResult's normalization.-#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L252" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L284" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_resource(self, uri: str, params: dict[str, Any]) -> Resource@@ -123,7 +137,7 @@ The base implementation does not support background tasks.Use FunctionResourceTemplate for task support.-#### `to_mcp_template` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L263" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_mcp_template` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L295" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_mcp_template(self, **overrides: Any) -> SDKResourceTemplate@@ -132,7 +146,7 @@ to_mcp_template(self, **overrides: Any) -> SDKResourceTemplateConvert the resource template to an SDKResourceTemplate.-#### `from_mcp_template` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L283" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_mcp_template` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L315" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_mcp_template(cls, mcp_template: SDKResourceTemplate) -> ResourceTemplate@@ -141,7 +155,7 @@ from_mcp_template(cls, mcp_template: SDKResourceTemplate) -> ResourceTemplateCreates a FastMCP ResourceTemplate from a raw MCP ResourceTemplate object.-#### `key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L296" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L328" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonkey(self) -> str@@ -150,7 +164,7 @@ key(self) -> strThe globally unique lookup key for this template.-#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L301" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L333" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_with_docket(self, docket: Docket) -> None@@ -159,7 +173,7 @@ register_with_docket(self, docket: Docket) -> NoneRegister this template with docket for background execution.-#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L307" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L339" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_to_docket(self, docket: Docket, params: dict[str, Any], **kwargs: Any) -> Execution@@ -175,13 +189,13 @@ Schedule this template for background execution via docket.- `**kwargs`: Additional kwargs passed to docket.add()-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L330" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L362" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]```-### `FunctionResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L337" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FunctionResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L369" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>A template for dynamically creating resources.@@ -189,7 +203,7 @@ A template for dynamically creating resources.**Methods:**-#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L383" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L415" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_resource(self, uri: str, params: dict[str, Any]) -> Resource@@ -198,7 +212,7 @@ create_resource(self, uri: str, params: dict[str, Any]) -> ResourceCreate a resource from the template with the given parameters.-#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L402" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L434" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonread(self, arguments: dict[str, Any]) -> str | bytes | ResourceResult@@ -207,7 +221,7 @@ read(self, arguments: dict[str, Any]) -> str | bytes | ResourceResultRead the resource content.-#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L441" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L473" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_with_docket(self, docket: Docket) -> None@@ -216,7 +230,7 @@ register_with_docket(self, docket: Docket) -> NoneRegister this template with docket for background execution.-#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L447" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L479" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_to_docket(self, docket: Docket, params: dict[str, Any], **kwargs: Any) -> Execution@@ -234,7 +248,7 @@ FunctionResourceTemplate splats the params dict since .fn expects **kwargs.- `**kwargs`: Additional kwargs passed to docket.add()-#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L473" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_function` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/resources/template.py#L505" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_function(cls, fn: Callable[..., Any], uri_template: str, name: str | None = None, version: str | int | None = None, title: str | None = None, description: str | None = None, icons: list[Icon] | None = None, mime_type: str | None = None, tags: set[str] | None = None, annotations: Annotations | None = None, meta: dict[str, Any] | None = None, task: bool | TaskConfig | None = None, auth: AuthCheck | list[AuthCheck] | None = None) -> FunctionResourceTemplatediff --git a/docs/python-sdk/fastmcp-server-auth-auth.mdx b/docs/python-sdk/fastmcp-server-auth-auth.mdxindex def0830fd..69f63aeb7 100644--- a/docs/python-sdk/fastmcp-server-auth-auth.mdx+++ b/docs/python-sdk/fastmcp-server-auth-auth.mdx@@ -85,7 +85,7 @@ custom authentication routes.**Methods:**-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L236" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L247" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -102,7 +102,7 @@ All auth providers must implement token verification.- AccessToken object if valid, None if invalid or expired-#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L249" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L260" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_mcp_path(self, mcp_path: str | None) -> None@@ -119,7 +119,7 @@ MCP endpoint path.- `mcp_path`: The path where the MCP endpoint is mounted (e.g., "/mcp")-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L263" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L274" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_routes(self, mcp_path: str | None = None) -> list[Route]@@ -143,7 +143,7 @@ provider does not create the actual MCP endpoint route.- List of all routes for this provider (excluding the MCP endpoint itself)-#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L286" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L297" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_well_known_routes(self, mcp_path: str | None = None) -> list[Route]@@ -171,7 +171,7 @@ This is used to construct path-scoped well-known URLs.- List of well-known discovery routes (typically mounted at root level)-#### `get_middleware` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L318" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_middleware` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L329" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_middleware(self) -> list@@ -183,7 +183,7 @@ Get HTTP application-level middleware for this auth provider.- List of Starlette Middleware instances to apply to the HTTP app-### `TokenVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L351" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `TokenVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L366" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Base class for token verifiers (Resource Servers).@@ -194,7 +194,7 @@ Token verifiers typically don't provide authentication routes by default.**Methods:**-#### `scopes_supported` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L373" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `scopes_supported` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L398" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonscopes_supported(self) -> list[str]@@ -208,7 +208,7 @@ where tokens contain short-form scopes but clients request full URIscopes).-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L383" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L408" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -217,7 +217,7 @@ verify_token(self, token: str) -> AccessToken | NoneVerify a bearer token and return access info if valid.-### `RemoteAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L388" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `RemoteAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L413" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Authentication provider for resource servers that verify tokens from known authorization servers.@@ -234,7 +234,7 @@ the authorization servers that issue valid tokens.**Methods:**-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L435" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L468" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -243,7 +243,7 @@ verify_token(self, token: str) -> AccessToken | NoneVerify token using the configured token verifier.-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L439" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L472" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_routes(self, mcp_path: str | None = None) -> list[Route]@@ -254,7 +254,7 @@ Get routes for this provider.Creates protected resource metadata routes (RFC 9728).-### `MultiAuth` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L471" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `MultiAuth` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L504" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Composes an optional auth server with additional token verifiers.@@ -270,7 +270,7 @@ come from the server; verifiers contribute only token verification.**Methods:**-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L536" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L585" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -283,7 +283,7 @@ it is logged and treated as a non-match so that remaining sourcesstill get a chance to verify the token.-#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L557" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L606" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_mcp_path(self, mcp_path: str | None) -> None@@ -292,7 +292,7 @@ set_mcp_path(self, mcp_path: str | None) -> NonePropagate MCP path to the server and all verifiers.-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L565" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L614" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_routes(self, mcp_path: str | None = None) -> list[Route]@@ -301,7 +301,7 @@ get_routes(self, mcp_path: str | None = None) -> list[Route]Delegate route creation to the server.-#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L571" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L620" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_well_known_routes(self, mcp_path: str | None = None) -> list[Route]@@ -313,7 +313,7 @@ This ensures that server-specific well-known route logic (e.g.,OAuthProvider's RFC 8414 path-aware discovery) is preserved.-### `OAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L582" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `OAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L631" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>OAuth Authorization Server provider.@@ -324,7 +324,7 @@ authorization flows, token issuance, and token verification.**Methods:**-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L645" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L702" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -342,7 +342,7 @@ to our existing load_access_token method.- AccessToken object if valid, None if invalid or expired-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L660" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L717" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_routes(self, mcp_path: str | None = None) -> list[Route]@@ -358,7 +358,7 @@ This method creates the full set of OAuth routes including:- List of OAuth routes-#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L739" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L796" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_well_known_routes(self, mcp_path: str | None = None) -> list[Route]diff --git a/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx b/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdxindex 866c26570..bb5e3a314 100644--- a/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx+++ b/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx@@ -140,7 +140,7 @@ Handles provider-specific requirements:**Methods:**-#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L572" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L576" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_mcp_path(self, mcp_path: str | None) -> None@@ -157,7 +157,7 @@ this specific MCP endpoint.- `mcp_path`: The path where the MCP endpoint is mounted (e.g., "/mcp")-#### `jwt_issuer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L596" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `jwt_issuer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L600" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonjwt_issuer(self) -> JWTIssuer@@ -169,7 +169,7 @@ The JWT issuer is created when set_mcp_path() is called (via get_routes()).This property ensures a clear error if used before initialization.-#### `get_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L656" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L660" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_client(self, client_id: str) -> OAuthClientInformationFull | None@@ -182,7 +182,7 @@ For unregistered clients, returns None (which will raise an error in the SDK).CIMD clients (URL-based client IDs) are looked up and cached automatically.-#### `register_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L700" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L704" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_client(self, client_info: OAuthClientInformationFull) -> None@@ -196,7 +196,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/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L753" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `authorize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L757" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonauthorize(self, client: OAuthClientInformationFull, params: AuthorizationParams) -> str@@ -214,7 +214,7 @@ If consent is disabled (require_authorization_consent=False), skip the consent sand redirect directly to the upstream IdP.-#### `load_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L872" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L876" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_authorization_code(self, client: OAuthClientInformationFull, authorization_code: str) -> AuthorizationCode | None@@ -226,7 +226,7 @@ Look up our client code and return authorization code objectwith PKCE challenge for validation.-#### `exchange_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L920" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L924" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonexchange_authorization_code(self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode) -> OAuthToken@@ -244,7 +244,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/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1178" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1182" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str) -> RefreshToken | None@@ -256,7 +256,7 @@ Looks up by token hash and reconstructs the RefreshToken object.Validates that the token belongs to the requesting client.-#### `exchange_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1207" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1211" 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@@ -273,7 +273,7 @@ Implements two-tier refresh:6. Keep same FastMCP refresh token (unless upstream rotates)-#### `load_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1558" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1562" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_access_token(self, token: str) -> AccessToken | None@@ -293,7 +293,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/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1723" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `revoke_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1727" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrevoke_token(self, token: AccessToken | RefreshToken) -> None@@ -306,7 +306,7 @@ For all tokens, attempts upstream revocation if endpoint is configured.Access token JTI mappings expire via TTL.-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1769" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oauth_proxy/proxy.py#L1773" 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-auth-oidc_proxy.mdx b/docs/python-sdk/fastmcp-server-auth-oidc_proxy.mdxindex 904968111..da088e129 100644--- a/docs/python-sdk/fastmcp-server-auth-oidc_proxy.mdx+++ b/docs/python-sdk/fastmcp-server-auth-oidc_proxy.mdx@@ -52,7 +52,7 @@ that is OIDC compliant.**Methods:**-#### `get_oidc_configuration` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oidc_proxy.py#L452" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_oidc_configuration` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oidc_proxy.py#L456" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_oidc_configuration(self, config_url: AnyHttpUrl, strict: bool | None, timeout_seconds: int | None) -> OIDCConfiguration@@ -66,7 +66,7 @@ Gets the OIDC configuration for the specified configuration URL.- `timeout_seconds`: HTTP request timeout in seconds-#### `get_token_verifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oidc_proxy.py#L469" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_token_verifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/oidc_proxy.py#L473" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_token_verifier(self) -> TokenVerifierdiff --git a/docs/python-sdk/fastmcp-server-auth-providers-aws.mdx b/docs/python-sdk/fastmcp-server-auth-providers-aws.mdxindex 3b834c67b..e0f46689c 100644--- a/docs/python-sdk/fastmcp-server-auth-providers-aws.mdx+++ b/docs/python-sdk/fastmcp-server-auth-providers-aws.mdx@@ -71,7 +71,7 @@ Features:**Methods:**-#### `get_token_verifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/aws.py#L203" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_token_verifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/aws.py#L207" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_token_verifier(self) -> AWSCognitoTokenVerifierdiff --git a/docs/python-sdk/fastmcp-server-auth-providers-azure.mdx b/docs/python-sdk/fastmcp-server-auth-providers-azure.mdxindex ea22062f4..e65cc6119 100644--- a/docs/python-sdk/fastmcp-server-auth-providers-azure.mdx+++ b/docs/python-sdk/fastmcp-server-auth-providers-azure.mdx@@ -14,7 +14,7 @@ using the OAuth Proxy pattern for non-DCR OAuth flows.## Functions-### `EntraOBOToken` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L721" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `EntraOBOToken` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L726" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonEntraOBOToken(scopes: list[str]) -> str@@ -43,7 +43,7 @@ or OBO exchange fails## Classes-### `AzureProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L38" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `AzureProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L39" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Azure (Microsoft Entra) OAuth provider for FastMCP.@@ -78,7 +78,7 @@ Setup:**Methods:**-#### `authorize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L268" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `authorize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L273" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonauthorize(self, client: OAuthClientInformationFull, params: AuthorizationParams) -> str@@ -98,7 +98,7 @@ scopes to determine the resource/audience instead of a separate parameter.- Authorization URL to redirect the user to Azure AD-#### `get_obo_credential` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L494" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_obo_credential` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L499" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_obo_credential(self, user_assertion: str) -> OnBehalfOfCredential@@ -120,7 +120,7 @@ calls multiple tools with the same scopes.- `ImportError`: If azure-identity is not installed (requires fastmcp[azure]).-#### `close_obo_credentials` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L545" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `close_obo_credentials` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L550" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonclose_obo_credentials(self) -> None@@ -129,7 +129,7 @@ close_obo_credentials(self) -> NoneClose all cached OBO credentials.-### `AzureJWTVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L556" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `AzureJWTVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L561" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>JWT verifier pre-configured for Azure AD / Microsoft Entra ID.@@ -166,7 +166,7 @@ Example::**Methods:**-#### `scopes_supported` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L636" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `scopes_supported` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/azure.py#L641" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonscopes_supported(self) -> list[str]diff --git a/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx b/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdxindex c4ee4cc14..0e1e0d94e 100644--- a/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx+++ b/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx@@ -16,19 +16,19 @@ It simulates the OAuth 2.1 flow locally without external calls.**Methods:**-#### `get_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L65" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_client(self, client_id: str) -> OAuthClientInformationFull | None```-#### `register_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L68" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_client` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_client(self, client_info: OAuthClientInformationFull) -> None```-#### `authorize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L92" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `authorize` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L94" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonauthorize(self, client: OAuthClientInformationFull, params: AuthorizationParams) -> str@@ -38,37 +38,37 @@ Simulates user authorization and generates an authorization code.Returns a redirect URI with the code and state.-#### `load_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L149" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L151" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_authorization_code(self, client: OAuthClientInformationFull, authorization_code: str) -> AuthorizationCode | None```-#### `exchange_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L162" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_authorization_code` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L164" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonexchange_authorization_code(self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode) -> OAuthToken```-#### `load_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L215" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L217" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str) -> RefreshToken | None```-#### `exchange_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L230" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `exchange_refresh_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L232" 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```-#### `load_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L287" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `load_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L289" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonload_access_token(self, token: str) -> AccessToken | None```-#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L298" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L300" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonverify_token(self, token: str) -> AccessToken | None@@ -86,7 +86,7 @@ to our existing load_access_token method.- AccessToken object if valid, None if invalid or expired-#### `revoke_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L355" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `revoke_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/in_memory.py#L357" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrevoke_token(self, token: AccessToken | RefreshToken) -> Nonediff --git a/docs/python-sdk/fastmcp-server-auth-providers-keycloak.mdx b/docs/python-sdk/fastmcp-server-auth-providers-keycloak.mdxnew file mode 100644index 000000000..e3cde2e60--- /dev/null+++ b/docs/python-sdk/fastmcp-server-auth-providers-keycloak.mdx@@ -0,0 +1,20 @@+---+title: keycloak+sidebarTitle: keycloak+---++# `fastmcp.server.auth.providers.keycloak`+++Keycloak authentication provider for FastMCP.++## Classes++### `KeycloakAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/keycloak.py#L15" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+++Keycloak authentication provider using Dynamic Client Registration (DCR).++Requires Keycloak 26.6.0 or later, which includes the fix for DCR compatibility+with MCP clients (https://github.com/keycloak/keycloak/pull/45309).+diff --git a/docs/python-sdk/fastmcp-server-auth-providers-workos.mdx b/docs/python-sdk/fastmcp-server-auth-providers-workos.mdxindex 86cd88f59..8d8c80061 100644--- a/docs/python-sdk/fastmcp-server-auth-providers-workos.mdx+++ b/docs/python-sdk/fastmcp-server-auth-providers-workos.mdx@@ -59,7 +59,7 @@ Setup Requirements:4. Note your Client ID and Client Secret-### `AuthKitProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L255" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `AuthKitProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L259" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>AuthKit metadata provider for DCR (Dynamic Client Registration).@@ -85,7 +85,7 @@ https://workos.com/docs/authkit/mcp/integrating/token-verification**Methods:**-#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L353" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L357" 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-dependencies.mdx b/docs/python-sdk/fastmcp-server-dependencies.mdxindex 64186a6cd..927434df2 100644--- a/docs/python-sdk/fastmcp-server-dependencies.mdx+++ b/docs/python-sdk/fastmcp-server-dependencies.mdx@@ -15,74 +15,7 @@ CurrentWorker) and background task execution require fastmcp[tasks].## Functions-### `get_task_context` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L107" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-get_task_context() -> TaskContextInfo | None-```---Get the current task context if running inside a background task worker.--This function extracts task information from the Docket execution context.-Returns None if not running in a task context (e.g., foreground execution).--**Returns:**-- TaskContextInfo with task_id and session_id, or None if not in a task.---### `register_task_session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L145" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-register_task_session(session_id: str, session: ServerSession) -> None-```---Register a session for Context access in background tasks.--Called automatically when a task is submitted to Docket. The session is-stored as a weakref so it doesn't prevent garbage collection when the-client disconnects.--**Args:**-- `session_id`: The session identifier-- `session`: The ServerSession instance---### `get_task_session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L159" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-get_task_session(session_id: str) -> ServerSession | None-```---Get a registered session by ID if still alive.--**Args:**-- `session_id`: The session identifier--**Returns:**-- The ServerSession if found and alive, None otherwise---### `register_task_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L194" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-register_task_server(task_id: str, server: FastMCP) -> None-```---Register the server for a background task.--Called at task-submission time (inside the child server's call_tool-context) so that background workers can resolve CurrentFastMCP() and-ctx.fastmcp to the child server for mounted tasks.--The map is bounded to avoid unbounded growth in long-lived servers.-Evicted entries fall back to the ContextVar (parent server).---### `is_docket_available` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L428" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `is_docket_available` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L114" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonis_docket_available() -> bool@@ -103,7 +36,7 @@ Any of those failing means we treat docket as unavailable and fall backto the no-tasks code paths instead of crashing deep inside a request.-### `require_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L457" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `require_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrequire_docket(feature: str) -> None@@ -117,7 +50,7 @@ Raise ImportError with install instructions if docket not available."CurrentDocket()"). Will be included in the error message.-### `transform_context_annotations` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L497" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `transform_context_annotations` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L183" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontransform_context_annotations(fn: Callable[..., Any]) -> Callable[..., Any]@@ -143,7 +76,7 @@ allows them to have defaults in any order.- Function with modified signature (same function object, updated __signature__)-### `get_context` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L638" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_context` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L324" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_context() -> Context@@ -153,7 +86,7 @@ get_context() -> ContextGet the current FastMCP Context instance directly.-### `get_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L648" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L334" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_server() -> FastMCP@@ -173,7 +106,7 @@ started the worker).- `RuntimeError`: If no server in context-### `get_http_request` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L682" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_http_request` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L364" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_http_request() -> Request@@ -187,7 +120,7 @@ In background tasks, returns a synthetic request populated with thesnapshotted headers from the originating HTTP request.-### `get_http_headers` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L729" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_http_headers` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L411" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_http_headers(include_all: bool = False, include: set[str] | None = None) -> dict[str, str]@@ -208,7 +141,7 @@ normally be excluded. This is useful for proxy transports that need to forwardauthorization headers to upstream MCP servers.-### `get_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L786" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_access_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L468" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_access_token() -> AccessToken | None@@ -227,7 +160,7 @@ token snapshot stored in Redis at task submission time.- The access token if an authenticated user is available, None otherwise.-### `without_injected_parameters` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L857" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `without_injected_parameters` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L539" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwithout_injected_parameters(fn: Callable[..., Any]) -> Callable[..., Any]@@ -252,7 +185,7 @@ Handles:- Async wrapper function without injected parameters-### `resolve_dependencies` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1006" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `resolve_dependencies` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L688" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonresolve_dependencies(fn: Callable[..., Any], arguments: dict[str, Any]) -> AsyncGenerator[dict[str, Any], None]@@ -278,7 +211,7 @@ time, so all injection goes through the unified DI system.which will be filtered out)-### `CurrentContext` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1144" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentContext` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L831" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentContext() -> Context@@ -297,7 +230,7 @@ current MCP operation (tool/resource/prompt call).- `RuntimeError`: If no active context found (during resolution)-### `OptionalCurrentContext` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1169" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `OptionalCurrentContext` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L856" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonOptionalCurrentContext() -> Context | None@@ -307,7 +240,7 @@ OptionalCurrentContext() -> Context | NoneGet the current FastMCP Context, or None when no context is active.-### `CurrentDocket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1204" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentDocket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L891" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentDocket() -> Docket@@ -327,7 +260,7 @@ automatically creates for background task scheduling.- `ImportError`: If fastmcp[tasks] not installed-### `CurrentWorker` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1260" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentWorker` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L947" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentWorker() -> Worker@@ -347,7 +280,7 @@ automatically creates for background task processing.- `ImportError`: If fastmcp[tasks] not installed-### `CurrentFastMCP` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1301" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentFastMCP` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L988" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentFastMCP() -> FastMCP@@ -365,7 +298,7 @@ This dependency provides access to the active FastMCP server.- `RuntimeError`: If no server in context (during resolution)-### `CurrentRequest` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1341" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentRequest` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1028" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentRequest() -> Request@@ -385,7 +318,7 @@ current HTTP request. Only available when running over HTTP transports- `RuntimeError`: If no HTTP request in context (e.g., STDIO transport)-### `CurrentHeaders` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1382" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentHeaders` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1069" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentHeaders() -> dict[str, str]@@ -403,7 +336,7 @@ transport.- A dependency that resolves to a dictionary of header name -> value-### `CurrentAccessToken` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1600" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CurrentAccessToken` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1287" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonCurrentAccessToken() -> AccessToken@@ -422,7 +355,7 @@ authenticated request. Raises an error if no authentication is present.- `RuntimeError`: If no authenticated user (use get_access_token() for optional)-### `TokenClaim` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1657" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `TokenClaim` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1344" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonTokenClaim(name: str) -> str@@ -447,62 +380,7 @@ without needing the full token object.## Classes-### `TaskContextInfo` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L93" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>---Information about the current background task context.--Returned by ``get_task_context()`` when running inside a Docket worker.-Contains identifiers needed to communicate with the MCP session.---### `TaskContextSnapshot` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L217" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>---All context data snapshotted at task-submission time.--Stored as a single Redis key per task, restored once in the worker.---**Methods:**--#### `capture` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L228" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-capture(cls) -> TaskContextSnapshot-```--Capture current context for background task execution.---#### `from_json` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L244" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-from_json(cls, raw: str | bytes) -> TaskContextSnapshot-```--Deserialize from JSON stored in Redis.---#### `to_json` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L258" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-to_json(self) -> str-```--Serialize to JSON for Redis storage.---#### `save` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L268" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>--```python-save(self, docket: Docket, session_id: str, task_id: str, ttl_seconds: int) -> None-```--Store this snapshot as a single Redis key.---### `ProgressLike` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1410" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ProgressLike` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1097" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Protocol for progress tracking interface.@@ -513,7 +391,7 @@ and Docket's Progress (worker context).**Methods:**-#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1418" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1105" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncurrent(self) -> int | None@@ -522,7 +400,7 @@ current(self) -> int | NoneCurrent progress value.-#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1423" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1110" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontotal(self) -> int@@ -531,7 +409,7 @@ total(self) -> intTotal/target progress value.-#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1428" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1115" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonmessage(self) -> str | None@@ -540,7 +418,7 @@ message(self) -> str | NoneCurrent progress message.-#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1432" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1119" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_total(self, total: int) -> None@@ -549,7 +427,7 @@ set_total(self, total: int) -> NoneSet the total/target value for progress tracking.-#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1436" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonincrement(self, amount: int = 1) -> None@@ -558,7 +436,7 @@ increment(self, amount: int = 1) -> NoneAtomically increment the current progress value.-#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1440" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1127" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_message(self, message: str | None) -> None@@ -567,7 +445,7 @@ set_message(self, message: str | None) -> NoneUpdate the progress status message.-### `InMemoryProgress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1445" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `InMemoryProgress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1132" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>In-memory progress tracker for immediate tool execution.@@ -579,25 +457,25 @@ progress doesn't need to be observable across processes.**Methods:**-#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1470" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1157" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncurrent(self) -> int | None```-#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1474" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1161" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontotal(self) -> int```-#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1478" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1165" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonmessage(self) -> str | None```-#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1481" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1168" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_total(self, total: int) -> None@@ -606,7 +484,7 @@ set_total(self, total: int) -> NoneSet the total/target value for progress tracking.-#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1487" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1174" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonincrement(self, amount: int = 1) -> None@@ -615,7 +493,7 @@ increment(self, amount: int = 1) -> NoneAtomically increment the current progress value.-#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1496" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1183" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_message(self, message: str | None) -> None@@ -624,7 +502,7 @@ set_message(self, message: str | None) -> NoneUpdate the progress status message.-### `Progress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1501" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `Progress` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1188" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Progress dependency that works in both server and worker contexts.@@ -639,7 +517,7 @@ share mutable state.**Methods:**-#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1542" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `current` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1229" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncurrent(self) -> int | None@@ -648,7 +526,7 @@ current(self) -> int | NoneCurrent progress value.-#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1548" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1235" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontotal(self) -> int@@ -657,7 +535,7 @@ total(self) -> intTotal/target progress value.-#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1554" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1241" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonmessage(self) -> str | None@@ -666,7 +544,7 @@ message(self) -> str | NoneCurrent progress message.-#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1559" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_total` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1246" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_total(self, total: int) -> None@@ -675,7 +553,7 @@ set_total(self, total: int) -> NoneSet the total/target value for progress tracking.-#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1564" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `increment` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1251" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonincrement(self, amount: int = 1) -> None@@ -684,7 +562,7 @@ increment(self, amount: int = 1) -> NoneAtomically increment the current progress value.-#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1569" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `set_message` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L1256" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonset_message(self, message: str | None) -> Nonediff --git a/docs/python-sdk/fastmcp-server-providers-fastmcp_provider.mdx b/docs/python-sdk/fastmcp-server-providers-fastmcp_provider.mdxindex 0602510ce..585c9b376 100644--- a/docs/python-sdk/fastmcp-server-providers-fastmcp_provider.mdx+++ b/docs/python-sdk/fastmcp-server-providers-fastmcp_provider.mdx@@ -18,7 +18,7 @@ executed.## Classes-### `FastMCPProviderTool` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L72" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FastMCPProviderTool` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L42" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Tool that delegates execution to a wrapped server's middleware.@@ -30,7 +30,7 @@ chain is executed.**Methods:**-#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L94" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L64" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrap(cls, server: Any, tool: Tool) -> FastMCPProviderTool@@ -39,7 +39,7 @@ wrap(cls, server: Any, tool: Tool) -> FastMCPProviderToolWrap a Tool to delegate execution to the server's middleware.-#### `run` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L151" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `run` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L121" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrun(self, arguments: dict[str, Any]) -> ToolResult@@ -51,13 +51,13 @@ This is called when the tool is used within a TransformedToolforwarding function or other contexts where task_meta is not available.-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L170" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L140" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]```-### `FastMCPProviderResource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L177" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FastMCPProviderResource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L147" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Resource that delegates reading to a wrapped server's read_resource().@@ -68,7 +68,7 @@ When `read()` is called, this resource invokes the wrapped server's**Methods:**-#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L198" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L168" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrap(cls, server: Any, resource: Resource) -> FastMCPProviderResource@@ -77,13 +77,13 @@ wrap(cls, server: Any, resource: Resource) -> FastMCPProviderResourceWrap a Resource to delegate reading to the server's middleware.-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L241" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L211" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]```-### `FastMCPProviderPrompt` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L248" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FastMCPProviderPrompt` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L218" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Prompt that delegates rendering to a wrapped server's render_prompt().@@ -94,7 +94,7 @@ When `render()` is called, this prompt invokes the wrapped server's**Methods:**-#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L269" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L239" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrap(cls, server: Any, prompt: Prompt) -> FastMCPProviderPrompt@@ -103,7 +103,7 @@ wrap(cls, server: Any, prompt: Prompt) -> FastMCPProviderPromptWrap a Prompt to delegate rendering to the server's middleware.-#### `render` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L320" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `render` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L290" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonrender(self, arguments: dict[str, Any] | None = None) -> PromptResult@@ -115,13 +115,13 @@ This is called when the prompt is used within a transformed contextor other contexts where task_meta is not available.-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L339" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L309" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]```-### `FastMCPProviderResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L346" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FastMCPProviderResourceTemplate` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L316" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Resource template that creates FastMCPProviderResources.@@ -133,7 +133,7 @@ when read.**Methods:**-#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L368" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `wrap` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L338" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrap(cls, server: Any, template: ResourceTemplate) -> FastMCPProviderResourceTemplate@@ -142,7 +142,7 @@ wrap(cls, server: Any, template: ResourceTemplate) -> FastMCPProviderResourceTemWrap a ResourceTemplate to create FastMCPProviderResources.-#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L389" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `create_resource` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L359" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoncreate_resource(self, uri: str, params: dict[str, Any]) -> Resource@@ -155,7 +155,7 @@ We use `_original_uri_template` with `params` to construct the internalURI that the nested server understands.-#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L439" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `read` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L409" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonread(self, arguments: dict[str, Any]) -> str | bytes | ResourceResult@@ -167,7 +167,7 @@ Reads the resource via the wrapped server and returns the ResourceResult.This method is called by Docket during background task execution.-#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L460" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `register_with_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L428" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonregister_with_docket(self, docket: Docket) -> None@@ -176,7 +176,7 @@ register_with_docket(self, docket: Docket) -> NoneNo-op: the child's actual template is registered via get_tasks().-#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L463" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L431" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_to_docket(self, docket: Docket, params: dict[str, Any], **kwargs: Any) -> Execution@@ -188,13 +188,13 @@ The child's FunctionResourceTemplate.fn is registered (via get_tasks),and it expects splatted **kwargs, so we splat params here.-#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L482" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_span_attributes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L450" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_span_attributes(self) -> dict[str, Any]```-### `FastMCPProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L494" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `FastMCPProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L462" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Provider that wraps a FastMCP server.@@ -210,7 +210,7 @@ This ensures middleware runs when components are executed.**Methods:**-#### `get_app_tool` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L569" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_app_tool` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L537" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_app_tool(self, app_name: str, tool_name: str) -> Tool | None@@ -219,7 +219,7 @@ get_app_tool(self, app_name: str, tool_name: str) -> Tool | NoneDelegate to nested server's get_app_tool, wrapping for middleware.-#### `get_tool_by_hash` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L580" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_tool_by_hash` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L548" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_tool_by_hash(self, tool_hash: str, tool_name: str) -> Tool | None@@ -228,7 +228,7 @@ get_tool_by_hash(self, tool_hash: str, tool_name: str) -> Tool | NoneDelegate to nested server's get_tool_by_hash, wrapping for middleware.-#### `get_tasks` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L679" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `get_tasks` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L647" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_tasks(self) -> Sequence[FastMCPComponent]@@ -242,7 +242,7 @@ server's transforms applied, then applies this provider's transformsfor correct registration keys.-#### `lifespan` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L720" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `lifespan` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/fastmcp_provider.py#L688" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonlifespan(self) -> AsyncIterator[None]diff --git a/docs/python-sdk/fastmcp-server-tasks-context.mdx b/docs/python-sdk/fastmcp-server-tasks-context.mdxnew file mode 100644index 000000000..945180ca7--- /dev/null+++ b/docs/python-sdk/fastmcp-server-tasks-context.mdx@@ -0,0 +1,175 @@+---+title: context+sidebarTitle: context+---++# `fastmcp.server.tasks.context`+++Task context and scoping for background task execution.++Determines authorization scope (``get_task_scope``), manages the context+snapshot that is captured at task submission and restored in workers+(``TaskContextSnapshot``), and maintains in-process registries for live+sessions and servers.+++## Functions++### `get_task_scope` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L30" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+get_task_scope() -> str | None+```+++Get the authorization scope for task isolation.++Returns the raw scope identifier for the current access token, or+``None`` when no auth context is present (anonymous tasks).++The scope is composed as ``client_id|sub`` when the token carries a+``sub`` claim β necessary for fixed-OAuth servers where ``client_id`` is+shared across all users β and falls back to ``client_id`` alone for+DCR/CIMD flows where the client identity is already per-user.++Encoding for Redis/Docket keys happens at the boundary in ``keys.py``;+this function returns the raw value.+++### `get_task_context` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+get_task_context() -> TaskContextInfo | None+```+++Get the current task context if running inside a background task worker.++This function extracts task information from the Docket execution context.+Returns None if not running in a task context (e.g., foreground execution).++**Returns:**+- TaskContextInfo with task_id and task_scope, or None if not in a task.+++### `get_task_session_id` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L245" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+get_task_session_id() -> str | None+```+++Get the session_id for the current background task, if available.++Loads the task snapshot (from cache or Redis) and returns the session_id+that was captured at task submission time. Returns None if not in a task+context or if the snapshot isn't available.+++### `register_task_session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L341" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+register_task_session(session_id: str, session: ServerSession) -> None+```+++Register a session for in-process background task access.++Called automatically when a task is submitted to Docket. The session is+stored as a weakref so it doesn't prevent garbage collection when the+client disconnects.+++### `get_task_session` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L351" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+get_task_session(session_id: str) -> ServerSession | None+```+++Get a registered session by ID if still alive.++Returns None in distributed workers where the session lives in another+process β callers must handle this gracefully.+++### `register_task_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L370" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+register_task_server(task_id: str, server: FastMCP) -> None+```+++Register the server for a background task.++Called at task-submission time so that background workers can resolve+the correct (child) server for mounted tasks.+++### `get_task_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L381" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+get_task_server(task_id: str) -> FastMCP | None+```+++Get the registered server for a background task, if still alive.+++## Classes++### `TaskContextInfo` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L56" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+++Information about the current background task context.++Returned by ``get_task_context()`` when running inside a Docket worker.+Contains identifiers needed to communicate with the MCP session.+++### `TaskContextSnapshot` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L100" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+++All context data snapshotted at task-submission time.++Stored as a single Redis key per task, restored once in the worker.+++**Methods:**++#### `capture` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L112" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+capture(cls) -> TaskContextSnapshot+```++Capture current context for background task execution.+++#### `from_json` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L139" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+from_json(cls, raw: str | bytes) -> TaskContextSnapshot+```++Deserialize from JSON stored in Redis.+++#### `to_json` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L154" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+to_json(self) -> str+```++Serialize to JSON for Redis storage.+++#### `save` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/context.py#L165" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+save(self, docket: Docket, task_scope: str | None, task_id: str, ttl_seconds: int) -> None+```++Store this snapshot as a single Redis key.+diff --git a/docs/python-sdk/fastmcp-server-tasks-elicitation.mdx b/docs/python-sdk/fastmcp-server-tasks-elicitation.mdxindex cc6f3dea2..3914d207c 100644--- a/docs/python-sdk/fastmcp-server-tasks-elicitation.mdx+++ b/docs/python-sdk/fastmcp-server-tasks-elicitation.mdx@@ -23,7 +23,7 @@ internal APIs for background task coordination.## Functions-### `elicit_for_task` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L42" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `elicit_for_task` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonelicit_for_task(task_id: str, session: ServerSession | None, message: str, schema: dict[str, Any], fastmcp: FastMCP) -> mcp.types.ElicitResult@@ -50,10 +50,10 @@ in a Docket worker context where there's no active MCP request.- `McpError`: If the elicitation request fails-### `relay_elicitation` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L234" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `relay_elicitation` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L239" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```python-relay_elicitation(session: ServerSession, session_id: str, task_id: str, elicitation: dict[str, Any], fastmcp: FastMCP) -> None+relay_elicitation(session: ServerSession, task_scope: str | None, task_id: str, elicitation: dict[str, Any], fastmcp: FastMCP) -> None```@@ -66,16 +66,16 @@ response to Redis so the blocked worker can resume.**Args:**- `session`: MCP ServerSession-- `session_id`: Session identifier+- `task_scope`: Authorization scope for Redis key construction- `task_id`: Background task ID- `elicitation`: Elicitation metadata (message, requestedSchema)- `fastmcp`: FastMCP server instance-### `handle_task_input` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L290" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `handle_task_input` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/elicitation.py#L295" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```python-handle_task_input(task_id: str, session_id: str, action: str, content: dict[str, Any] | None, fastmcp: FastMCP) -> bool+handle_task_input(task_id: str, task_scope: str | None, action: str, content: dict[str, Any] | None, fastmcp: FastMCP) -> bool```@@ -86,7 +86,7 @@ request from a background task.**Args:**- `task_id`: The background task ID-- `session_id`: The MCP session ID+- `task_scope`: Authorization scope for Redis key construction- `action`: The elicitation action ("accept", "decline", "cancel")- `content`: The response content (for "accept" action)- `fastmcp`: The FastMCP server instancediff --git a/docs/python-sdk/fastmcp-server-tasks-handlers.mdx b/docs/python-sdk/fastmcp-server-tasks-handlers.mdxindex 3493b752e..fd3659421 100644--- a/docs/python-sdk/fastmcp-server-tasks-handlers.mdx+++ b/docs/python-sdk/fastmcp-server-tasks-handlers.mdx@@ -13,7 +13,7 @@ Handles queuing tool/prompt/resource executions to Docket as background tasks.## Functions-### `submit_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/handlers.py#L39" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `submit_to_docket` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/handlers.py#L43" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonsubmit_to_docket(task_type: Literal['tool', 'resource', 'template', 'prompt'], key: str, component: Tool | Resource | ResourceTemplate | Prompt, arguments: dict[str, Any] | None = None, task_meta: TaskMeta | None = None) -> mcp.types.CreateTaskResultdiff --git a/docs/python-sdk/fastmcp-server-tasks-keys.mdx b/docs/python-sdk/fastmcp-server-tasks-keys.mdxindex a274d3c1d..a852fadd9 100644--- a/docs/python-sdk/fastmcp-server-tasks-keys.mdx+++ b/docs/python-sdk/fastmcp-server-tasks-keys.mdx@@ -6,34 +6,40 @@ sidebarTitle: keys# `fastmcp.server.tasks.keys`-Task key management for SEP-1686 background tasks.+Docket and Redis key encoding for background tasks.-Task keys encode security scoping and metadata in the Docket key format:- `{session_id}:{client_task_id}:{task_type}:{component_identifier}`+The compound Docket task key embeds the auth boundary so that the parser can+reject cross-scope access without consulting Redis. Authenticated and+anonymous tasks live in disjoint keyspaces:-This format provides:-- Session-based security scoping (prevents cross-session access)-- Task type identification (tool/prompt/resource)-- Component identification (name or URI for result conversion)+ auth:{enc_scope}:{client_task_id}:{task_type}:{enc_identifier}+ anon:{client_task_id}:{task_type}:{enc_identifier}++The same `auth/anon` partition is used for the per-task Redis prefix+(``fastmcp:task:auth:{enc_scope}`` vs ``fastmcp:task:anon``) β see+``task_redis_prefix``.++``task_scope`` is the raw scope identifier (typically derived from+``client_id`` or ``client_id|sub``); encoding happens once, at the boundary,+in this module.## Functions-### `build_task_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L15" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `build_task_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L41" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```python-build_task_key(session_id: str, client_task_id: str, task_type: str, component_identifier: str) -> str+build_task_key(task_scope: str | None, client_task_id: str, task_type: str, component_identifier: str) -> str```Build Docket task key with embedded metadata.-Format: `{session_id}:{client_task_id}:{task_type}:{component_identifier}`--The component_identifier is URI-encoded to handle special characters (colons, slashes, etc.).+When ``task_scope`` is ``None`` the task is anonymous and lives in the+``anon`` keyspace. Otherwise it lives under ``auth:{enc_scope}``.**Args:**-- `session_id`: Session ID for security scoping+- `task_scope`: Raw authorization scope, or ``None`` for anonymous tasks- `client_task_id`: Client-provided task ID- `task_type`: Type of task ("tool", "prompt", "resource")- `component_identifier`: Tool name, prompt name, or resource URI@@ -43,16 +49,18 @@ The component_identifier is URI-encoded to handle special characters (colons, sl**Examples:**->>> build_task_key("session123", "task456", "tool", "my_tool")-'session123:task456:tool:my_tool'->>> build_task_key("session123", "task456", "resource", "file://data.txt")-'session123:task456:resource:file%3A%2F%2Fdata.txt'+>>> build_task_key("client-a", "task456", "tool", "my_tool")+'auth:client-a:task456:tool:my_tool'+>>> build_task_key(None, "task456", "tool", "my_tool")+'anon:task456:tool:my_tool'+>>> build_task_key("client-a", "task456", "resource", "file://data.txt")+'auth:client-a:task456:resource:file%3A%2F%2Fdata.txt'-### `parse_task_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L47" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `parse_task_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L80" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```python-parse_task_key(task_key: str) -> dict[str, str]+parse_task_key(task_key: str) -> TaskKeyParts```@@ -62,17 +70,21 @@ Parse Docket task key to extract metadata.- `task_key`: Encoded task key from Docket**Returns:**-- Dict with keys: session_id, client_task_id, task_type, component_identifier+- Dict with keys: ``task_scope`` (``str | None``), ``client_task_id``,+- ``task_type``, ``component_identifier``.++**Raises:**+- `ValueError`: If the key has an unrecognized tag or wrong segment count.**Examples:**->>> parse_task_key("session123:task456:tool:my_tool")-`{'session_id': 'session123', 'client_task_id': 'task456', 'task_type': 'tool', 'component_identifier': 'my_tool'}`->>> parse_task_key("session123:task456:resource:file%3A%2F%2Fdata.txt")-`{'session_id': 'session123', 'client_task_id': 'task456', 'task_type': 'resource', 'component_identifier': 'file://data.txt'}`+>>> parse_task_key("auth:client-a:task456:tool:my_tool")+`{'task_scope': 'client-a', 'client_task_id': 'task456', 'task_type': 'tool', 'component_identifier': 'my_tool'}`+>>> parse_task_key("anon:task456:tool:my_tool")+`{'task_scope': None, 'client_task_id': 'task456', 'task_type': 'tool', 'component_identifier': 'my_tool'}`-### `get_client_task_id_from_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L78" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_client_task_id_from_key` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L137" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_client_task_id_from_key(task_key: str) -> str@@ -85,5 +97,37 @@ Extract just the client task ID from a task key.- `task_key`: Full encoded task key**Returns:**-- Client-provided task ID (second segment)+- Client-provided task ID++**Examples:**++>>> get_client_task_id_from_key("auth:client-a:task456:tool:my_tool")+'task456'+>>> get_client_task_id_from_key("anon:task456:tool:my_tool")+'task456'+++### `task_redis_prefix` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L156" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>++```python+task_redis_prefix(task_scope: str | None) -> str+```+++Return the Redis key prefix that owns a given scope.++Authenticated tasks live under ``fastmcp:task:auth:{enc_scope}``;+anonymous tasks live under ``fastmcp:task:anon``. Callers append+``f":{task_id}:..."`` to compose the final key.+++## Classes++### `TaskKeyParts` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/keys.py#L23" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+++Decoded segments of a Docket task key.++``task_scope`` is ``None`` for anonymous tasks, the raw scope string+otherwise.diff --git a/docs/python-sdk/fastmcp-server-tasks-notifications.mdx b/docs/python-sdk/fastmcp-server-tasks-notifications.mdxindex 217b4b6ac..441760f34 100644--- a/docs/python-sdk/fastmcp-server-tasks-notifications.mdx+++ b/docs/python-sdk/fastmcp-server-tasks-notifications.mdx@@ -67,7 +67,7 @@ This loop:- `fastmcp`: FastMCP server instance (for elicitation relay)-### `ensure_subscriber_running` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L238" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `ensure_subscriber_running` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L246" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonensure_subscriber_running(session_id: str, session: ServerSession, docket: Docket, fastmcp: FastMCP) -> None@@ -86,7 +86,7 @@ Safe to call multiple times for the same session.- `fastmcp`: FastMCP server instance (for elicitation relay)-### `stop_subscriber` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L278" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `stop_subscriber` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L286" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonstop_subscriber(session_id: str) -> None@@ -102,7 +102,7 @@ for delivery if client reconnects (with TTL expiration).- `session_id`: Session identifier-### `get_subscriber_count` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L298" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `get_subscriber_count` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/notifications.py#L306" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonget_subscriber_count() -> intdiff --git a/docs/python-sdk/fastmcp-server-tasks-requests.mdx b/docs/python-sdk/fastmcp-server-tasks-requests.mdxindex a8b31a13d..64ac4a263 100644--- a/docs/python-sdk/fastmcp-server-tasks-requests.mdx+++ b/docs/python-sdk/fastmcp-server-tasks-requests.mdx@@ -16,7 +16,7 @@ This module requires fastmcp[tasks] (pydocket). It is only imported when docket## Functions-### `tasks_get_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L137" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `tasks_get_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L135" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontasks_get_handler(server: FastMCP, params: dict[str, Any]) -> GetTaskResult@@ -33,7 +33,7 @@ Handle MCP 'tasks/get' request (SEP-1686).- Task status response with spec-compliant fields-### `tasks_result_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L222" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `tasks_result_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L220" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontasks_result_handler(server: FastMCP, params: dict[str, Any]) -> Any@@ -52,7 +52,7 @@ Converts raw task return values to MCP types based on task type.- MCP result (CallToolResult, GetPromptResult, or ReadResourceResult)-### `tasks_list_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L403" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `tasks_list_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L401" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontasks_list_handler(server: FastMCP, params: dict[str, Any]) -> ListTasksResult@@ -71,7 +71,7 @@ Note: With client-side tracking, this returns minimal info.- Response with tasks list and pagination-### `tasks_cancel_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L421" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `tasks_cancel_handler` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/tasks/requests.py#L419" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythontasks_cancel_handler(server: FastMCP, params: dict[str, Any]) -> CancelTaskResult