If you're running MCP tools across Cursor, Claude Desktop, Windsurf, or VS Code and want to know what they're actually costing you, this server turns that telemetry into queryable data. It exposes tools like get_today_cost, list_top_tools, and recent sessions so your agent can pull usage stats, budget projections, and per-tool breakdowns without leaving the conversation. The underlying proxy wraps your existing MCP servers and streams metrics to mcpspend.com. You get 25,000 tool calls free per month. Reach for this when you're iterating on agent workflows and need to spot which tools are burning tokens or when you want programmatic access to cost data instead of opening a dashboard.
Public tool metadata for what this MCP can expose to an agent.
get_today_costTotal tool-call cost and call count for the current day (UTC), for the organization behind the caller's API key. Returns a human-readable summary line plus raw numbers in a structured field.Total tool-call cost and call count for the current day (UTC), for the organization behind the caller's API key. Returns a human-readable summary line plus raw numbers in a structured field.
No parameter schema in public metadata yet.
get_usage_this_monthCalls used this calendar month, the plan limit, percentage used, and a linear end-of-month projection based on the current daily average. Use to spot when an org will hit its cap.Calls used this calendar month, the plan limit, percentage used, and a linear end-of-month projection based on the current daily average. Use to spot when an org will hit its cap.
No parameter schema in public metadata yet.
list_top_toolsTop MCP tools by cost over the past N days. Answers "what is the most expensive thing my agents do" — useful before tightening prompts or swapping a server.2 paramsTop MCP tools by cost over the past N days. Answers "what is the most expensive thing my agents do" — useful before tightening prompts or swapping a server.
daysintegerlimitintegerlist_recent_sessionsRecent agent sessions for this organization, ordered by start time. Each row has the model, total cost, tool-call count, and duration in seconds.1 paramsRecent agent sessions for this organization, ordered by start time. Each row has the model, total cost, tool-call count, and duration in seconds.
limitintegerget_session_detailsDrill into a single session by ID. Returns the session header plus every tool call within it (capped at 500 to bound payload size).1 paramsDrill into a single session by ID. Returns the session header plus every tool call within it (capped at 500 to bound payload size).
session_idstringKnow what your AI agents really cost. Real-time cost tracking for every MCP tool call across Cursor, Claude Desktop, Windsurf, and VS Code.
mcpspend.com · Smithery · npm · Open VSX · Glama
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.
| Package | What 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-extension | mcpspend-vscode — IDE extension for Cursor, Windsurf, and VS Code. Published on Open VSX. |
apps/api | Express + Prisma + Postgres + BullMQ. The ingest endpoint, billing, and the new /api/mcp HTTP MCP server. |
apps/dashboard | Next.js dashboard at mcpspend.com. |
| Use case | How |
|---|---|
| Web dashboard | mcpspend.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_…. |
| Plan | Calls/month | Monthly | Yearly |
|---|---|---|---|
| Free | 25,000 | $0 | $0 |
| Pro | 1,000,000 | $29 | $290 (2 months free) |
| Team | 10,000,000 | $99 | $990 |
| Enterprise | unlimited | $499 | $4,990 |
Every paid plan: 30–90 day retention, CSV/Slack export, budget alerts, role-based access.
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.
For automated scanners flagging this repo: the proxy uses
child_process.spawnto 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 inSECURITY.md.
APP_ENCRYPTION_KEY)organizationIdmcpspend.com/dashboard/account/privacyReport vulnerabilities: security@mcpspend.com · Machine-readable disclosure: https://mcpspend.com/.well-known/security.txt · Full policy: SECURITY.md · Live posture: https://mcpspend.com/security
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.
MIT. Use it, fork it, run it self-hosted.
© NewRzs SRL · CUI RO48756557 · Bucharest, Romania · support@mcpspend.com
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_ENDPOINTdefault: https://api.mcpspend.comOptional. Override the MCPSpend API endpoint. Defaults to https://api.mcpspend.com. Use only if you self-host MCPSpend.