fastmcp CLI is installed automatically with FastMCP. It’s the primary way to run, test, install, and interact with MCP servers from your terminal.
Commands at a Glance
| Command | What it does |
|---|---|
run | Run a server (local file, factory function, remote URL, or config file) |
dev inspector | Launch a server inside the MCP Inspector for interactive testing |
install | Install a server into Claude Code, Claude Desktop, Cursor, Gemini CLI, or Goose |
inspect | Print a server’s tools, resources, and prompts as a summary or JSON report |
list | List a server’s tools (and optionally resources and prompts) |
call | Call a single tool with arguments |
discover | Find MCP servers configured in your editors and tools |
generate-cli | Scaffold a standalone typed CLI from a server’s tool schemas |
project prepare | Pre-install dependencies into a reusable uv project |
auth cimd | Create and validate CIMD documents for OAuth |
version | Print version info (--copy to copy to clipboard) |
Server Targets
Most commands need to know which server to talk to. You pass a “server spec” as the first argument, and FastMCP resolves the right transport automatically. URLs connect to a running HTTP server:mcp.run() boilerplate needed. FastMCP finds a server instance named mcp, server, or app in the file, or you can specify one explicitly:
fastmcp.json format and standard MCP config files with an mcpServers key:
--command instead of a positional argument:
Name-Based Resolution
If your servers are already configured in an editor or tool, you can refer to them by name. FastMCP scans configs from Claude Desktop, Claude Code, Cursor, Gemini CLI, and Goose:source:name form to be specific:
fastmcp discover to see what’s available on your machine.
Authentication
When targeting an HTTP URL, the CLI enables OAuth authentication by default. If the server requires it, you’ll be guided through the flow (typically opening a browser). If it doesn’t, the setup is a silent no-op. To skip authentication entirely — useful for local development servers — pass--auth none:

