| 1 | <html> |
| 2 | |
| 3 | <head> |
| 4 | <title>Configuring MCP Servers</title> |
| 5 | |
| 6 | </head> |
| 7 | |
| 8 | <body> |
| 9 | <div x-data> |
| 10 | <section class="mcp-example-intro"> |
| 11 | <p> |
| 12 | Agent Zero uses the standard <code>mcpServers</code> JSON shape used by MCP-compatible clients. |
| 13 | Each key under <code>mcpServers</code> is one MCP server. |
| 14 | </p> |
| 15 | |
| 16 | <div class="mcp-example-notes"> |
| 17 | <div> |
| 18 | <strong>Local command servers</strong> |
| 19 | <span>Use <code>command</code>, optional <code>args</code>, and optional <code>env</code>.</span> |
| 20 | </div> |
| 21 | <div> |
| 22 | <strong>Remote servers</strong> |
| 23 | <span>Use <code>url</code>, optional <code>headers</code>, and a transport <code>type</code>.</span> |
| 24 | </div> |
| 25 | <div> |
| 26 | <strong>Common fields</strong> |
| 27 | <span><code>description</code>, <code>disabled</code>, <code>init_timeout</code>, and <code>tool_timeout</code> work on either kind of server.</span> |
| 28 | </div> |
| 29 | </div> |
| 30 | </section> |
| 31 | |
| 32 | <h3>Example MCP servers configuration JSON</h3> |
| 33 | <div id="mcp-servers-example"></div> |
| 34 | |
| 35 | <script> |
| 36 | setTimeout(() => { |
| 37 | const jsonExample = JSON.stringify({ |
| 38 | "mcpServers": |
| 39 | { |
| 40 | "sqlite": { |
| 41 | "command": "uvx", |
| 42 | "args": [ |
| 43 | "mcp-server-sqlite", |
| 44 | "--db-path", |
| 45 | "/root/db.sqlite" |
| 46 | ], |
| 47 | "init_timeout": 10, |
| 48 | "tool_timeout": 200 |
| 49 | }, |
| 50 | "sequential-thinking": { |
| 51 | "disabled": true, |
| 52 | "command": "npx", |
| 53 | "args": [ |
| 54 | "--yes", |
| 55 | "--package", |
| 56 | "@modelcontextprotocol/server-sequential-thinking", |
| 57 | "mcp-server-sequential-thinking" |
| 58 | ] |
| 59 | }, |
| 60 | "deep-wiki": { |
| 61 | "description": "Use this MCP to analyze github repositories", |
| 62 | "url": "https://mcp.deepwiki.com/mcp", |
| 63 | "type": "streamable-http" |
| 64 | } |
| 65 | } |
| 66 | }, null, 2); |
| 67 | |
| 68 | const editor = ace.edit("mcp-servers-example"); |
| 69 | const dark = localStorage.getItem("darkMode"); |
| 70 | if (dark != "false") { |
| 71 | editor.setTheme("ace/theme/github_dark"); |
| 72 | } else { |
| 73 | editor.setTheme("ace/theme/tomorrow"); |
| 74 | } |
| 75 | editor.session.setMode("ace/mode/json"); |
| 76 | editor.setValue(jsonExample); |
| 77 | editor.clearSelection(); |
| 78 | editor.setReadOnly(true); |
| 79 | }, 0); |
| 80 | </script> |
| 81 | </div> |
| 82 | |
| 83 | <style> |
| 84 | .mcp-example-intro { |
| 85 | display: flex; |
| 86 | flex-direction: column; |
| 87 | gap: 0.85rem; |
| 88 | margin-bottom: 1rem; |
| 89 | color: var(--color-text); |
| 90 | } |
| 91 | |
| 92 | .mcp-example-intro p, |
| 93 | .mcp-example-intro h3 { |
| 94 | margin: 0; |
| 95 | } |
| 96 | |
| 97 | .mcp-example-notes { |
| 98 | display: grid; |
| 99 | grid-template-columns: repeat(3, minmax(0, 1fr)); |
| 100 | gap: 0.75rem; |
| 101 | } |
| 102 | |
| 103 | .mcp-example-notes > div { |
| 104 | display: flex; |
| 105 | flex-direction: column; |
| 106 | gap: 0.35rem; |
| 107 | padding: 0.75rem; |
| 108 | border: 1px solid var(--color-border); |
| 109 | border-radius: 8px; |
| 110 | background: color-mix(in srgb, var(--color-panel) 88%, transparent); |
| 111 | } |
| 112 | |
| 113 | .mcp-example-notes span { |
| 114 | color: var(--color-text-muted); |
| 115 | font-size: 0.9rem; |
| 116 | line-height: 1.4; |
| 117 | } |
| 118 | |
| 119 | .mcp-example-intro code { |
| 120 | padding: 0.08rem 0.28rem; |
| 121 | border-radius: 4px; |
| 122 | background: var(--color-input); |
| 123 | color: var(--color-text); |
| 124 | font-family: var(--font-family-code); |
| 125 | font-size: 0.88em; |
| 126 | } |
| 127 | |
| 128 | #mcp-servers-example { |
| 129 | width: 100%; |
| 130 | height: 40em; |
| 131 | border: 1px solid var(--color-border); |
| 132 | border-radius: 8px; |
| 133 | overflow: hidden; |
| 134 | } |
| 135 | |
| 136 | @media (max-width: 840px) { |
| 137 | .mcp-example-notes { |
| 138 | grid-template-columns: 1fr; |
| 139 | } |
| 140 | } |
| 141 | </style> |
| 142 | |
| 143 | </body> |
| 144 | |
| 145 | </html> |