Skip to content

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

ParameterTypeDefaultDescription
detailstringstandardcompact, standard, full
formatstringpngpng, svg, json
rangestring6h1h, 6h, 12h, 24h
themestringdarkdark, light
langstringenen, 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 to 24h)
  • 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.

Released under the MIT License.