io. github. jdhart81/ agent-metering
by jdhart81 · remote · no sign-in to list tools · v0.2.0 · published by GitHub user jdhart81
Usage metering + SLA accounting for agent services (the meter behind x402 micropayments).
11 tools: 8 change things and 3 only read.
Scanned Oct 21, 2026
- Deletes or cancels0Claude Code: deny
- Can't be undone0Claude Code: ask
- Changes things8Claude Code: ask: see these tools
- Only reads3Claude Code: allow: see these tools
No check matched anything in the tool definitions. No finding is not a safety guarantee. How the checks work.
claude mcp add --transport http agent-metering https://mcp.viridisconservation.com/metering/mcpTools
Open a tool for its reasons and full description. Descriptions are the publisher's own words, shown as they are.
11 tools
Changes things 8Claude Code: ask
close_periodFreeze all open events into an immutable invoice (exactly-once).No findings
Why it is in this group
- The name "close_period" says "close": a word for a change.
Description, as the server wrote it Freeze all open events into an immutable invoice (exactly-once). The invoice amount is what agent-escrow-agent should settle.
create_meterCreate a usage meter between a provider and a consumer agent.No findings
Why it is in this group
- The name "create_meter" says "create": a word for a change.
Description, as the server wrote it Create a usage meter between a provider and a consumer agent. unit: what is being counted (call, token, kwh, ...). Price is in minor currency units (cents) per unit. Returns the meter_id.
flag_meterAdmin: flag/unflag a meter as test/synthetic so its events are excluded from usage statistics by default.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Admin: flag/unflag a meter as test/synthetic so its events are excluded from usage statistics by default. Touches meter metadata only — never events, never the hash chain, never billing accruals. Requires the server's VIRIDIS_ADMIN_TOKEN.
record_usageRecord a usage event.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Record a usage event. Idempotent on event_id (safe to retry — never double-billed). outcome is 'ok' or 'error' and feeds the SLA report.
sla_reportPure SLA report: success_rate vs sla_target, breach flag.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Pure SLA report: success_rate vs sla_target, breach flag. No mutation.
usage_summaryTotals for a meter: event count, total quantity, accrued minor units.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Totals for a meter: event count, total quantity, accrued minor units.
usage_timeseriesUsage time series bucketed on each event's recorded_at (UTC; bucket=day|hour), grouped across meters by provider — a real time-series primitive, independent of meter creation times…No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Usage time series bucketed on each event's recorded_at (UTC; bucket=day|hour), grouped across meters by provider — a real time-series primitive, independent of meter creation times. Includes per-bucket breakdowns by consumer_class / channel / provider. est_accrued_minor is an estimate; authoritative billing stays with usage_summary.
verify_chainVerify the tamper-evident event hash chain for a meter.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
Description, as the server wrote it Verify the tamper-evident event hash chain for a meter.
Only reads 3Claude Code: allow
describe_agentFleet-standard self-description.No findings
Why it is in this group
- The name "describe_agent" says "describe": a word for reading.
Description, as the server wrote it Fleet-standard self-description.
list_eventsRead usage events (paginated, read-only).No findings
Why it is in this group
- The name "list_events" says "list": a word for reading.
Description, as the server wrote it Read usage events (paginated, read-only). Filter by meter, provider, consumer_class (internal|external|unknown), channel, outcome (ok|error), and ISO date range [since, until). Test-flagged events are excluded unless include_test=true. Returns events + next_cursor.
list_metersList all meters with event/invoice counts.No findings
Why it is in this group
- The name "list_meters" says "list": a word for reading.
Description, as the server wrote it List all meters with event/invoice counts.
This is not a safety rating, and no finding is not a safety guarantee. The groups and findings come from fixed checks of the tool definitions the server returned on the date shown, not from its code or what it does when called. How the checks work.
Install
Pinned to version 0.2.0. Values in angle brackets are yours to fill in.
claude mcp add --transport http agent-metering https://mcp.viridisconservation.com/metering/mcpRun in a terminal.
Claude Code permissions
Allow the reads, ask before a change, deny the deletes. Paste into .claude/settings.json.
{
"permissions": {
"allow": [
"mcp__agent-metering__list_meters",
"mcp__agent-metering__list_events",
"mcp__agent-metering__describe_agent"
],
"ask": [
"mcp__agent-metering__create_meter",
"mcp__agent-metering__record_usage",
"mcp__agent-metering__usage_summary",
"mcp__agent-metering__sla_report",
"mcp__agent-metering__close_period",
"mcp__agent-metering__verify_chain",
"mcp__agent-metering__usage_timeseries",
"mcp__agent-metering__flag_meter"
],
"deny": []
}
}Tools that only read are allowed, tools that change things ask first, tools that delete or cancel are denied. It assumes the server is installed as agent-metering. Review it before you use it.
