Record idempotent usage events and read monthly per-customer rollups (Usage Lab metering API).
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Bearer <your Usage Lab API key> (free key at https://usage-lab.pages.dev/signup/). Optional for get_docs and tools/list.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Create a meter once (POST /api/v1/meters). aggregation: sum (add up value, e.g. tokens), count (number of events, e.g. tool calls) or unique_count (distinct unique_value, e.g. active users). Re-creating an existing key returns meter_exists (harmless). Free plan: 3 meters. Needs your API key.
1-64 chars of letters, digits, _ . - (e.g. agent_tool_calls).
Optional display name (defaults to key).
Optional Stripe Billing Meter event_name for Stripe push (Pro/Ultra).
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http usage-lab https://usage-lab.pages.dev/mcp
Headers
Authorization (optional, not in the config above): Bearer <your Usage Lab API key> (free key at https://usage-lab.pages.dev/signup/). Optional for get_docs and tools/list.Create a meter once (POST /api/v1/meters). aggregation: sum (add up value, e.g. tokens), count (number of events, e.g. tool calls) or unique_count (distinct unique_value, e.g. active users). Re-creating an existing key returns meter_exists (harmless). Free plan: 3 meters. Needs your API key.
| Argument | Type | Description |
|---|---|---|
| key* | string | 1-64 chars of letters, digits, _ . - (e.g. agent_tool_calls). |
| name | string | Optional display name (defaults to key). |
| aggregation* | string | |
| stripe_event_name | string | Optional Stripe Billing Meter event_name for Stripe push (Pro/Ultra). |
{
"type": "object",
"required": [
"key",
"aggregation"
],
"properties": {
"key": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,63}$",
"description": "1-64 chars of letters, digits, _ . - (e.g. agent_tool_calls)."
},
"name": {
"type": "string",
"description": "Optional display name (defaults to key)."
},
"aggregation": {
"enum": [
"sum",
"count",
"unique_count"
],
"type": "string"
},
"stripe_event_name": {
"type": "string",
"description": "Optional Stripe Billing Meter event_name for Stripe push (Pro/Ultra)."
}
}
}Your account: plan, event and meter limits, event_count and first_event_at (GET /api/v1/account). Needs your API key.
No arguments.
{
"type": "object",
"properties": {}
}Quickstart for the Usage Lab metering API and this MCP server: how to get a free API key, connect, create a meter, record idempotent usage events and read rollups. No API key needed.
No arguments.
{
"type": "object",
"properties": {}
}Monthly totals per customer for one meter, recomputed from raw events (GET /api/v1/meters/{meter}/rollups). Returns total_quantity and per-subscription quantity and event_count. Needs your API key.
| Argument | Type | Description |
|---|---|---|
| meter* | string | Meter key or id. |
| month | string | YYYY-MM (UTC). Defaults to the current month. |
| subscription | string | Optional: only this customer/subscription. |
{
"type": "object",
"required": [
"meter"
],
"properties": {
"meter": {
"type": "string",
"description": "Meter key or id."
},
"month": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "YYYY-MM (UTC). Defaults to the current month."
},
"subscription": {
"type": "string",
"description": "Optional: only this customer/subscription."
}
}
}List the meters on your Usage Lab account (key, name, aggregation sum | count | unique_count). Needs your API key (Authorization: Bearer).
No arguments.
{
"type": "object",
"properties": {}
}Record 1-100 usage events in one all-or-nothing batch (POST /api/v1/usage). Every event MUST carry its own idempotency_key; retrying with the same keys is safe (results say created / duplicate / conflict). Needs your API key.
| Argument | Type | Description |
|---|---|---|
| events* | array |
{
"type": "object",
"required": [
"events"
],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"idempotency_key",
"subscription"
],
"properties": {
"meter": {
"type": "string",
"description": "Meter key or id. Optional only if the account has exactly one meter."
},
"value": {
"type": "number",
"description": "Required for sum meters (e.g. tokens). Defaults to 1 for count meters."
},
"timestamp": {
"type": [
"string",
"number"
],
"description": "ISO-8601 or unix seconds/ms. Defaults to now. Max 30 days old, max 5 minutes in the future."
},
"properties": {
"type": "object",
"description": "Optional JSON stored with the event, e.g. {\"traffic_class\":\"ai_agent\",\"tool\":\"search\"}."
},
"subscription": {
"type": "string",
"maxLength": 200,
"description": "Required. Your customer or subscription id (who to bill)."
},
"unique_value": {
"type": [
"string",
"number"
],
"description": "Required for unique_count meters (e.g. a user id)."
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Required. A stable id for this event (e.g. sha256 of run_id:step:tool_call_id, or your provider response id). Reuse it on retries: same key + same payload returns duplicate and counts once; same key + different payload is a conflict and the original is kept."
}
}
},
"maxItems": 100,
"minItems": 1
}
}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 11, 2026.