Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273---title: Inspecting ServerssidebarTitle: Inspectingdescription: View a server's components and metadataicon: magnifying-glass---
import { VersionBadge } from '/snippets/version-badge.mdx'
<VersionBadge version="2.9.0" />
`fastmcp inspect` loads a server and reports what it contains — its tools, resources, prompts, version, and metadata. The default output is a human-readable summary:
```bashfastmcp inspect server.py```
```Server: MyServerInstructions: A helpful MCP serverVersion: 1.0.0
Components: Tools: 5 Prompts: 2 Resources: 3 Templates: 1
Environment: FastMCP: 2.0.0 MCP: 1.0.0
Use --format [fastmcp|mcp] for complete JSON output```
## JSON Output
For programmatic use, two JSON formats are available:
**FastMCP format** (`--format fastmcp`) includes everything FastMCP knows about the server — tool tags, enabled status, output schemas, annotations, and custom metadata. Field names use `snake_case`. This is the format for debugging and introspecting FastMCP servers.
**MCP protocol format** (`--format mcp`) shows exactly what MCP clients see through the protocol — only standard MCP fields, `camelCase` names, no FastMCP-specific extensions. This is the format for verifying client compatibility and debugging what clients actually receive.
```bash# Full FastMCP metadata to stdoutfastmcp inspect server.py --format fastmcp
# MCP protocol view saved to filefastmcp inspect server.py --format mcp -o manifest.json```
## Options
| Option | Flag | Description || ------ | ---- | ----------- || Format | `--format`, `-f` | `fastmcp` or `mcp` (required when using `-o`) || Output File | `--output`, `-o` | Save to file instead of stdout |
## Entrypoints
The `inspect` command supports the same local entrypoints as [`fastmcp run`](/cli/running): inferred instances, explicit entrypoints, factory functions, and `fastmcp.json` configs.
```bashfastmcp inspect server.py # inferred instancefastmcp inspect server.py:my_server # explicit entrypointfastmcp inspect server.py:create_server # factory functionfastmcp inspect fastmcp.json # config file```
<Warning>`inspect` only works with local files and `fastmcp.json` — it doesn't connect to remote URLs or standard MCP config files.</Warning>