
media
ai.tokenomat/media
Images, video and speech for agents: Nano Banana, GPT Image, Veo, Wan, Gemini TTS. Pay as you go.
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.
- Website: tokenomat.ai
- MCP docs page: tokenomat.ai/mcp
- Create an API key: tokenomat.ai/profile/keys
- Transport: streamable HTTP, stateless. Nothing to install.
- Auth: OAuth 2.1 (sign in, nothing to copy) or
Authorization: Bearer tm_live_…
Servers
| Registry name | Endpoint | What it does | Cost |
|---|---|---|---|
ai.tokenomat/account | https://tokenomat.ai/api/mcp | Read-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/media | https://tokenomat.ai/api/mcp/media | Image, video and speech generation and editing. | Paid per generation; catalog and job tools are free |
ai.tokenomat/second-opinion | https://tokenomat.ai/api/mcp/second-opinion | A 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
| Tool | What it does |
|---|---|
get_account | Email, balance (paid, bonus, reserved, available) and this key's name, lifetime budget, daily cap and spend. |
list_models | Models with prices in USD per 1M tokens (input, output, cache read, cache write) and supported protocols. |
get_usage | Spending of this key for a day, week or month by model, plus the most recent requests. |
explain_bill | Breakdown of one charged request: token categories at catalog prices, cache savings, orchestration steps. |
simulate_route | Cost estimate for a model request without calling the model; checks balance, budgets, daily caps and allowed models. |
recommend_model | Suggests a cheaper model for the kinds of tasks the account runs, from aggregated statistics (when model advice is enabled). |
top_up | Returns a link to top up the balance in the web account. Nothing is charged. |
Media server (/api/mcp/media): paid generations
| Tool | What it does |
|---|---|
list_models | Image, video and speech models with current per-unit USD prices, resolutions, durations and constraints. Free. |
generate_image | Text-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_image | Edit a completed image with a text instruction (Nano Banana models). Paid. |
generate_video | Video 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_video | Rework an existing clip or shoot the next scene with Wan 3.0. Quote first. Paid. |
generate_speech | Gemini 3.1 Flash TTS speech, one voice or a two-speaker dialogue; returns a WAV URL directly. Paid. |
get_result | Status and result of an image or video job: media URLs, charged cost, available balance. Free. |
list_generations | Recent 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
| Tool | What it does |
|---|---|
advise | A stronger model gives a concise engineering second opinion with a proceed / revise / stop verdict. |
ask_model | Ask one specific catalog model (for example claude-opus-5-5 or gpt-6.2-sol) for a second opinion. |
consensus | Ask 2–3 different models the same question in parallel and get a synthesis of agreements and disagreements. |
review_diff | Code 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_…asAuthorization: Bearer. The paid servers need a key with thegatewayandmcpscopes; new keys have both. tools/listandpingwork without credentials, so clients and catalogs can read the tool list.initializeand everytools/callwithout a valid credential return HTTP401with aWWW-Authenticatechallenge 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_upreturns the link. - LLM calls (second opinion) are charged at the developers' list prices. Live prices:
list_modelson the account server. - Media is charged per image, per clip or per second, or per block of transcript characters for speech. Live
prices:
list_modelson 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
- Tools reference
- Authentication
- Pricing and limits
- Troubleshooting
- Listing copy for catalogs
- Changelog
Links
- Website: tokenomat.ai
- MCP docs page: tokenomat.ai/mcp
- API keys: tokenomat.ai/profile/keys
- Top up: tokenomat.ai/profile/billing
- Support: support@tokenomat.ai
License
MIT © Tokenomat. This repository is public documentation only. It contains no server source code, keys or secrets.
No installation packages available.