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.