Documentation
Quick Start
- Create an account at tokenmeter.sh/login
- Copy your API key from Settings
- Add to your MCP client:
{ "mcpServers": { "tokenmeter": { "url": "https://mcp.tokenmeter.sh", "headers": { "Authorization": "Bearer tm_your_api_key" } } } } - Start using AI. Token Meter tracks your spend automatically.
Alternative: Local Client
If your MCP client doesn't support remote URLs, use the local client:
TOKENMETER_API_KEY=tm_your_key npx @yawlabs/tokenmeter-mcp
Or add to Claude Code:
claude mcp add tokenmeter -e TOKENMETER_API_KEY=tm_your_key -- npx @yawlabs/tokenmeter-mcp
Gateway Setup (Pro+)
Route your LLM requests through Token Meter for smart routing and failover. Swap your provider base URL:
# Instead of: OPENAI_BASE_URL=https://api.openai.com/v1 # Use: OPENAI_BASE_URL=https://gateway.tokenmeter.sh/v1 OPENAI_API_KEY=tm_your_api_key
Token Meter translates requests to the correct provider format and handles routing, failover, and retries.
MCP Tools Reference
Free Tier
get_spend_summaryTotal spend for today, this week, and this month by provider.
get_session_costCost of the current conversation/session.
get_model_pricingPer-token pricing for any model.
model: optional — model IDprovider: optional — provider nameget_budget_statusCurrent spend against configured budgets.
get_providersList connected providers and their status.
Pro Tier ($19/mo)
get_spend_breakdownDetailed spend filtered by provider, model, date range.
provider: optionaldays: default: 7get_cost_trendDaily spend over time.
days: default: 14get_top_modelsModels ranked by spend or token volume.
sortBy: 'cost' or 'tokens'days: default: 30get_cost_estimateEstimate cost for X tokens on given models.
models: array of model IDsinputTokens: numberoutputTokens: default: 500compare_modelsSide-by-side cost comparison.
inputTokens: numberoutputTokens: numbercallsPerDay: default: 100set_budget_alertCreate spend threshold notification.
name: stringlimit: dollarsperiod: 'daily'|'weekly'|'monthly'Gateway Tier ($49/mo)
get_rate_limitsRate limit status per provider and model.
get_routing_statusProvider health: healthy, degraded, or rate-limited.
set_fallback_chainDefine provider failover order.
chain: array of {provider, model}set_model_aliasMap friendly name to provider/model.
alias: stringprovider: stringmodel: stringSupported Providers
Model Pricing
40+ models with per-token pricing (per 1M tokens). Updated within 24 hours of provider announcements.
| Model | Provider | Input | Output | Cache Read |
|---|---|---|---|---|
| Claude Opus 4.6 | Anthropic | $5.00 | $25.00 | $0.50 |
| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 | $0.30 |
| Claude Sonnet 4 | Anthropic | $3.00 | $15.00 | $0.30 |
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 | $0.10 |
| Claude Opus 4 | Anthropic | $5.00 | $25.00 | $0.50 |
| Claude 3 Haiku | Anthropic | $0.25 | $1.25 | $0.03 |
| GPT-5.4 | OpenAI | $2.50 | $15.00 | $0.25 |
| GPT-5.4 Mini | OpenAI | $0.75 | $4.50 | $0.075 |
| GPT-5.4 Nano | OpenAI | $0.20 | $1.25 | $0.02 |
| GPT-4o | OpenAI | $2.50 | $10.00 | $1.25 |
| GPT-4o Mini | OpenAI | $0.15 | $0.60 | $0.075 |
| o3 | OpenAI | $10.00 | $40.00 | $2.50 |
| o4 Mini | OpenAI | $1.10 | $4.40 | $0.275 |
| Gemini 3 | $2.00 | $12.00 | $0.20 | |
| Gemini 2.5 Pro | $1.25 | $10.00 | $0.31 | |
| Gemini 2.5 Flash | $0.15 | $0.60 | $0.04 | |
| Gemini 2.0 Flash | $0.10 | $0.40 | $0.025 | |
| Llama 4 Scout 17B | Groq | $0.11 | $0.18 | — |
| Llama 3.3 70B | Groq | $0.59 | $0.79 | — |
| Llama 3.1 8B | Groq | $0.05 | $0.08 | — |
| Mixtral 8x7B | Groq | $0.24 | $0.24 | — |
| Gemma2 9B | Groq | $0.20 | $0.20 | — |
| DeepSeek Chat V3 | DeepSeek | $0.27 | $1.10 | $0.07 |
| DeepSeek Coder V3 | DeepSeek | $0.27 | $1.10 | $0.07 |
| DeepSeek Reasoner R1 | DeepSeek | $0.55 | $2.19 | $0.14 |
| Mistral Large | Mistral | $2.00 | $6.00 | — |
| Mistral Small | Mistral | $0.10 | $0.30 | — |
| Codestral | Mistral | $0.30 | $0.90 | — |
| Mistral Nemo | Mistral | $0.15 | $0.15 | — |
| Command R | Cohere | $0.15 | $0.60 | — |
| Command R+ | Cohere | $2.50 | $10.00 | — |
| Command Light | Cohere | $0.08 | $0.08 | — |
| Claude 3.5 Sonnet v2 | Bedrock | $3.00 | $15.00 | — |
| Claude 3 Haiku | Bedrock | $0.25 | $1.25 | — |
| Nova Pro | Bedrock | $0.80 | $3.20 | — |
| Nova Lite | Bedrock | $0.06 | $0.24 | — |
| Nova Micro | Bedrock | $0.035 | $0.14 | — |
| Llama 3.1 (Local) | Ollama | Free | Free | — |
| Mistral (Local) | Ollama | Free | Free | — |
| Code Llama (Local) | Ollama | Free | Free | — |
Prices per 1M tokens. Ollama models run locally at zero cost. Azure OpenAI and AWS Bedrock host the same models as OpenAI and Anthropic respectively. Full registry including batch pricing, cache write rates, and context windows available via the get_model_pricing MCP tool.
Deployment Options
One-click via mcp.hosting
Deploy Token Meter as a hosted MCP server on mcp.hosting with auto-provisioned API keys and session proxy support for reliable stateful connections.
Private networks via tailscale-mcp
For teams running MCP servers on private infrastructure, tailscale-mcp provides secure access over your tailnet without exposing endpoints to the public internet.
Validate with mcp-compliance
Use mcp-compliance to verify your MCP server configuration meets protocol standards before deploying.
Reduce Token Waste
Token Meter shows you where your spend goes. ctxlint helps you cut it — lint your AI agent context files and MCP configs to trim unnecessary tokens before they reach the model.
Stay Updated
For weekly coverage of AI tooling, LLM pricing changes, and developer workflows, subscribe to Token Limit News.