Skip to main content
The FastMCP CLI provides a set of commands to help you develop, test, and debug your MCP servers efficiently.

Installation

The CLI is automatically available when you install FastMCP as a dependency:
FastMCP should be installed as a development dependency in your project. The CLI binary is exposed through the fastmcp command.

Available Commands

The FastMCP CLI provides three main commands:

fastmcp dev

Runs your MCP server in development mode with an interactive CLI interface for testing.
Learn more in the dev command documentation.

fastmcp inspect

Launches the MCP Inspector for visual debugging of your server.
Learn more in the inspect command documentation.

fastmcp validate

Validates your FastMCP server file for syntax and structure.
Validation includes:
  • TypeScript compilation checks
  • Server structure verification
  • Optional strict mode type checking
Options:
  • --strict, -s - Enable strict validation with type checking

Getting Help

To see all available commands and options:
For help with a specific command:

Quick Example

Here’s a quick example workflow:
The CLI commands use npx tsx under the hood to execute TypeScript files directly, so you don’t need to compile your server first.

Next Steps

Dev Command

Learn about running servers in development mode

Inspect Command

Explore visual debugging with MCP Inspector