CostMCP is a project-first cost ledger for AI builders. Track tokens, generations, subscriptions, and project spend through one backend with three faces: REST, MCP, and SDK.

What you can do

  • Ingest usage — log tokens, images, voice, and GPU seconds with idempotent POST /api/v1/messages
  • Log expenses & subscriptions — one-off invoices and recurring tools in the same ledger
  • Query spend — monthly summaries, project drill-downs, and budget remaining
  • Connect agents — Cursor, Claude, and ChatGPT via local stdio MCP or remote OAuth at https://mcp.costmcp.com
  • Issue API keys — workspace keys with permissions, project scope, spend caps, expiry, and rate/IP conditions
  • Manage workspaces — dashboard APIs for org structure, metrics, API keys, and MCP connections

Base URLs

EnvironmentURL
Production APIhttps://api.costmcp.com
Production MCPhttps://mcp.costmcp.com
Production webhttps://costmcp.com
Local APIhttp://localhost:3000
Local MCPhttp://localhost:3000/api/mcp
Local webhttp://localhost:3001

Auth at a glance

ClientAuth
Pipelines / SDKs / local MCPAuthorization: Bearer cmcp_live_...
Dashboard / workspace APIsSupabase user JWT
Remote MCP (ChatGPT, Claude)OAuth 2.1 access token cmcp_at_...
See Authentication and API keys & conditions for details.

Next steps

Quickstart

Install, set env vars, and send your first CostMessage

CostMessage

Envelope schema and message types

API Reference

Every REST endpoint

API keys

Generate keys with permissions and conditions

MCP Tools

Local stdio and remote HTTP MCP