MCP Protocol
MCP (Model Context Protocol) lets AI agents discover and call tools over a standard interface. Claw Insights implements an MCP server so agents can take snapshots programmatically.
Endpoint
- URL:
POST /mcp - Access: localhost only (no remote access)
- Content-Type:
application/json - Transport: Streamable HTTP
Tool: snapshot
Generate a dashboard snapshot.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
detail | string | standard | compact, standard, full |
format | string | png | png, svg, json |
range | string | 6h | 1h, 6h, 12h, 24h |
theme | string | dark | dark, light |
lang | string | en | en, zh |
Example
bash
curl -X POST http://127.0.0.1:41041/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": { "name": "snapshot", "arguments": { "format": "png", "range": "24h" } },
"id": 1
}'Differences from REST Snapshot
- Default range is
6h(REST defaults to24h) - MCP uses JSON-RPC framing; REST uses plain HTTP request/response
- MCP is localhost-only by default; REST respects your auth configuration
Using with AI Agents
Add Claw Insights as an MCP server in your agent config:
json
{
"mcpServers": {
"claw-insights": {
"url": "http://127.0.0.1:41041/mcp"
}
}
}The agent will auto-discover the snapshot tool and can call it when asked about system status.