Skip to main content
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

oz mcp <subcommand> [flags]

Subcommands

SubcommandDescription
listList MCP servers configured in your Warp account

oz mcp list

Lists all MCP servers configured in your Warp account.
oz mcp list

Examples

# 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.
You can pass the full MCP server configuration inline as JSON, or point to a config file on disk. Both forms are accepted.

Using a config file

oz agent run \
  --prompt "Query the production database and summarise slow queries" \
  --mcp ./mcp-servers.json

Using inline JSON

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:
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.

Build docs developers (and LLMs) love