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