---
title: "OpenClaw MCP config: file path, key, example · DotsAgent"
description: "Add MCP servers to OpenClaw from OpenClaw: where the config file lives, the top-level key and format, remote OAuth support and a sample config."
url: https://dotsagent.io/mcp/clients/openclaw
---

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

## 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 →](https://dotsagent.io/mcp/config#client=openclaw)

## Other clients

[Claude Desktop](https://dotsagent.io/mcp/clients/claude-desktop)

[Claude Code](https://dotsagent.io/mcp/clients/claude-code)

[Cursor](https://dotsagent.io/mcp/clients/cursor)

[VS Code (GitHub Copilot)](https://dotsagent.io/mcp/clients/vscode-copilot)

[Windsurf / Devin Desktop](https://dotsagent.io/mcp/clients/windsurf)

[Zed](https://dotsagent.io/mcp/clients/zed)

[OpenAI Codex CLI](https://dotsagent.io/mcp/clients/codex-cli)

[Gemini CLI](https://dotsagent.io/mcp/clients/gemini-cli)

[ChatGPT](https://dotsagent.io/mcp/clients/chatgpt)

[Cline](https://dotsagent.io/mcp/clients/cline)

[Continue](https://dotsagent.io/mcp/clients/continue)

[JetBrains AI Assistant](https://dotsagent.io/mcp/clients/jetbrains-ai)

## Sources

1. [docs.openclaw.ai](https://docs.openclaw.ai/tools/mcp)/tools/mcp
2. [docs.openclaw.ai](https://docs.openclaw.ai/cli/mcp)/cli/mcp
3. [docs.openclaw.ai](https://docs.openclaw.ai/cli/mcp/transports)/cli/mcp/transports
4. [docs.openclaw.ai](https://docs.openclaw.ai/gateway/config-extensions)/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
