MCP Client
GoClaw can connect to remote or local Model Context Protocol (MCP) servers and expose their tools through the normal GoClaw tool and RBAC system.
Configuration
In goclaw.json:
{
"mcp": {
"enabled": true,
"connectTimeoutSeconds": 15,
"callTimeoutSeconds": 60,
"servers": {
"example": {
"enabled": true,
"transport": "http",
"url": "https://example.com/mcp",
"headers": ["Authorization: Bearer YOUR_TOKEN"],
"allowTools": [],
"denyTools": []
}
}
}
}
| Field | Description |
|---|---|
enabled | Master switch for MCP client support |
connectTimeoutSeconds | Timeout when dialing servers at startup (default 15) |
callTimeoutSeconds | Timeout for individual tool calls (default 60) |
servers | Named map of server connections |
Per-server settings
| Field | Description |
|---|---|
enabled | Enable this server |
transport | http (remote Streamable HTTP) or stdio (local subprocess) |
url | MCP HTTP endpoint (required for http) |
headers | HTTP headers as Name: value lines (e.g. Authorization: Bearer token) |
command | Executable for stdio transport |
args | Command arguments (one per line in the editor) |
env | Extra environment as KEY=VALUE lines (appended to GoClaw’s env) |
allowTools | If set, only these MCP tool names are registered (empty = all) |
denyTools | MCP tool names to exclude (deny wins over allow) |
Configure MCP in the setup editor under MCP Client and MCP Servers, or via goclaw setup TUI. Restart GoClaw after changing MCP config.
Registered tool names
MCP tools appear in GoClaw as mcp_<server>_<tool> (sanitized to alphanumeric/_/-, max 64 chars). Grant access in role config by listing the exact registered names, or use "*" for all tools.
Role tool lists are exact-match only — there is no mcp_github_* wildcard. Use per-server allowTools to trim what gets registered.
Status and management
/mcp(owner only) — connection status, tool list, reconnect- HTTP UI
/mcp(owner only) — live status table with reconnect buttons
Subcommands:
/mcp status
/mcp tools [server]
/mcp reconnect <server>
Troubleshooting
- Server stuck degraded: check URL/command, auth headers, and logs; use
/mcp reconnect <server>after fixing the remote service. - Tool not visible: check
allowTools/denyTools, role tool permissions, and logs for name-collision warnings. - Config changes ignored: restart GoClaw — MCP config is read at startup (reconnect only redials with existing config).