Configure MCP Servers in OpenClaw

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

Configure MCP Servers

Add MCP tool servers to extend agent capabilities

json5
// Add an MCP server in openclaw.json
{
  mcp: {
    servers: {
      github: {
        command: "npx",
        args: ["-y", "@modelcontextprotocol/server-github"],
        env: {
          GITHUB_PERSONAL_ACCESS_TOKEN: {
            source: "env",
            provider: "default",
            id: "MCP_GITHUB_PAT"
          }
        }
      }
    }
  }
}
๐Ÿ”Œ MCP servers give your agent tools like GitHub, file access, web search, and more
๐Ÿ“Œ Use SecretInput format for API keys โ€” never store them in plaintext config
๐Ÿ’ก Any MCP-compatible server works โ€” same protocol as Claude Code and other clients
โšก Restart the gateway after adding new MCP servers

Continue with OpenClaw

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

Back to the full OpenClaw cheat sheet