Configure MCP Servers in OpenClaw

From the OpenClaw cheat sheet ยท MCP Servers & Plugins ยท verified Nov 2026

Configure MCP Servers

Add MCP tool servers to extend agent capabilities

json5
// Add an MCP server in ~/.openclaw/openclaw.json
{
  mcp: {
    servers: {
      github: {
        command: "npx",
        args: ["-y", "@modelcontextprotocol/server-github"],
        env: {
          GITHUB_PERSONAL_ACCESS_TOKEN: "${MCP_GITHUB_PAT}",
        },
      },
    },
  },
}
๐Ÿ”Œ MCP servers give your agent tools like GitHub, file access, web search, and more
๐Ÿ“Œ env and headers take plain values only; keep secrets out of the file with "${ENV_VAR}" substitution, not a SecretRef object
๐Ÿ’ก Any MCP-compatible server works, over stdio, SSE or streamable HTTP
โšก "openclaw mcp add", set, unset and probe need the Gateway stopped; list, show and status work while it runs

Continue with OpenClaw

Save the full cheat sheet or work through every related task.

Back to the full OpenClaw cheat sheet