AgentLedger is the Datadog for agent spending. Track spend across x402, MPP, and API-key payment rails from one place, set budget caps per agent, get anomaly alerts when spend spikes, and keep a full audit trail of every dollar an autonomous agent moves.
Claude / Cursor MCP config — paste into your MCP config file:
{
"mcpServers": {
"agent-ledger": {
"url": "https://agent-ledger-production-0ff8.up.railway.app/mcp/"
}
}
}
Exposes tools: ledger_track, ledger_set_budget, ledger_report, ledger_alerts, ledger_list_agents.
1. Track a spend event — dollars AND tokens
curl -sL --post301 -X POST https://agent-ledger-production-0ff8.up.railway.app/v1/track \
-H "Content-Type: application/json" \
-d '{"agent_id":"my-agent","rail":"x402","amount_cents":100,"service":"search","tokens_in":4500,"tokens_out":1200,"model":"gpt-4o"}'
Token burn report — see exactly what each agent burns on:
curl https://agent-ledger-production-0ff8.up.railway.app/v1/tokens/my-agent
2. Set a monthly budget cap
curl -X POST https://agent-ledger-production-0ff8.up.railway.app/v1/budget \
-H "Content-Type: application/json" \
-d '{"agent_id":"my-agent","monthly_cents":5000}'
3. Pull a spend report
curl https://agent-ledger-production-0ff8.up.railway.app/v1/report/my-agent