dotsagent.io
Language:English
OpenClaw

Add MCP servers to OpenClaw

OpenClaw reads servers from mcp.servers in ~/.openclaw/openclaw.json, a JSON5 file, or adds them with openclaw mcp add.

macOS
~/.openclaw/openclaw.json
Windows
~/.openclaw/openclaw.json
Linux
~/.openclaw/openclaw.json
Top-level key
mcp.servers
Format
json5
OAuth for remote servers
Yes

Example config

This example adds GitHub's hosted server and Playwright as a local server, in the shape this client expects.

~/.openclaw/openclaw.json
{
  "mcp": {
    "servers": {
      "github": {
        "url": "https://api.githubcopilot.com/mcp/",
        "transport": "streamable-http"
      },
      "playwright": {
        "command": "npx",
        "args": [
          "@playwright/mcp@latest"
        ]
      }
    }
  }
}
shell
openclaw mcp add github --url https://api.githubcopilot.com/mcp/ --transport streamable-http
openclaw mcp add playwright --command npx --arg @playwright/mcp@latest

Notes and quirks

  • Always set transport on remote entries: if it's missing, OpenClaw uses legacy SSE.
  • openclaw mcp doctor <name> --probe tests a configured server.
  • openclaw mcp login <name> runs OAuth for a remote server.
  • openclaw mcp serve exposes OpenClaw itself as an MCP server.

Build a OpenClaw config →

Other clients

Sources

  1. docs.openclaw.ai/tools/mcp
  2. docs.openclaw.ai/cli/mcp
  3. docs.openclaw.ai/cli/mcp/transports
  4. docs.openclaw.ai/gateway/config-extensions

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026