Install MCP servers into Claude, Cursor, Gemini, and other clients
New in version 2.10.3fastmcp install registers a server with an MCP client application so the client can launch it automatically. Each MCP client runs servers in its own isolated environment, which means dependencies need to be explicitly declared — you can’t rely on whatever happens to be installed locally.
uv must be installed and available in your system PATH. Both Claude Desktop and Cursor run servers in isolated environments managed by uv. On macOS, install it globally with Homebrew for Claude Desktop compatibility: brew install uv.
Because MCP clients run servers in isolation, you need to tell the install command what your server needs. There are two approaches:Command-line flags let you specify dependencies directly:
fastmcp.json configuration files declare dependencies alongside the server definition. When you install from a config file, dependencies are picked up automatically:
Copy
fastmcp install claude-desktop fastmcp.jsonfastmcp install claude-desktop # auto-detects fastmcp.json in current directory
The mcp-json target generates standard MCP configuration JSON instead of installing into a specific client. This is useful for clients that FastMCP doesn’t directly support, for CI/CD environments, or for sharing server configs:
Copy
fastmcp install mcp-json server.py
The output follows the standard format used by Claude Desktop, Cursor, and other MCP clients:
The stdio target outputs the shell command an MCP host would use to start your server over stdio:
Copy
fastmcp install stdio server.py# Output: uv run --with fastmcp fastmcp run /absolute/path/to/server.py
When installing from a fastmcp.json, dependencies from the config are included automatically:
Copy
fastmcp install stdio fastmcp.json# Output: uv run --with fastmcp --with pillow --with 'qrcode[pil]>=8.0' fastmcp run /path/to/server.py
Use --copy to copy to clipboard.
fastmcp install is designed for local server files with stdio transport. For remote servers running over HTTP, use your client’s native configuration — FastMCP’s value here is simplifying the complex local setup with uv, dependencies, and environment variables.