AI agents burn tokens and call APIs โ now they can track what it costs. Budget awareness for autonomous agents.
Track every API call with model name, token counts, and auto-calculated costs.
Set monthly budgets with configurable alert thresholds. Get warned before you overspend.
View spending by model, period (today/week/month/all), with markdown or JSON output.
Estimate costs before making calls โ input text, get token count and projected cost.
Pre-seeded with 10+ models from OpenAI, Anthropic, DeepSeek, Google, Meta, Cohere.
Standard MCP protocol โ plug into any MCP client like Claude Desktop, Cursor, or Smithery.
# Clone and install
git clone https://github.com/rahu258/agent-cost-tracker-mcp.git
cd agent-cost-tracker-mcp
pip install -r requirements.txt
{
"mcpServers": {
"agent-cost-tracker": {
"command": "python",
"args": ["/path/to/server.py"]
}
}
}
Record an API call โ model, tokens, cost. Returns running totals.
Usage summary by period with per-model breakdown.
Set monthly spend limit and alert threshold.
All supported models with per-token pricing.
Current budget status with projected spend.
Estimate cost before making a call.