andreisirbu91-lab avatar

Mcpspend

andreisirbu91-lab/mcpspend

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.

GitHub stars
66
tools
5
auth
Secret needed
transport
STDIO
env vars
2
last updated
May 25, 2026

Tools

5 tools

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 params

Top 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.

Parameters* required
daysinteger
Lookback window in days. Defaults to 7.default: 7
limitinteger
Maximum entries to return. Defaults to 10.default: 10
list_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 params

Recent agent sessions for this organization, ordered by start time. Each row has the model, total cost, tool-call count, and duration in seconds.

Parameters* required
limitinteger
Maximum sessions to return. Defaults to 20.default: 20
get_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 params

Drill into a single session by ID. Returns the session header plus every tool call within it (capped at 500 to bound payload size).

Parameters* required
session_idstring
Session ID from list_recent_sessions. Must belong to the caller's organization.

Sponsors

Configuration

MCPSPEND_API_KEYsecret

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_ENDPOINTdefault: https://api.mcpspend.com

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

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


View the full README on GitHub

Details

Repository
github.com/andreisirbu91-lab/mcpspend
Package
@mcpspend/mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active