> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/warpdotdev/warp/llms.txt
> Use this file to discover all available pages before exploring further.

# oz mcp — manage Model Context Protocol servers

> List the MCP servers configured in your Warp account. Attach MCP servers to individual agent runs using the --mcp flag on oz agent run.

Model Context Protocol (MCP) servers extend the capabilities of Oz agents by providing them with additional tools — for example, a database query tool, a code search tool, or a third-party API integration. The `oz mcp` command lets you list the MCP servers registered in your Warp account. To attach an MCP server to a specific agent run, use the `--mcp` flag on `oz agent run` or `oz agent run-cloud`.

## Synopsis

```bash theme={null}
oz mcp <subcommand> [flags]
```

## Subcommands

| Subcommand | Description                                      |
| ---------- | ------------------------------------------------ |
| `list`     | List MCP servers configured in your Warp account |

***

## oz mcp list

Lists all MCP servers configured in your Warp account.

```bash theme={null}
oz mcp list
```

### Examples

```bash theme={null}
# List all MCP servers
oz mcp list

# Machine-readable JSON output
oz mcp list --output-format json
```

***

## Attaching MCP servers to agent runs

When running an agent, you can attach one or more MCP servers directly using the `--mcp` flag on `oz agent run` or `oz agent run-cloud`. This flag accepts either a path to a JSON configuration file or inline JSON, and can be repeated to include multiple servers.

<Tip>
  You can pass the full MCP server configuration inline as JSON, or point to a config file on disk. Both forms are accepted.
</Tip>

### Using a config file

```bash theme={null}
oz agent run \
  --prompt "Query the production database and summarise slow queries" \
  --mcp ./mcp-servers.json
```

### Using inline JSON

```bash theme={null}
oz agent run \
  --prompt "Search the codebase for all TODO comments" \
  --mcp '{"mcpServers": {"my-tool": {"command": "npx", "args": ["-y", "my-mcp-tool"]}}}'
```

### Attaching multiple servers

Specify `--mcp` multiple times to attach several servers to the same run:

```bash theme={null}
oz agent run \
  --prompt "Review the PR and check the database for related issues" \
  --mcp ./db-server.json \
  --mcp ./github-server.json
```

The same `--mcp` flag is available on `oz agent run-cloud` for cloud runs and on `oz schedule create` / `oz schedule update` for scheduled agents.
