Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- [Development Mode](#development-mode)
- [Claude Desktop Integration](#claude-desktop-integration)
- [Direct Execution](#direct-execution)
- [CLI Reference](#cli-reference)
- [Streamable HTTP Transport](#streamable-http-transport)
- [CORS Configuration for Browser-Based Clients](#cors-configuration-for-browser-based-clients)
- [Mounting to an Existing ASGI Server](#mounting-to-an-existing-asgi-server)
Expand Down Expand Up @@ -1232,6 +1233,43 @@ uv run mcp run servers/direct_execution.py

Note that `uv run mcp run` or `uv run mcp dev` only supports server using MCPServer and not the low-level server variant.

### CLI Reference

A complete reference for all `mcp` CLI commands and their flags.

#### `mcp dev <file_spec>`

Run an MCP server with the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for interactive testing and debugging.

| Flag | Short | Type | Description |
| -------------------- | ----- | ------ | ----------------------------------------------------------------- |
| `--with-editable` | `-e` | `PATH` | Directory containing `pyproject.toml` to install in editable mode |
| `--with` | | `TEXT` | Additional packages to install (repeatable) |

#### `mcp run <file_spec>`

Run an MCP server directly. The server can be specified as a module (`server.py`) or with an explicit object path (`server.py:app`).

| Flag | Short | Type | Description |
| --------------- | ----- | ------------- | -------------------------------------------- |
| `--transport` | `-t` | `stdio\|sse` | Transport protocol to use (default: `stdio`) |

#### `mcp install <file_spec>`

Install an MCP server in the Claude Desktop app. Environment variables are preserved once set and only updated when new values are explicitly provided.

| Flag | Short | Type | Description |
| -------------------- | ----- | ----------- | ----------------------------------------------------------------- |
| `--name` | `-n` | `TEXT` | Custom name for the server (defaults to file name) |
| `--with-editable` | `-e` | `PATH` | Directory containing `pyproject.toml` to install in editable mode |
| `--with` | | `TEXT` | Additional packages to install (repeatable) |
| `--env-var` | `-v` | `KEY=VALUE` | Environment variables in `KEY=VALUE` format (repeatable) |
| `--env-file` | `-f` | `PATH` | Load environment variables from a `.env` file |

#### `mcp version`

Print the installed MCP SDK version.

### Streamable HTTP Transport

> **Note**: Streamable HTTP transport is the recommended transport for production deployments. Use `stateless_http=True` and `json_response=True` for optimal scalability.
Expand Down
Loading