| 1 | # Advanced MCP Configuration |
| 2 | |
| 3 | Most users should start with [MCP Setup](../guides/mcp-setup.md). |
| 4 | |
| 5 | This page is for people who need to paste or review MCP JSON by hand. MCP |
| 6 | architecture and source-linked internals live in |
| 7 | [DeepWiki for Agent Zero](https://deepwiki.com/agent0ai/agent-zero). |
| 8 | |
| 9 | ## Basic Shape |
| 10 | |
| 11 | Command-based MCP tool: |
| 12 | |
| 13 | ```json |
| 14 | { |
| 15 | "mcpServers": { |
| 16 | "sqlite": { |
| 17 | "command": "uvx", |
| 18 | "args": ["mcp-server-sqlite", "--db-path", "/root/db.sqlite"] |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | ``` |
| 23 | |
| 24 | URL-based MCP tool: |
| 25 | |
| 26 | ```json |
| 27 | { |
| 28 | "mcpServers": { |
| 29 | "external-api": { |
| 30 | "url": "https://api.example.com/mcp", |
| 31 | "headers": { |
| 32 | "Authorization": "Bearer YOUR_API_KEY" |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | ``` |
| 38 | |
| 39 | ## Common Fields |
| 40 | |
| 41 | | Field | Meaning | |
| 42 | | --- | --- | |
| 43 | | `command` | Starts a local MCP tool from a command. | |
| 44 | | `args` | Arguments passed to that command. | |
| 45 | | `url` | Connects to an MCP tool that is already running. | |
| 46 | | `headers` | Optional HTTP headers, often used for authentication. | |
| 47 | | `env` | Optional environment variables for command-based tools. | |
| 48 | | `disabled` | Temporarily turns one MCP entry off. | |
| 49 | |
| 50 | Use `command` for local tools and `url` for tools that are already running |
| 51 | somewhere else. |
| 52 | |
| 53 | ## Docker Addresses |
| 54 | |
| 55 | If Agent Zero runs in Docker, remember that "localhost" means the container, not |
| 56 | always your host machine. |
| 57 | |
| 58 | | Where the MCP tool runs | Address to use from Agent Zero | |
| 59 | | --- | --- | |
| 60 | | Host machine on macOS or Windows | `host.docker.internal` | |
| 61 | | Another container | The container name on the same Docker network | |
| 62 | | Remote machine | Its reachable HTTPS URL | |
| 63 | | Inside Agent Zero's container | A command-based config | |
| 64 | |
| 65 | On Linux, `host.docker.internal` may need extra Docker setup. Running the MCP |
| 66 | tool in the same Docker network is often simpler. |
| 67 | |
| 68 | ## Safety |
| 69 | |
| 70 | - Use MCP tools you trust. |
| 71 | - Keep real API keys out of public screenshots and repositories. |
| 72 | - Prefer project secrets or environment variables for credentials. |
| 73 | - Remove MCP tools you no longer use. |
| 74 | |
| 75 | ## Related |
| 76 | |
| 77 | - [MCP Setup](../guides/mcp-setup.md) |
| 78 | - [Browser Guide](../guides/browser.md) |
| 79 | - [A0 CLI Connector](../guides/a0-cli-connector.md) |
| 80 | - [DeepWiki for Agent Zero](https://deepwiki.com/agent0ai/agent-zero) |