Everything the proxy and dashboard use is also available to you. Stable URLs at https://api.mcpspend.com, JSON in, JSON out, Bearer-token auth, 429 with Retry-After on rate limits.
Get an API key
Sign in → Dashboard / API Keys → "Create API key". Keys start with mcps_live_ on production, mcps_test_ for test mode. We hash with SHA-256 and never store plaintext — copy yours immediately.
Compatible MCP servers
MCPSpend wraps any MCP server you run locally — stdio or HTTP — including Figma, Gmail, Canva, Vercel, ClickUp, Google Drive/Calendar when you mount them as local HTTP MCPs. The proxy is transport-agnostic.
One CLI command auto-detects and wraps. Works with anything that runs as a subprocess:
npx servers (most npm MCPs)uvx / python / pipxdocker run …node, bun, denomcpspend add
For HTTP-only MCPs, our stdio↔HTTP bridge wraps the remote endpoint as if it were local. Verified with:
mcp.figma.com)mcpspend wrap-http --url https://mcp.figma.com
When you click "Connect Figma" inside the claude.ai web interface, nothing runs on your machine — everything is server-side at Anthropic.
Workaround: use the same provider as a local HTTP MCP (column 2) — fully observable.
Affects only OAuth connectors mounted inside claude.ai web (not Desktop, Cursor, Windsurf, VS Code, Claude Code — those all expose local MCP config we wrap).
Verified providers (across stdio + HTTP bridge):
Submit tool-call events. Used by the proxy under the hood — you only call this directly if you build a custom integration.
/api/ingestBearer mcps_live_…Submit one tool call or a batch (≤ 500).
Send an ARRAY for batch (faster). customerLabel is optional and lets you slice spend by your own end-customer.
curl -X POST https://api.mcpspend.com/api/ingest \
-H "Authorization: Bearer mcps_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"serverName": "filesystem",
"toolName": "read_file",
"model": "claude-sonnet-4-6",
"inputTokens": 240,
"outputTokens": 50,
"latencyMs": 120,
"success": true,
"customerLabel": "acme-corp"
}'Read-only aggregates for dashboards and reporting.
/api/stats/overview?days=30&projectId=…Bearer mcps_live_…KPIs, daily totals, top tools, top servers.
curl -H "Authorization: Bearer mcps_live_xxx" \ https://api.mcpspend.com/api/stats/overview?days=30
/api/stats/customers?days=30&limit=10Bearer mcps_live_…Top end-customers by cost (uses customerLabel from ingest).
/api/stats/forecastBearer mcps_live_…End-of-month projection with uncertainty band (USD ± stddev).
Recency-weighted moving average + day-of-week seasonality. Returns linearProjectedUsd alongside the smart forecast so you can show both.
/api/stats/predict?serverName=…&toolName=…&model=…Bearer mcps_live_…Estimate the USD cost of a specific tool call BEFORE invoking it. Pre-call cost prediction.
Returns median + P90 + average from your last 30 days. isUnknown=true when no baseline exists. Surfaced as the estimate_cost MCP tool so agents can self-throttle.
/api/stats/sessions?limit=20&offset=0Bearer mcps_live_…List recent sessions.
/api/stats/sessions/:idBearer mcps_live_…Single session header + all its tool calls.
CSV exports for offline analysis. Requires Pro plan or higher.
/api/export/tool-calls.csv?days=30&projectId=…User JWTStream tool calls as CSV. Cursor-paginated internally, supports up to 1M rows per export.
Streams up to 1,000,000 rows. Header: calledAt, project, server, tool, model, inputTokens, outputTokens, costUsd, latencyMs, success, errorCode, sessionId.
Manage org-level settings, members, and billing context.
/api/organizationsUser JWTList orgs the current user belongs to.
/api/organizationsUser JWTCreate a new organization.
/api/organizations/currentBearer mcps_live_…Current org details + month-to-date spend.
/api/organizations/currentUser JWTUpdate org name, Slack webhook, monthly $ budget.
OWNER/ADMIN only. Slack webhook URL is encrypted at rest with AES-256-GCM.
/api/organizations/current/membersUser JWTList members.
Group tool-call data by team, environment, or initiative.
/api/projectsBearer mcps_live_…List projects in the current org.
/api/projectsUser JWTCreate a project. FREE plan: 1 project max.
/api/projects/:idUser JWTDelete a project (cascades all data).
Manage your mcps_live_… keys for proxy authentication.
/api/keysUser JWTList API keys (prefix only, never plaintext).
/api/keysUser JWTCreate a new API key — response includes plaintext ONCE.
Keys are SHA-256 hashed on the server. Save the plaintext immediately; you cannot retrieve it later.
/api/keys/:id/revokeUser JWTRevoke a key. Future requests with it will 401.
Self-serve data export and deletion per GDPR Art. 15 / 17 / 20.
/api/account/data-exportUser JWTDownload a JSON dump of every piece of personal data we hold about you.
/api/account/deleteUser JWTAnonymise + delete the account. Body: {"confirm":"DELETE"}
If you are the sole OWNER of an org, transfer ownership first. See https://mcpspend.com/legal/data-rights.
Query MCPSpend from any Slack channel. Setup: Slack workspace → Add app → Slash Command → URL points at /api/slack/cmd?key=mcps_live_xxx. No OAuth dance.
/api/slack/cmd?key=mcps_live_…Bearer mcps_live_…Slash command endpoint. Subcommands: today, top [days], budget, help.
Slack posts form-encoded; we respond with Block Kit JSON within 3s. Use a dedicated API key per workspace if you want to revoke independently.
Drop-in workflow that posts an MCPSpend cost summary on every PR — the team sees agent spend at the same place they review code.
andreisirbu91-lab/mcpspend-action@v1PublicComposite GitHub Action — see /packages/github-action in the repo.
Add to .github/workflows/mcpspend.yml — needs MCPSPEND_API_KEY secret + pull-requests: write permission. Idempotent: updates the existing comment on push instead of stacking new ones.
JSON-RPC endpoint compatible with the MCP HTTP transport. Query your usage from any MCP client.
/api/mcpBearer mcps_live_…JSON-RPC: initialize / tools/list / tools/call.
Public tool try_demo works without auth — used by Smithery preview.
/.well-known/mcp/server-card.jsonPublicMCP server discovery card (RFC-style).
/.well-known/oauth-protected-resourcePublicOAuth 2.0 Protected Resource Metadata (RFC 9728).
All errors return a JSON body with an error string. Common codes:
| 400 | Validation error in payload |
| 401 | Missing / invalid / revoked key |
| 402 | Plan does not include this feature — body has upgradeUrl |
| 403 | Insufficient role (OWNER/ADMIN required for destructive ops) |
| 404 | Resource not found in your org |
| 409 | Conflict (e.g. duplicate invite, sole-owner deletion) |
| 429 | Rate-limited or quota exceeded — see Retry-After |
| 5xx | Upstream issue — retries are safe (ingest is idempotent) |
Need an OpenAPI spec or SDK?
Email support@mcpspend.com and we'll prioritise it. TypeScript & Python SDKs are on the Q3 2026 roadmap.