π The fast, Pythonic way to build MCP servers and clients.
chore: Update SDK documentation (#6237)
marvin-context-protocol[bot]9e691caab5ed
diff --git a/docs/python-sdk/fastmcp-cli-generate.mdx b/docs/python-sdk/fastmcp-cli-generate.mdxindex b6e2d7f29..beb025b41 100644--- a/docs/python-sdk/fastmcp-cli-generate.mdx+++ b/docs/python-sdk/fastmcp-cli-generate.mdx@@ -24,7 +24,7 @@ import lines needed by the expression. Raises ``ValueError`` for a transportthat cannot be written as a Python expression.-### `generate_cli_script` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L322" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `generate_cli_script` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L331" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythongenerate_cli_script(server_name: str, server_spec: str, transport_code: str, extra_imports: set[str], tools: list[mcp_types.Tool]) -> str@@ -34,7 +34,7 @@ generate_cli_script(server_name: str, server_spec: str, transport_code: str, extGenerate the full CLI script source code.-### `generate_skill_content` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L654" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `generate_skill_content` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L661" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythongenerate_skill_content(server_name: str, cli_filename: str, tools: list[mcp_types.Tool]) -> str@@ -44,7 +44,7 @@ generate_skill_content(server_name: str, cli_filename: str, tools: list[mcp_typeGenerate a SKILL.md file for a generated CLI script.-### `generate_cli_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L705" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `generate_cli_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/cli/generate.py#L712" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythongenerate_cli_command(server_spec: Annotated[str, cyclopts.Parameter(help='Server URL, Python file, MCPConfig JSON, discovered name, or .js file')], output: Annotated[str, cyclopts.Parameter(help='Output file path (default: cli.py)')] = 'cli.py') -> Nonediff --git a/docs/python-sdk/fastmcp-mcp_config.mdx b/docs/python-sdk/fastmcp-mcp_config.mdxindex b07dcfcbe..85a745a47 100644--- a/docs/python-sdk/fastmcp-mcp_config.mdx+++ b/docs/python-sdk/fastmcp-mcp_config.mdx@@ -32,7 +32,7 @@ Example configuration:## Functions-### `infer_transport_type_from_url` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L55" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `infer_transport_type_from_url` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L56" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythoninfer_transport_type_from_url(url: str | AnyUrl) -> Literal['http', 'sse']@@ -42,7 +42,7 @@ infer_transport_type_from_url(url: str | AnyUrl) -> Literal['http', 'sse']Infer the appropriate transport type from the given URL.-### `update_config_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L391" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `update_config_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L424" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonupdate_config_file(file_path: Path, server_name: str, server_config: CanonicalMCPServerTypes) -> None@@ -58,7 +58,7 @@ config with no servers, so it is created on write.## Classes-### `StdioMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L184" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `StdioMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L185" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>MCP server configuration for stdio transport.@@ -70,19 +70,19 @@ This is the canonical configuration format for MCP servers using stdio transport**Methods:**-#### `to_transport` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L219" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_transport` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L220" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_transport(self) -> StdioTransport | FastMCPTransport```-### `TransformingStdioMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L231" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `TransformingStdioMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L232" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>A Stdio server with tool transforms.-### `RemoteMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L235" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `RemoteMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L236" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>MCP server configuration for HTTP/SSE transport.@@ -94,19 +94,19 @@ This is the canonical configuration format for MCP servers using remote transpor**Methods:**-#### `to_transport` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L279" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_transport` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L312" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_transport(self) -> StreamableHttpTransport | SSETransport | FastMCPTransport```-### `TransformingRemoteMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L309" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `TransformingRemoteMCPServer` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L342" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>A Remote server with tool transforms.-### `MCPConfig` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L320" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `MCPConfig` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L353" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>A configuration object for MCP Servers that conforms to the canonical MCP configuration format@@ -118,7 +118,7 @@ For an MCPConfig that is strictly canonical, see the `CanonicalMCPConfig` class.**Methods:**-#### `wrap_servers_at_root` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L334" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `wrap_servers_at_root` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L367" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrap_servers_at_root(cls, values: dict[str, Any]) -> dict[str, Any]@@ -127,7 +127,7 @@ wrap_servers_at_root(cls, values: dict[str, Any]) -> dict[str, Any]If there's no mcpServers key but there are server configs at root, wrap them.-#### `add_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L347" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L380" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_server(self, name: str, server: MCPServerTypes) -> None@@ -136,7 +136,7 @@ add_server(self, name: str, server: MCPServerTypes) -> NoneAdd or update a server in the configuration.-#### `from_dict` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L352" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_dict` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L385" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_dict(cls, config: dict[str, Any]) -> Self@@ -145,7 +145,7 @@ from_dict(cls, config: dict[str, Any]) -> SelfParse MCP configuration from dictionary format.-#### `to_dict` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L356" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `to_dict` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L389" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonto_dict(self) -> dict[str, Any]@@ -154,7 +154,7 @@ to_dict(self) -> dict[str, Any]Convert MCPConfig to dictionary format, preserving all fields.-#### `write_to_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L360" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `write_to_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L393" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonwrite_to_file(self, file_path: Path) -> None@@ -163,7 +163,7 @@ write_to_file(self, file_path: Path) -> NoneWrite configuration to JSON file.-#### `from_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L366" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `from_file` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L399" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonfrom_file(cls, file_path: Path) -> Self@@ -172,7 +172,7 @@ from_file(cls, file_path: Path) -> SelfLoad configuration from JSON file.-### `CanonicalMCPConfig` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L376" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+### `CanonicalMCPConfig` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L409" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Canonical MCP configuration format.@@ -183,7 +183,7 @@ The format is designed to be client-agnostic and extensible for future use cases**Methods:**-#### `add_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L386" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>+#### `add_server` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/fastmcp_slim/fastmcp/mcp_config.py#L419" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>```pythonadd_server(self, name: str, server: CanonicalMCPServerTypes) -> None