Installation
The CLI is automatically available when you install FastMCP as a dependency: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.
fastmcp inspect
Launches the MCP Inspector for visual debugging of your server.
fastmcp validate
Validates your FastMCP server file for syntax and structure.
- TypeScript compilation checks
- Server structure verification
- Optional strict mode type checking
--strict,-s- Enable strict validation with type checking
Getting Help
To see all available commands and options: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