docs/python-sdk/fastmcp-cli-install-mcp_json.mdx
fastmcp.cli.install.mcp_jsonMCP configuration JSON generation for FastMCP install using Cyclopts.
install_mcp_json <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>install_mcp_json(file: Path, server_object: str | None, name: str) -> bool
Generate MCP configuration JSON for manual installation.
Args:
file: Path to the server fileserver_object: Optional server object name (for :object suffix)name: Name for the server in MCP configwith_editable: Optional list of directories to install in editable modewith_packages: Optional list of additional packages to installenv_vars: Optional dictionary of environment variablescopy: If True, copy to clipboard instead of printing to stdoutpython_version: Optional Python version to usewith_requirements: Optional requirements file to install fromproject: Optional project directory to run withinReturns:
mcp_json_command <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L98" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>mcp_json_command(server_spec: str) -> None
Generate MCP configuration JSON for manual installation.
Args:
server_spec: Python file to install, optionally with :object suffix