{
  "markdown": "# agent-costcenter-mcp\n\nMCP server for per-agent cost attribution and budget management. Answer \"which agent costs the most?\" across your entire AI agent fleet.\n\n## Features\n\n- **Per-agent cost tracking** — register agents, log LLM and tool calls, get per-agent spend\n- **Built-in pricing table** — 11 models (Claude, GPT, Gemini, DeepSeek) with fuzzy name matching\n- **Budget management** — set caps and alerts, check remaining budget, warn or block on overspend\n- **Cost reports** — breakdown by agent, team, project, or all; includes model-level detail and percentages\n- **Anomaly detection** — automatically flag agents with 2x+ spending spikes\n- **Model comparison** — compare cost-per-1K-tokens across all models used\n\n## Quick Start\n\n```bash\nnpx agent-costcenter-mcp\n```\n\n### Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-costcenter\": {\n      \"command\": \"npx\",\n      \"args\": [\"agent-costcenter-mcp\"]\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `register_agent` | Register agent with team, project, model, and budget cap |\n| `log_llm_call` | Log an LLM call — auto-calculates cost from pricing table |\n| `log_tool_call` | Log a tool/API call cost |\n| `get_cost_report` | Cost breakdown by agent, team, project, or all |\n| `set_budget_alert` | Set spending threshold (warn or block) |\n| `check_budget` | Check if agent is within budget |\n| `get_cost_anomalies` | Find agents with unusual spending spikes |\n| `compare_models` | Compare cost efficiency across models |\n\n## Resources\n\n| URI | Description |\n|-----|-------------|\n| `costcenter://summary` | Current total spend across all agents |\n| `costcenter://pricing` | Built-in model pricing table |\n\n## Built-in Pricing (per 1M tokens)\n\n| Model | Input | Output |\n|-------|-------|--------|\n| claude-opus-4 | $15.00 | $75.00 |\n| claude-sonnet-4 | $3.00 | $15.00 |\n| claude-haiku-4 | $0.80 | $4.00 |\n| gpt-4o | $2.50 | $10.00 |\n| gpt-4o-mini | $0.15 | $0.60 |\n| gpt-4.1 | $2.00 | $8.00 |\n| gpt-4.1-mini | $0.40 | $1.60 |\n| gemini-2.5-pro | $1.25 | $10.00 |\n| gemini-2.5-flash | $0.15 | $0.60 |\n| deepseek-v3 | $0.27 | $1.10 |\n| deepseek-r1 | $0.55 | $2.19 |\n\nModel names are fuzzy-matched (case-insensitive, strips version suffixes).\n\n## Example Workflow\n\n```\n1. register_agent(agent_id=\"researcher\", team=\"discovery\", model=\"claude-sonnet-4\", budget_cap_usd=10)\n2. log_llm_call(agent_id=\"researcher\", model=\"claude-sonnet-4\", input_tokens=5000, output_tokens=2000)\n3. log_tool_call(agent_id=\"researcher\", tool_name=\"web_search\", duration_ms=1200, cost_usd=0.01)\n4. check_budget(agent_id=\"researcher\")\n5. get_cost_report(scope=\"all\")\n6. get_cost_anomalies()\n7. compare_models()\n```\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run dev  # watch mode\n```\n\n## License\n\nMIT\n",
  "bytes": 2771,
  "sha": "d384ebaa09fca3d99176f8d803c1cd8baef233f7095df0172a852566dc99e71c",
  "repo_slug": "mdfifty50-boop/agent-costcenter-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mdfifty50_boop_agent_costcente_7d6669a2/readme"
}