MCP.so
Sign In
M

Mcpspend

@andreisirbu91-lab

About Mcpspend

MCPSpend is the first cost-observability platform built natively for MCP. One CLI command wraps yourexisting MCP servers across Claude Desktop, Cursor, Windsurf, VS Code, and Claude Code — zero SDKchanges. Per-tool / per-project cost attribution, $ budget alerts via email + Slack

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mcpspend": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpspend/mcp-server@latest"
      ],
      "env": {
        "MCPSPEND_API_KEY": "<YOUR_MCPSPEND_API_KEY>"
      }
    }
  }
}

Tools

6

Get total tool-call cost and call count for the current day (UTC). Returns a human-readable summary plus structured data.

Returns calls used this month, plan limit, percentage used, and a projection for the rest of the month based on the current daily average. Use this to spot when an org is about to hit the cap.

Top tools by total cost over the past N days. Optionally limit how many entries to return. Useful for finding "what is the most expensive thing my agents do".

Recent agent sessions (each MCP-client process start = one session) with model, total cost, tool call count, and duration.

Drill into a single session by ID: returns the session summary plus every tool call (up to 500) with timing, cost, and success.

Estimate the USD cost of an MCP tool call BEFORE invoking it. Returns expected cost based on the historical average for this (server, tool, model) combo in this org over the last 30 days. Use this to make spend-aware decisions — e.g. confirm with the user before calling tools that would cost more than $0.10. Returns 0 + isUnknown=true when no history exists yet.

Overview

What is Mcpspend?

MCPSpend is a cost-observability tool for the Model Context Protocol (MCP). It uses a transparent stdio proxy to record metadata on every tool call—server name, tool name, latency, success/error, and estimated token usage—and streams that data to a dashboard for cost analysis. It is built for developers running MCP clients like Claude Desktop, Cursor, Windsurf, VS Code, and Claude Code who need to understand which tool calls drive their LLM bills.

How to use Mcpspend?

Run the single command npx @mcpspend/proxy add in the terminal. The CLI auto-detects every MCP client on the machine, lists the servers it found, asks for confirmation, then rewrites the configuration files in-place (with .mcpspend.bak backups) to wrap each server with the transparent proxy. The proxy then streams metadata to api.mcpspend.com/v1/ingest authenticated with your API key.

Key features of Mcpspend

  • Transparent stdio proxy intercepting every tools/call
  • Auto-detects MCP clients on the machine (Claude Desktop, Cursor, Windsurf, etc.)
  • Dashboard shows top-N tools by cost with gradient bars
  • Sessions view with drill-down into specific agent runs
  • Budget projections with Slack alerts at 50/80/100%
  • Per-project cost allocation by labeling MCP servers
  • Privacy-by-design: never sends tool arguments, responses, or file contents
  • 25,000 calls/month on the free tier

Use cases of Mcpspend

  • Identify which MCP tool is consuming the most budget across multiple agents
  • Track the cost of a single Claude Code or Cursor session in detail
  • Project monthly spending and get alerted before exceeding a budget
  • Allocate costs to specific projects by labeling MCP servers

FAQ from Mcpspend

How is MC

Comments

More Developer Tools MCP servers