docs/python-sdk/fastmcp-cli-install-claude_desktop.mdx
fastmcp.cli.install.claude_desktopClaude Desktop integration for FastMCP install using Cyclopts.
get_claude_config_path <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_claude_config_path(config_path: Path | None = None) -> Path | None
Get the Claude config directory based on platform.
Args:
config_path: Optional custom path to the Claude Desktop config directoryinstall_claude_desktop <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L49" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>install_claude_desktop(file: Path, server_object: str | None, name: str) -> bool
Install FastMCP server in Claude Desktop.
Args:
file: Path to the server fileserver_object: Optional server object name (for :object suffix)name: Name for the server in Claude's configwith_editable: Optional list of directories to install in editable modewith_packages: Optional list of additional packages to installenv_vars: Optional dictionary of environment variablespython_version: Optional Python version to usewith_requirements: Optional requirements file to install fromproject: Optional project directory to run withinconfig_path: Optional custom path to Claude Desktop config directoryReturns:
claude_desktop_command <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L139" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>claude_desktop_command(server_spec: str) -> None
Install an MCP server in Claude Desktop.
Args:
server_spec: Python file to install, optionally with :object suffix