|
53 | 53 | - [Development Mode](#development-mode) |
54 | 54 | - [Claude Desktop Integration](#claude-desktop-integration) |
55 | 55 | - [Direct Execution](#direct-execution) |
| 56 | + - [CLI Reference](#cli-reference) |
56 | 57 | - [Streamable HTTP Transport](#streamable-http-transport) |
57 | 58 | - [CORS Configuration for Browser-Based Clients](#cors-configuration-for-browser-based-clients) |
58 | 59 | - [Mounting to an Existing ASGI Server](#mounting-to-an-existing-asgi-server) |
@@ -1241,6 +1242,43 @@ uv run mcp run servers/direct_execution.py |
1241 | 1242 |
|
1242 | 1243 | Note that `uv run mcp run` or `uv run mcp dev` only supports server using FastMCP and not the low-level server variant. |
1243 | 1244 |
|
| 1245 | +### CLI Reference |
| 1246 | + |
| 1247 | +A complete reference for all `mcp` CLI commands and their flags. |
| 1248 | + |
| 1249 | +#### `mcp dev <file_spec>` |
| 1250 | + |
| 1251 | +Run an MCP server with the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for interactive testing and debugging. |
| 1252 | + |
| 1253 | +| Flag | Short | Type | Description | |
| 1254 | +|------|-------|------|-------------| |
| 1255 | +| `--with-editable` | `-e` | `PATH` | Directory containing `pyproject.toml` to install in editable mode | |
| 1256 | +| `--with` | | `TEXT` | Additional packages to install (repeatable) | |
| 1257 | + |
| 1258 | +#### `mcp run <file_spec>` |
| 1259 | + |
| 1260 | +Run an MCP server directly. The server can be specified as a module (`server.py`) or with an explicit object path (`server.py:app`). |
| 1261 | + |
| 1262 | +| Flag | Short | Type | Description | |
| 1263 | +|------|-------|------|-------------| |
| 1264 | +| `--transport` | `-t` | `stdio\|sse` | Transport protocol to use (default: `stdio`) | |
| 1265 | + |
| 1266 | +#### `mcp install <file_spec>` |
| 1267 | + |
| 1268 | +Install an MCP server in the Claude Desktop app. Environment variables are preserved once set and only updated when new values are explicitly provided. |
| 1269 | + |
| 1270 | +| Flag | Short | Type | Description | |
| 1271 | +|------|-------|------|-------------| |
| 1272 | +| `--name` | `-n` | `TEXT` | Custom name for the server (defaults to file name) | |
| 1273 | +| `--with-editable` | `-e` | `PATH` | Directory containing `pyproject.toml` to install in editable mode | |
| 1274 | +| `--with` | | `TEXT` | Additional packages to install (repeatable) | |
| 1275 | +| `--env-var` | `-v` | `KEY=VALUE` | Environment variables in `KEY=VALUE` format (repeatable) | |
| 1276 | +| `--env-file` | `-f` | `PATH` | Load environment variables from a `.env` file | |
| 1277 | + |
| 1278 | +#### `mcp version` |
| 1279 | + |
| 1280 | +Print the installed MCP SDK version. |
| 1281 | + |
1244 | 1282 | ### Streamable HTTP Transport |
1245 | 1283 |
|
1246 | 1284 | > **Note**: Streamable HTTP transport is the recommended transport for production deployments. Use `stateless_http=True` and `json_response=True` for optimal scalability. |
|
0 commit comments