Agents & MCP
Cross-runtime questions#
The MCP server does not read Claude Code's transcripts. It reads ClawMetry's store, which holds every runtime on the machine.
So the agent you are talking to can answer questions about the ones you are not.
Comparisons worth asking#
Cost per runtime#
Using clawmetry, compare my spend across runtimes for the last 30 days. Break it down by runtime and model and tell me where the money actually goes.
Most people are wrong about this before they look. The editor that feels cheap because you never see a bill is frequently not.
Cost per unit of work#
Raw spend is the easy question. The useful one is what you got for it:
Using clawmetry, for each runtime over the last 30 days: total cost, session count, and the share of sessions that ended without producing a file change. Rank runtimes by cost per session that produced something.
Which harness finishes#
Using clawmetry, list sessions from the last two weeks grouped by runtime. For each, what fraction hit a repeated tool failure or ended in an error?
Harness quality varies more than model quality for agentic work, and this is the measurement that shows it on your tasks rather than on a benchmark.
Tool reliability across runtimes#
Using clawmetry, list
tool_resultevents from the last week across all runtimes and group by tool name and runtime. Which tools fail in one runtime but not another?
A tool that fails only under one harness is usually a sandbox or path difference, and it is invisible until you look across runtimes.
Operational questions#
"What ran overnight?"#
Using clawmetry, list sessions since 22:00 yesterday. Anything that ran unattended — cron jobs, the OpenClaw agent — what did it do and what did it cost?
Your scheduled agents do not report to you. This is how you find out that a nightly job has been failing quietly for a week.
"Is anything stuck right now?"#
Using clawmetry, get health, then list sessions from the last hour. Any with a high tool-call count and no recent completion?
"Did the upgrade change anything?"#
Using clawmetry, compare cost and error rate per session for
<runtime>in the week before and the week after<date>.
Agent runtimes ship fast. A regression that lines up with a version bump is much easier to believe when you can see both sides of the line.
Two things that make this work#
Session ids are namespaced by runtime. Filtering to a runtime genuinely scopes the query rather than filtering rows client-side, so these questions stay cheap on a large store.
Cost is comparable across runtimes because it is derived the same way. Everything goes through one pricing path at ingest, and where a runtime records real dollars those are used instead. What is not comparable is a runtime that records nothing — PicoClaw, or Cursor on a laptop — and those show as unknown rather than zero, so they do not silently flatter themselves in a ranking.
Ask the agent to say which runtimes it had cost data for. A comparison that quietly excludes half your fleet is worse than no comparison.
Fleet-wide#
The MCP server reads the local daemon. For a fleet, either run the server on the node you care about over SSH:
{"mcpServers": {"clawmetry-prod": {
"command": "ssh", "args": ["prod-agent-01", "clawmetry", "mcp"]}}}…or use the cloud dashboard, which aggregates every connected node. → Nodes and fleet