ohmytoken
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ohmytokencompare prices for GPT-5.2 and Sonnet 4.5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Real-time token pricing for 23 AI models across 8 providers (Anthropic, OpenAI, Google, DeepSeek, Zhipu, MiniMax, Moonshot, Alibaba). Built for agents — not just humans.
Features
Price Intelligence
Real-time pricing table with sorting, filtering by provider/category/open-source
Token cost calculator — input your usage, see daily/monthly costs across all models
Price evolution timeline — from GPT-4 ($30/MTok) to DeepSeek V3 ($0.3/MTok)
Agent-First Design
MCP Server — 5 tools for price queries, model comparison, smart recommendations
Token Tracker — 5 tools for consumption logging, budget management, efficiency analysis
REST API — 12 endpoints for programmatic access
agents.txt — Machine-readable service description at
/agents.txt
Bilingual — Chinese / English with automatic RMB / USD currency conversion
Related MCP server: agent-cost-mcp
Quick Start
git clone https://github.com/LangGPT/ohmytoken.git
cd ohmytoken
npm install
npm run build
npm run dev # → http://localhost:18090MCP Server
Add to your Claude Code settings.json:
{
"mcpServers": {
"ohmytoken": {
"command": "npx",
"args": ["tsx", "src/mcp/index.ts"]
}
}
}Tools:
Tool | Description |
| Get real-time pricing for any model or provider |
| Side-by-side comparison of 2+ models |
| Smart recommendation by task, budget, preferences |
| Estimate costs for a workload across all models |
| Historical token price trends since 2023 |
Token Tracker
Every agent deserves a financial dashboard. Track your token spending like wandb tracks experiments.
{
"mcpServers": {
"ohmytoken-tracker": {
"command": "npx",
"args": ["tsx", "src/mcp/tracker.ts"]
}
}
}Tools:
Tool | Description |
| Record token consumption (cost auto-calculated) |
| Query spending by period, model, or task |
| Set daily/monthly limits with auto-warnings |
| Spending patterns and optimization suggestions |
| Multi-agent ranking — who's most efficient? |
Data stored in ~/.ohmytoken/ledger.jsonl (append-only, portable).
REST API
Base URL: https://www.ohmytoken.com/api (or http://localhost:18090/api)
# All models
curl /api/models?provider=anthropic
# Cost calculation
curl -X POST /api/calculate \
-d '{"inputTokens":1000000,"outputTokens":500000,"requestsPerDay":100}'
# Smart recommendation
curl -X POST /api/recommend \
-d '{"task":"coding","preferOpenSource":true}'
# Log agent token usage
curl -X POST /api/tracker/log \
-d '{"agent_id":"my-agent","model":"claude-opus-4-6","input_tokens":5000,"output_tokens":1000}'
# Agent leaderboard
curl /api/tracker/leaderboardModels Covered
Provider | Models | Price Range (Input $/MTok) |
Anthropic | Opus 4.6, Sonnet 4.5, Haiku 4.5 | $1 — $5 |
OpenAI | GPT-5.2, GPT-4.1, o3, o4-mini | $0.1 — $2 |
Gemini 2.5 Pro, 2.5 Flash, 2.0 Flash | $0.1 — $1.25 | |
DeepSeek | V3, R1 | $0.3 — $0.7 |
Zhipu | GLM-5, GLM-5 Code, GLM-4.7 | $0.07 — $1.2 |
MiniMax | M2.1 | $0.3 |
Moonshot | Kimi K2, Kimi K2.5 | $0.6 |
Alibaba | Qwen3-Max, QwQ-Plus | $0.8 — $1.2 |
Project Structure
ohmytoken/
├── src/
│ ├── client/ # React SPA (bilingual, light theme)
│ │ ├── components/ # PriceTable, Calculator, Timeline, AgentDashboard, ...
│ │ ├── i18n.ts # zh/en translations, RMB/USD conversion
│ │ └── styles.css # Light theme with glass morphism
│ ├── server/ # Express API server (port 18090)
│ ├── mcp/
│ │ ├── index.ts # Price intelligence MCP server
│ │ └── tracker.ts # Token consumption tracker MCP server
│ └── shared/ # Types, data, tracker storage
├── docs/ # GitHub Pages static build
├── public/ # Static assets (index.html, agents.txt)
└── build.js # esbuild bundlerLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Live LLM API pricing: token prices, comparisons, cheapest-model lookups. No key required.
Compare up-to-date pricing for 40+ LLMs (incl. Chinese) & estimate cost from tokens. EN/zh.
Live crypto prices, conversion, gas tracker, portfolio tools, and calculators for AI agents.
101AI inference pricing for agents: live and historical model prices, provider comparison.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time AI model pricing, cost estimation, and budget management tools to help agents understand and optimize their spending. It enables agents to compare costs across multiple providers and select the most cost-effective models for specific tasks.1-
- AlicenseAqualityDmaintenanceTracks AI agent token usage and spending in real time, with budget alerts, per-task cost breakdown, and a visual dashboard.61MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI cost calculation, comparison, and optimization across major providers like Anthropic, OpenAI, Google, Meta, and Mistral. Supports cost estimation, budget-aware model finding, and token estimation through a simple API and MCP integration.-
- FlicenseNot gradedqualityCmaintenanceProvides tools to count tokens, estimate API costs, optimize prompts, and compare AI model pricing for multiple LLMs.88-
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LangGPT/ohmytoken'
If you have feedback or need assistance with the MCP directory API, please join our Discord server