PluginBench
MCP Server
Active
MIT

io.github.andreisirbu91-lab/mcpspend MCP Server

io.github.andreisirbu91-lab/mcpspend

Real-time cost tracking for every MCP tool call across Cursor, Claude Desktop, Windsurf, and VS Code.

What is the io.github.andreisirbu91-lab/mcpspend MCP server?

MCPSpend is an MCP server that lets you query your AI agent tool usage and costs in real time. It wraps your existing MCP servers to track every tool call, model, latency, and approximate token usage—without sending actual tool arguments or responses to the cloud. Access your data via web dashboard, stdio MCP tools, or HTTP API.

MCPSpend is a cost observability platform for MCP tool calls. Install the proxy to automatically wrap your configured MCP servers (Claude Desktop, Cursor, Windsurf, VS Code), then query usage via the web dashboard, add the MCP server to your client config for stdio access, or call the HTTP API. Free tier covers 25,000 tool calls/month with no credit card required.

How to install io.github.andreisirbu91-lab/mcpspend

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • MCPSPEND_API_KEY
    secret

    Your MCPSpend API key. Create one at https://mcpspend.com/dashboard/keys. Starts with mcps_live_ or mcps_test_. Optional — the server boots and lists tools without it; only tool calls require auth.

  • MCPSPEND_ENDPOINT

    Optional. Override the MCPSpend API endpoint. Defaults to https://api.mcpspend.com. Use only if you self-host MCPSpend.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcpspend": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpspend/mcp-server"
      ],
      "env": {
        "MCPSPEND_API_KEY": "<YOUR_MCPSPEND_API_KEY>",
        "MCPSPEND_ENDPOINT": "<YOUR_MCPSPEND_ENDPOINT>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • get_today_cost — Query your cost for today
  • list_top_tools — View your top-used tools
  • recent_sessions — Review recent MCP sessions
  • budget_projections — See projected costs based on current usage

Use cases

  • Monitor daily spending on AI agent tool calls across all your MCP clients
  • Identify which tools consume the most cost and optimize usage accordingly
  • Track latency and success rates for each MCP server integration
  • Set budget alerts and export usage data to CSV or Slack for team reporting
  • Compare costs across different models and agents to optimize your AI infrastructure

io.github.andreisirbu91-lab/mcpspend MCP server FAQ

What does MCPSpend track?

MCPSpend tracks tool name, server name, model, latency, success/failure, and approximate input/output token sizes for every MCP tool call. It does not send actual tool arguments or response bodies to the cloud.

Is MCPSpend free?

Yes, the free tier includes 25,000 tool calls/month with no credit card required. Paid plans (Pro, Team, Enterprise) offer higher call limits, longer retention, CSV/Slack export, budget alerts, and role-based access.

How do I install MCPSpend in Cursor or Claude Desktop?

Run `npx --yes @mcpspend/proxy@latest init --key mcps_live_xxx` to auto-detect and wrap your configured MCP servers. Alternatively, add `@mcpspend/mcp-server` to your client config to query usage via MCP tools, or point your client to `https://api.mcpspend.com/api/mcp` with your API key.

Do I need authentication?

Yes, you need an API key (mcps_live_xxx) from mcpspend.com. The proxy uses this key to report usage to your dashboard. API keys are stored as SHA-256 hashes on the server.

Is my data private?

Yes. The proxy only sends metadata (tool name, latency, token estimates) and never sends tool arguments or response bodies. All data is EU-hosted, encrypted at rest with AES-256-GCM, and scoped per organization. See the Privacy Policy for full details.

What MCP clients does MCPSpend support?

MCPSpend works with Claude Desktop, Cursor, Windsurf, VS Code (user and workspace configs), and Claude Code (user and project configs).

README (reference)

Source of truth, from the repository.

MCPSpend

Know what your AI agents really cost. Real-time cost tracking for every MCP tool call across Cursor, Claude Desktop, Windsurf, and VS Code.

smithery badge npm version Open VSX license MCPSpend MCP server

mcpspend.com · Smithery · npm · Open VSX · Glama

<a href="https://glama.ai/mcp/servers/andreisirbu91-lab/MCPSpend"> <img width="380" height="200" src="https://glama.ai/mcp/servers/andreisirbu91-lab/MCPSpend/badges/card.svg" alt="MCPSpend MCP server card" /> </a>

One-command install

npx --yes @mcpspend/proxy@latest init --key mcps_live_xxx

Auto-detects Claude Desktop, Cursor, Windsurf, VS Code (user + workspace), and Claude Code (user + project). Wraps every configured MCP server, leaves a .mcpspend.bak backup, and starts streaming usage to your dashboard at mcpspend.com.

Free tier: 25,000 tool calls/month, no credit card.

What's in this monorepo

PackageWhat it is
packages/proxy@mcpspend/proxy — the stdio observability proxy + wrap-http bridge for remote MCP servers. Published on npm.
packages/mcp-server@mcpspend/mcp-server — query your MCPSpend usage from inside any MCP client. Published on npm + Smithery.
packages/vscode-extensionmcpspend-vscode — IDE extension for Cursor, Windsurf, and VS Code. Published on Open VSX.
apps/apiExpress + Prisma + Postgres + BullMQ. The ingest endpoint, billing, and the new /api/mcp HTTP MCP server.
apps/dashboardNext.js dashboard at mcpspend.com.

Three ways to query your usage

Use caseHow
Web dashboardmcpspend.com/dashboard — overview, top tools, sessions, CSV export.
From any MCP client (stdio)Add @mcpspend/mcp-server to your client config — agent gains tools like get_today_cost, list_top_tools.
From any MCP client (HTTP)Point your client at https://api.mcpspend.com/api/mcp with Authorization: Bearer mcps_live_….

Pricing

PlanCalls/monthMonthlyYearly
Free25,000$0$0
Pro1,000,000$29$290 (2 months free)
Team10,000,000$99$990
Enterpriseunlimited$499$4,990

Every paid plan: 30–90 day retention, CSV/Slack export, budget alerts, role-based access.

Privacy

The proxy reports: tool name, server name, model, latency, success, approximate input/output sizes (tokens, derived from JSON length). It does not send the actual tool arguments or response bodies to MCPSpend. See Privacy Policy for the full sub-processor list (Stripe + Resend + Hostinger, all EU-hosted) and your GDPR rights.

Security

For automated scanners flagging this repo: the proxy uses child_process.spawn to wrap the user's own MCP server — that's the whole point of an observability proxy. The spawn args come from the user's local MCP-client config (Claude Desktop / Cursor / Windsurf / VS Code), never from network input. No RCE path, no privilege escalation, no arbitrary command execution. Full threat model in SECURITY.md.

  • API keys stored as SHA-256 hashes (never plaintext on the server)
  • Passwords bcrypt cost 12
  • Secrets at rest AES-256-GCM (APP_ENCRYPTION_KEY)
  • Transport HTTPS only, HSTS enabled, helmet CSP headers
  • No tool arguments or responses ever leave the user's machine
  • Per-tenant isolation every query scopes by organizationId
  • GDPR Art. 15 / 17 / 20 self-serve at mcpspend.com/dashboard/account/privacy
  • EU-hosted (Hostinger EU region)
  • SOC 2 Type I in progress with Vanta (Q4 2026)
  • DPA available for Enterprise customers

Report vulnerabilities: security@mcpspend.com · Machine-readable disclosure: https://mcpspend.com/.well-known/security.txt · Full policy: SECURITY.md · Live posture: https://mcpspend.com/security

Support the project

If MCPSpend saves you money or you just want to keep the proxy MIT and the free tier alive, you can sponsor any amount via Stripe — no account required:

💖 buy.stripe.com/00w8wPbUxe1qgK36CRbbG06

Every dollar goes back into hosting, security audits, and shipping features.

License

MIT. Use it, fork it, run it self-hosted.

© NewRzs SRL · CUI RO48756557 · Bucharest, Romania · support@mcpspend.com

Related MCP servers

Local MCP (stdio) server for Redmine: issues, projects and time tracking from any MCP client.

0
TypeScript
MIT
View repository →
MCMCP Sport logo

MCP Sport

Active

MCP server that exposes Formula 1 data from the OpenF1 API.

1
Python
MIT
View repository →

Complete 49 CFR 172.101 hazmat table lookup with special-provision decoding, cited to eCFR.

1
TypeScript
MIT
View repository →

Find recent or archived satellite imagery for any place on Earth by location and date.

Explore and analyze Cupix construction site data: 360 images, progress, and insights.

US ZIP code intelligence: demographics, weather, tax, crime, housing, voting, and more.