Repository avatar
AI Tools
v1.0.0
active

account

ai.tokenomat/account

Free read-only Tokenomat account tools: balance, LLM prices, usage by key, bills, cost estimates.

Documentation

Tokenomat MCP Servers

Hosted remote MCP servers for Tokenomat, a pay-as-you-go API gateway that gives coding agents one API key for Claude, GPT and Gemini models at the developers' list prices. The servers let any MCP client (Claude Code, Claude Desktop, claude.ai, Cursor, VS Code, Windsurf, Codex and others) check the account and model prices, generate images, video and speech, or ask a stronger model for a second opinion, all billed from the same prepaid balance.

Servers

Registry nameEndpointWhat it doesCost
ai.tokenomat/accounthttps://tokenomat.ai/api/mcpRead-only account tools: balance and key limits, models and prices, usage by key, bill explanation, cost simulation, model recommendation, top-up link.Free
ai.tokenomat/mediahttps://tokenomat.ai/api/mcp/mediaImage, video and speech generation and editing.Paid per generation; catalog and job tools are free
ai.tokenomat/second-opinionhttps://tokenomat.ai/api/mcp/second-opinionA stronger model gives an engineering second opinion, reviews a diff, or several models answer and a synthesis is written.Paid per call

Connect only the servers you need. All three use the same account, the same balance and the same key.

Quick start

OAuth is the primary connection path. API keys work in every client and in scripts:

  • OAuth 2.1 (claude.ai, Claude Desktop, Claude Code, ChatGPT, MCP Inspector and other OAuth-capable clients): add the server URL, sign in to your Tokenomat account and approve access. The paid servers show a consent screen that warns about spending. See docs/authentication.md.
  • API key (Cursor, VS Code, Windsurf, Codex, scripts, CI): create a tm_live_… key on the API keys page and send it as a Bearer token. It is the same key you use for the gateway.

The snippets below connect the account server. The media and second-opinion servers use exactly the same pattern: replace the name and URL with tokenomat-media → https://tokenomat.ai/api/mcp/media or tokenomat-second-opinion → https://tokenomat.ai/api/mcp/second-opinion.

claude.ai / Claude Desktop (OAuth)

Settings → Connectors → Add custom connector
URL: https://tokenomat.ai/api/mcp
→ Add → Connect → sign in and approve access on tokenomat.ai

Claude Code

# OAuth: no key. Then run /mcp inside Claude Code and choose "Authenticate".
claude mcp add --transport http tokenomat https://tokenomat.ai/api/mcp

# API key, for non-interactive use
claude mcp add --transport http tokenomat https://tokenomat.ai/api/mcp \
  --header "Authorization: Bearer tm_live_YOUR_KEY"

Claude Desktop (config file)

If your Desktop build uses claude_desktop_config.json, connect through the OAuth-capable mcp-remote bridge (requires Node.js):

{
  "mcpServers": {
    "tokenomat": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://tokenomat.ai/api/mcp"]
    }
  }
}
Cursor, VS Code, Windsurf, Codex

Cursor (~/.cursor/mcp.json or .cursor/mcp.json in a project):

{
  "mcpServers": {
    "tokenomat": {
      "url": "https://tokenomat.ai/api/mcp",
      "headers": { "Authorization": "Bearer tm_live_YOUR_KEY" }
    }
  }
}

VS Code (.vscode/mcp.json, the key is asked once and stored encrypted):

{
  "servers": {
    "tokenomat": {
      "type": "http",
      "url": "https://tokenomat.ai/api/mcp",
      "headers": { "Authorization": "Bearer ${input:tokenomat-api-key}" }
    }
  },
  "inputs": [
    { "type": "promptString", "id": "tokenomat-api-key", "description": "Tokenomat API key (tm_live_…)", "password": true }
  ]
}

Windsurf (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "tokenomat": {
      "serverUrl": "https://tokenomat.ai/api/mcp",
      "headers": { "Authorization": "Bearer tm_live_YOUR_KEY" }
    }
  }
}

Codex (~/.codex/config.toml; put the key in the TOKENOMAT_API_KEY environment variable):

[mcp_servers.tokenomat]
url = "https://tokenomat.ai/api/mcp"
bearer_token_env_var = "TOKENOMAT_API_KEY"

Ready-to-copy configs with all three servers are in examples/. Once connected, ask your agent to call get_account and list_models: both are free and return the live balance and prices.

Without an MCP client: the servers are plain JSON-RPC over HTTPS:

curl -s https://tokenomat.ai/api/mcp \
  -H "Authorization: Bearer tm_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_account","arguments":{}}}'

Tools

Full parameter reference: docs/tools.md.

Account server (/api/mcp): read-only, free

ToolWhat it does
get_accountEmail, balance (paid, bonus, reserved, available) and this key's name, lifetime budget, daily cap and spend.
list_modelsModels with prices in USD per 1M tokens (input, output, cache read, cache write) and supported protocols.
get_usageSpending of this key for a day, week or month by model, plus the most recent requests.
explain_billBreakdown of one charged request: token categories at catalog prices, cache savings, orchestration steps.
simulate_routeCost estimate for a model request without calling the model; checks balance, budgets, daily caps and allowed models.
recommend_modelSuggests a cheaper model for the kinds of tasks the account runs, from aggregated statistics (when model advice is enabled).
top_upReturns a link to top up the balance in the web account. Nothing is charged.

Media server (/api/mcp/media): paid generations

ToolWhat it does
list_modelsImage, video and speech models with current per-unit USD prices, resolutions, durations and constraints. Free.
generate_imageText-to-image with Google Nano Banana models, OpenAI GPT Image 2.6 or Alibaba Qwen Image 3.0 Pro; up to 4 variants, reference images. Paid.
edit_imageEdit a completed image with a text instruction (Nano Banana models). Paid.
generate_videoVideo with Veo 3.1, Gemini Omni Flash, Wan 3.0 or Grok Imagine Video 1.5; first frame, last frame, reference images, video and voice samples. Quote first. Paid.
edit_videoRework an existing clip or shoot the next scene with Wan 3.0. Quote first. Paid.
generate_speechGemini 3.1 Flash TTS speech, one voice or a two-speaker dialogue; returns a WAV URL directly. Paid.
get_resultStatus and result of an image or video job: media URLs, charged cost, available balance. Free.
list_generationsRecent generations of the account (website, API and MCP). Free.

Image and video jobs are asynchronous: the call returns a job_id, then get_result returns the media. Video jobs, video edits and image batches return a USD quote first and charge nothing until you repeat the call with confirm_cost.

Second-opinion server (/api/mcp/second-opinion): paid

ToolWhat it does
adviseA stronger model gives a concise engineering second opinion with a proceed / revise / stop verdict.
ask_modelAsk one specific catalog model (for example claude-opus-5-5 or gpt-6.2-sol) for a second opinion.
consensusAsk 2–3 different models the same question in parallel and get a synthesis of agreements and disagreements.
review_diffCode review of a unified diff by another model: findings with lines, severity and fixes, or NO_ISSUES.

Every call is capped by its max_usd and the result shows the cost and the models that answered.

Authentication

  • OAuth 2.1 with dynamic client registration and PKCE (S256). Each server is its own protected resource: metadata is served at https://tokenomat.ai/.well-known/oauth-protected-resource/<endpoint path>, for example /.well-known/oauth-protected-resource/api/mcp/media. A token issued for one server is not accepted by another, so the read-only consent never grants spending.
  • API key tm_live_… as Authorization: Bearer. The paid servers need a key with the gateway and mcp scopes; new keys have both.
  • tools/list and ping work without credentials, so clients and catalogs can read the tool list. initialize and every tools/call without a valid credential return HTTP 401 with a WWW-Authenticate challenge that starts OAuth.
  • The account server is read-only. Keys, budgets, daily caps and allowed models are managed only in the web account, never through MCP.

Details: docs/authentication.md.

Billing

  • One prepaid USD balance for the gateway and all MCP servers. No subscription is required.
  • Top up in the web account by PayPal (a PayPal account or a card through PayPal checkout) or with crypto stablecoins. top_up returns the link.
  • LLM calls (second opinion) are charged at the developers' list prices. Live prices: list_models on the account server.
  • Media is charged per image, per clip or per second, or per block of transcript characters for speech. Live prices: list_models on the media server. Failed generations are not charged.
  • Optional lifetime budgets and daily caps per key, per OAuth connection and per project, set in the web account.

Details: docs/pricing.md.

Registry

The servers are published in the official MCP Registry as ai.tokenomat/account, ai.tokenomat/media and ai.tokenomat/second-opinion. Descriptors: server.json (account), servers/media.json and servers/second-opinion.json. Icon: assets/icon-512.png.

curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=ai.tokenomat"

Documentation

Links

License

MIT © Tokenomat. This repository is public documentation only. It contains no server source code, keys or secrets.