Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

fix escaping problem

zzstoatzz98a91cbd9e02
diff --git a/docs/python-sdk/fastmcp-cli-claude.mdx b/docs/python-sdk/fastmcp-cli-claude.mdx
index 13fe7d600..6ea44b33e 100644
--- a/docs/python-sdk/fastmcp-cli-claude.mdx
+++ b/docs/python-sdk/fastmcp-cli-claude.mdx
@@ -30,7 +30,7 @@ update_claude_config(file_spec: str, server_name: str) -> bool
Add or update a FastMCP server in Claude's configuration.
**Args:**
-- `file_spec`: Path to the server file, optionally with :object suffix
+- `file_spec`: Path to the server file, optionally with \:object suffix
- `server_name`: Name for the server in Claude's config
- `with_editable`: Optional directory to install in editable mode
- `with_packages`: Optional list of additional packages to install
diff --git a/docs/python-sdk/fastmcp-cli-run.mdx b/docs/python-sdk/fastmcp-cli-run.mdx
index bdb07beac..7505c7fb4 100644
--- a/docs/python-sdk/fastmcp-cli-run.mdx
+++ b/docs/python-sdk/fastmcp-cli-run.mdx
@@ -30,7 +30,7 @@ parse_file_path(server_spec: str) -> tuple[Path, str | None]
Parse a file path that may include a server object specification.
**Args:**
-- `server_spec`: Path to file, optionally with :object suffix
+- `server_spec`: Path to file, optionally with \:object suffix
**Returns:**
- Tuple of (file_path, server_object)
@@ -47,7 +47,7 @@ Import a MCP server from a file.
**Args:**
- `file`: Path to the file
-- `server_object`: Optional object name in format "module:object" or just "object"
+- `server_object`: Optional object name in format "module\:object" or just "object"
**Returns:**
- The server object
@@ -97,7 +97,7 @@ run_command(server_spec: str, transport: str | None = None, host: str | None = N
Run a MCP server or connect to a remote one.
**Args:**
-- `server_spec`: Python file, object specification (file:obj), or URL
+- `server_spec`: Python file, object specification (file\:obj), or URL
- `transport`: Transport protocol to use
- `host`: Host to bind to when using http transport
- `port`: Port to bind to when using http transport
diff --git a/docs/python-sdk/fastmcp-client-auth-oauth.mdx b/docs/python-sdk/fastmcp-client-auth-oauth.mdx
index b8b3e64ad..f10afba36 100644
--- a/docs/python-sdk/fastmcp-client-auth-oauth.mdx
+++ b/docs/python-sdk/fastmcp-client-auth-oauth.mdx
@@ -26,8 +26,7 @@ This is intended to be provided to the `auth` parameter of an
httpx.AsyncClient (or appropriate FastMCP client/transport instance)
**Args:**
-- `mcp_url`: Full URL to the MCP endpoint (e.g.,
-- `"http`: //host/mcp/sse/")
+- `mcp_url`: Full URL to the MCP endpoint (e.g. "http\://host/mcp/sse/")
- `scopes`: OAuth scopes to request. Can be a
- `client_name`: Name for this client during registration
- `token_storage_cache_dir`: Directory for FileTokenStorage
diff --git a/docs/python-sdk/fastmcp-server-server.mdx b/docs/python-sdk/fastmcp-server-server.mdx
index 8f631c002..2b3c1ed83 100644
--- a/docs/python-sdk/fastmcp-server-server.mdx
+++ b/docs/python-sdk/fastmcp-server-server.mdx
@@ -223,7 +223,7 @@ This decorator supports multiple calling patterns:
- `name`: Optional name for the tool (keyword-only, alternative to name_or_fn)
- `description`: Optional description of what the tool does
- `tags`: Optional set of tags for categorizing the tool
-- `annotations`: Optional annotations about the tool's behavior (e.g. {"is_async": True})
+- `annotations`: Optional annotations about the tool's behavior (e.g. {"is_async"\: True})
- `exclude_args`: Optional list of argument names to exclude from the tool schema
- `enabled`: Optional boolean to enable or disable the tool
@@ -294,7 +294,7 @@ If the URI contains parameters (e.g. "resource://{param}") or the function
has parameters, it will be registered as a template resource.
**Args:**
-- `uri`: URI for the resource (e.g. "resource://my-resource" or "resource://{param}")
+- `uri`: URI for the resource (e.g. "resource\://my-resource" or "resource\://{param}")
- `name`: Optional name for the resource
- `description`: Optional description of the resource
- `mime_type`: Optional MIME type for the resource
diff --git a/docs/python-sdk/fastmcp-tools-tool_transform.mdx b/docs/python-sdk/fastmcp-tools-tool_transform.mdx
index c0d10e34d..abee7d5eb 100644
--- a/docs/python-sdk/fastmcp-tools-tool_transform.mdx
+++ b/docs/python-sdk/fastmcp-tools-tool_transform.mdx
@@ -89,10 +89,10 @@ to call the parent tool. Functions with **kwargs receive transformed
argument names.
- `name`: New name for the tool. Defaults to parent tool's name.
- `transform_args`: Optional transformations for parent tool arguments.
-Only specified arguments are transformed, others pass through unchanged:
-- str: Simple rename
-- ArgTransform: Complex transformation (rename/description/default/drop)
-- None: Drop the argument
+Only specified arguments are transformed, others pass through unchanged\:
+- str\: Simple rename
+- ArgTransform\: Complex transformation (rename/description/default/drop)
+- None\: Drop the argument
- `description`: New description. Defaults to parent's description.
- `tags`: New tags. Defaults to parent's tags.
- `annotations`: New annotations. Defaults to parent's annotations.
diff --git a/docs/python-sdk/fastmcp-utilities-json_schema.mdx b/docs/python-sdk/fastmcp-utilities-json_schema.mdx
index bedf79119..ad68473a0 100644
--- a/docs/python-sdk/fastmcp-utilities-json_schema.mdx
+++ b/docs/python-sdk/fastmcp-utilities-json_schema.mdx
@@ -20,6 +20,6 @@ Remove the given parameters from the schema.
- `schema`: The schema to compress
- `prune_params`: List of parameter names to remove from properties
- `prune_defs`: Whether to remove unused definitions
-- `prune_additional_properties`: Whether to remove additionalProperties: false
+- `prune_additional_properties`: Whether to remove additionalProperties\: false
- `prune_titles`: Whether to remove title fields from the schema
diff --git a/justfile b/justfile
index 9d918cb9d..a18451447 100644
--- a/justfile
+++ b/justfile
@@ -16,11 +16,11 @@ docs:
# Generate API reference documentation for all modules
api-ref-all:
- uv run --with-editable . --with mdxify@latest mdxify --all --root-module fastmcp --anchor-name "SDK Reference"
+ uvx --with-editable . --refresh-package mdxify mdxify@latest --all --root-module fastmcp --anchor-name "SDK Reference"
# Generate API reference for specific modules (e.g., just api-ref prefect.flows prefect.tasks)
api-ref *MODULES:
- uv run --with-editable . --with mdxify@latest mdxify {{MODULES}} --root-module fastmcp --anchor-name "SDK Reference"
+ uvx --with-editable . --refresh-package mdxify mdxify@latest {{MODULES}} --root-module fastmcp --anchor-name "SDK Reference"
# Clean up API reference documentation
api-ref-clean: