@@ -10,7 +10,7 @@ FastMCP CLI tools using Cyclopts.
1010
1111## Functions
1212
13- ### ` version ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L103 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
13+ ### ` version ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L63 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
1414
1515``` python
1616version()
@@ -20,45 +20,47 @@ version()
2020Display version information and platform details.
2121
2222
23- ### ` dev ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L141 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
23+ ### ` dev ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L101 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
2424
2525``` python
26- dev(server_spec: str ) -> None
26+ dev(server_spec: str | None = None ) -> None
2727```
2828
2929
3030Run an MCP server with the MCP Inspector for development.
3131
3232** Args:**
33- - ` server_spec ` : Python file to run, optionally with \: object suffix
33+ - ` server_spec ` : Python file to run, optionally with \: object suffix, or None to auto-detect fastmcp.json
3434
3535
36- ### ` run ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L286 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
36+ ### ` run ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L319 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
3737
3838``` python
39- run(server_spec: str , * server_args: str ) -> None
39+ run(server_spec: str | None = None , * server_args: str ) -> None
4040```
4141
4242
4343Run an MCP server or connect to a remote one.
4444
45- The server can be specified in four ways:
45+ The server can be specified in several ways:
46461 . Module approach: "server.py" - runs the module directly, looking for an object named 'mcp', 'server', or 'app'
47472 . Import approach : " server.py:app" - imports and runs the specified server object
48483 . URL approach: "http://server-url " - connects to a remote server and creates a proxy
49494 . MCPConfig file: "mcp.json" - runs as a proxy server for the MCP Servers in the MCPConfig file
50+ 5 . FastMCP config: "fastmcp.json" - runs server using FastMCP configuration
51+ 6 . No argument: looks for fastmcp.json in current directory
5052
5153Server arguments can be passed after -- :
5254fastmcp run server.py -- --config config.json --debug
5355
5456** Args:**
55- - ` server_spec ` : Python file, object specification (file\: obj), MCPConfig file, or URL
57+ - ` server_spec ` : Python file, object specification (file\: obj), config file, URL, or None to auto-detect
5658
5759
58- ### ` inspect ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L439 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
60+ ### ` inspect ` <sup ><a href = " https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L582 " target = " _blank" ><Icon icon = " github" style = " width: 14px; height: 14px;" /></a ></sup >
5961
6062``` python
61- inspect(server_spec: str ) -> None
63+ inspect(server_spec: str | None = None ) -> None
6264```
6365
6466
@@ -74,7 +76,9 @@ fastmcp inspect server.py
7476fastmcp inspect server.py -o report.json
7577fastmcp inspect server.py:mcp -o analysis.json
7678fastmcp inspect path/to/server.py:app -o /tmp/server-info.json
79+ fastmcp inspect fastmcp.json
80+ fastmcp inspect # auto-detect fastmcp.json
7781
7882** Args:**
79- - ` server_spec ` : Python file to inspect, optionally with \: object suffix
83+ - ` server_spec ` : Python file to inspect, optionally with \: object suffix, or fastmcp.json
8084
0 commit comments