New in versionDocumentation Index
Fetch the complete documentation index at: https://gofastmcp.com/llms.txt
Use this file to discover all available pages before exploring further.
2.10.3
fastmcp 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.
Supported Clients
| Client | Install method |
|---|---|
claude-code | Claude Code’s built-in MCP management |
claude-desktop | Direct config file modification |
cursor | Deeplink that opens Cursor for confirmation |
gemini-cli | Gemini CLI’s built-in MCP management |
goose | Deeplink that opens Goose for confirmation (uses uvx) |
mcp-json | Generates standard MCP JSON config for manual use |
stdio | Outputs the shell command to run via stdio |
Declaring Dependencies
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:
Options
| Option | Flag | Description |
|---|---|---|
| Server Name | --server-name, -n | Custom name for the server |
| Editable Package | --with-editable, -e | Install a directory in editable mode |
| Extra Packages | --with | Additional packages (repeatable) |
| Environment Variables | --env | KEY=VALUE pairs (repeatable) |
| Environment File | --env-file, -f | Load env vars from a .env file |
| Python | --python | Python version (e.g., 3.11) |
| Project | --project | Run within a uv project directory |
| Requirements | --with-requirements | Install from a requirements file |
| Config Path | --config-path | Custom path to Claude Desktop config directory (claude-desktop only) |
Examples
Generating MCP JSON
Themcp-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 to send it to your clipboard instead of stdout.
Generating Stdio Commands
Thestdio target outputs the shell command an MCP host would use to start your server over stdio:
fastmcp.json, dependencies from the config are included automatically:
--copy to copy to clipboard.

