mcpField
M
Mcpspend

Mcpspend

Local
github.com/andreisirbu91-labDeveloper Tools66Updated 8w ago

About Mcpspend

MCPSpend is a cost-observability tool for MCP that wraps existing MCP servers in Claude Desktop, Cursor, Windsurf, VS Code and Claude Code with one command. It attributes costs per tool and project and sends budget alerts. It suits developers and teams who want to track the cost of AI agent tool calls.

Key features

  1. 01One-command wrapping of configured MCP servers
  2. 02Cost attribution per tool and project
  3. 03Budget alerts by email and Slack
  4. 04Web dashboard with CSV export
  5. 05Tool arguments and responses are not uploaded

Use cases

  1. 01Reviewing daily cost of each MCP tool
  2. 02Setting budget limits for team projects with alerts
  3. 03Querying usage from inside an MCP client

MCP support

The project includes a stdio proxy that wraps the user's existing MCP servers and an MCP server package that exposes usage tools such as get_today_cost and list_top_tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"MCPSpend": {
"command": "npx",
"args": [
"-y",
"@mcpspend/mcp-server"
],
"env": {
"MCPSPEND_API_KEY": "<MCPSPEND_API_KEY>",
"MCPSPEND_ENDPOINT": "<MCPSPEND_ENDPOINT>"
}
}
}
}
Run commandnpx -y @mcpspend/mcp-server
Environment variables to set
MCPSPEND_API_KEYSecretYour 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_ENDPOINTOptional. Override the MCPSpend API endpoint. Defaults to https://api.mcpspend.com. Use only if you self-host MCPSpend.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mcpspend/mcp-server0.2.1

Tools

6

Saved tool list · updated 3w ago

This tool takes no parameters.

Details

From the project README

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

MCPSpend MCP server card

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: [email protected] · 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 · [email protected]

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.