io.github.ufhouck/aicost-cli
Click on "Deploy 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., "@io.github.ufhouck/aicost-cli compare gpt-4o direct vs openrouter cost in USD"
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.
AI-Cost-CLI & MCP (aicost-mcp)
A terminal-based AI API cost calculator, monthly workload budget estimator, recommender, and Model Context Protocol (MCP) server. Covers 60+ curated multimodal models plus 470+ live models dynamically, compares Direct providers vs. Aggregators/Gateways, factors in prompt caching and Batch API discounts, and converts across 200+ currencies.
Preview: Direct vs. Aggregator Comparison
Compare the effective cost of using frontier models directly vs. through gateways like OpenRouter, including platform fees, context windows, and prompt-caching rates.
Comparison: claude-sonnet-5.5 vs openrouter/claude-sonnet-5.5
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Attribute ┃ claude-sonnet-5.5 ┃ openrouter/claude-sonnet-5.5 ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Provider │ Anthropic │ OpenRouter │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Source │ Direct │ Aggregator │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Platform Fee │ 0.0% │ 5.5% │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Context Window │ 1M │ 1M │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Input Cost │ 2.0000 USD (/1M) │ 2.1100 USD (/1M) │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Cached Input │ 0.1000 USD (/1M) │ 0.1055 USD (/1M) │
├────────────────────┼─────────────────────────┼────────────────────────────────┤
│ Output / Unit Cost │ 10.0000 USD (/1M) │ 10.5500 USD (/1M) │
└────────────────────┴─────────────────────────┴────────────────────────────────┘Related MCP server: TokenLens MCP Server
Supported Models (Curated Frontier + 470+ Live Catalog)
Flagship Text & Reasoning Models
Model | Provider | Input/1M | Cached/1M | Output/1M | Context |
GPT-6.2 Astra ( | OpenAI | $8.00 | $0.40 | $40.00 | 1.05M |
GPT-6.2 Sol ( | OpenAI | $2.00 | $0.10 | $10.00 | 1.05M |
GPT-6.1 Terra ( | OpenAI | $1.00 | $0.05 | $5.00 | 1.05M |
GPT-6 Luna ( | OpenAI | $0.10 | $0.01 | $0.50 | 1.05M |
o3 / o3-Pro ( | OpenAI | $2.00 / $20 | $0.50 / - | $8.00 / $80 | 200K |
Claude Fable 5.2 ( | Anthropic | $8.00 | $0.20 | $40.00 | 1M |
Claude Opus 5.5 ( | Anthropic | $4.00 | $0.20 | $20.00 | 1M |
Claude Sonnet 5.5 ( | Anthropic | $2.00 | $0.10 | $10.00 | 1M |
Claude Haiku 5.5 ( | Anthropic | $0.10 | $0.01 | $0.50 | 1M |
Gemini 4 Neon ( | $3.00 | $0.15 | $15.00 | 1M | |
Gemini 4 Carbon / Argon ( | $2.00 | $0.10 | $10.00 | 1M | |
Gemini 4 Hydrogen ( | $1.50 | $0.075 | $7.50 | 1M | |
Gemini 3.8 Flash ( | $0.825 | $0.0825 | $4.125 | 1M | |
Grok 4.7 ( | xAI | $2.00 | $0.50 | $6.00 | 500K |
DeepSeek V4 Pro ( | DeepSeek | $0.90 | $0.20 | $1.50 | 1M |
DeepSeek V4.1 Flash ( | DeepSeek | $0.15 | $0.003 | $0.60 | 1M |
Qwen 4 Max ( | Alibaba Qwen | $1.425 | - | $4.275 | 1M |
Llama 4 Maverick / Scout ( | Meta | $0.35 / $0.10 | $0.17 / - | $1.00 / $0.30 | 512K / 1.3M |
Mistral Large 4 ( | Mistral | $0.70 | - | $2.10 | 1M |
Kimi K3.1 Pro ( | Moonshot | $0.253 | - | $8.80 | 1M |
MiniMax M3.1 Flash ( | MiniMax | $0.075 | - | $0.30 | 1M |
Image, Video & Audio Models
Model | Provider | Price | Billing Unit | Type |
GPT-Image 2.6 Sunburst ( | OpenAI | $0.08 | per image | Image |
GPT-Image 2.6 Flare ( | OpenAI | $0.025 | per image | Image |
Imagen 4 Fast / Standard / Ultra | $0.02 / $0.04 / $0.06 | per image | Image | |
Flux 1.1 Pro / Ultra | Black Forest Labs | $0.04 / $0.06 | per image | Image |
Veo 3.1 Fast / Standard ( | $0.10 / $0.40 | per second | Video | |
Lyria 3 Clip / Pro ( | $0.04 / $0.08 | per clip / song | Music | |
Whisper ( | OpenAI | $0.006 | per minute | Speech-to-Text |
TTS Standard / HD | OpenAI | $15 / $30 | per 1M chars | Text-to-Speech |
Browse curated models via
aicost list, include previous-gen models with--include-legacy, or query all 470+ live models withaicost list --live!
Features
Always-Current Hybrid Catalog: Weekly automated discovery of newly released flagship models + on-demand fallback to 470+ live OpenRouter models (never hits "Model not found" on new releases).
Dynamic Direct vs. Aggregator Math: Prefix any model with
openrouter/(e.g.,openrouter/gpt-6.2-astra) to instantly compare Direct billing vs. OpenRouter's 5.5% fee.Prompt Caching & Batch Discounts: First-class support for
--cached-inputread rates (up to 95% savings) and--batchAPI discounts.Monthly Workload Estimator (
aicost estimate): Forecast daily, 30-day, and annual API spend from expected request traffic.200+ Currencies with Offline Resilience: Powered by a 3-tier CDN currency engine (
TRY,EUR,GBP,AZN,AED,JPY, etc.) with 24-hour local cache.Dual MCP Server Ecosystem (
npx&uvx): Zero-install MCP integration via npm (aicost-mcp) or PyPI (aicost-cli).
Installation
MCP Server (npx — Recommended for Claude Desktop, Cursor, Windsurf, VS Code)
Add to your MCP configuration (claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"aicost": {
"command": "npx",
"args": ["-y", "aicost-mcp"]
}
}
}Python CLI (pip / uv)
pip install -U aicost-cliCLI Usage
List & Filter Models
aicost list --currency TRY
aicost list --provider Anthropic
aicost list --live --provider Cohere
aicost list --tag agentic --sort input --jsonCalculate Cost (with Caching & Batch Support)
# Frontier model with prompt caching
aicost calc claude-opus-5.5 --input 200000 --cached-input 800000 --output 100000 --currency USD
# Batch API (-50%) calculation
aicost calc gpt-6.2-astra --input 1000000 --output 500000 --batch
# Dynamic OpenRouter aggregator fee breakdown on ANY model
aicost calc openrouter/gemini-4-carbon --input 1000000 --output 500000 --currency TRY
# Multimodal unit calculation (seconds, minutes, images)
aicost calc veo-3.1 --units 8 --currency USDProject Monthly Workload Budget
aicost estimate claude-sonnet-5.5 --requests-per-day 2500 --input 1800 --output 450 --currency USDCompare 2+ Models Side-by-Side
aicost compare gpt-6.2-astra claude-opus-5.5 gemini-4-neon grok-4.7 --currency USDGet Task Recommendations
aicost recommend "fast cheap agentic coding" --max-cost 1.0 --currency USDSync Latest Pricing, Live 470+ Catalog & Exchange Rates
aicost syncRegistries
MCP Registry —
io.github.ufhouck/aicost-cli
Community & Governance
License
MIT — see LICENSE for details. Developed by Ufuk Aydın.
Available Tools
8 toolscalculate_ai_costB
Calculate the exact cost of an AI API call with full base cost, prompt-caching, batch discount, and aggregator platform fee breakdown. Supports 60+ curated models and 400+ live OpenRouter models.
Inputs: model_id (required), batch, units, currency, +3 more.
compare_ai_modelsA
Compare two or more AI models side-by-side on pricing, platform fees, context window, and optional sample workload cost.
Inputs: units, currency, model_ids, model_id_1, +3 more.
estimate_monthly_costB
Estimate daily, monthly, and annual AI API costs for a recurring production workload.
Inputs: model_id (required), requests_per_day (required), days, batch, +5 more.
get_ai_costC
Alias for calculate_ai_cost: calculate the cost of an AI model usage based on tokens or units.
Inputs: model_id (required), batch, units, currency, +3 more.
get_pricing_metadataA
Get metadata about the current pricing database (schema version, model count, live catalog count, last update date, currency cache timestamp).
Inputs: no named parameters.
list_ai_modelsA
List AI models and their effective pricing across text, image, video, audio, and gateway providers. Supports curated flagship models plus optional 400+ live OpenRouter catalog.
Inputs: tag, currency, provider, model_type, +2 more.
recommend_ai_modelA
Recommend the best cost-effective AI models for a task description. Supports keywords like 'coding', 'cheap', 'fast', 'agentic', 'vision', 'reasoning', 'video', 'image', 'music'.
Inputs: task_description (required), limit, currency, model_type, +2 more.
sync_pricing_dataB
Fetch the latest curated pricing database, refresh 400+ live OpenRouter models, and update currency exchange rates.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are cleanly separated by intent: listing catalog models, calculating a single call's cost, comparing models, recommending models, estimating recurring spend, and syncing/auditing the pricing database. The one weak spot is get_ai_cost, which is an exact duplicate of calculate_ai_cost; it is explicitly labeled as an alias, so misselection is unlikely, but the overlap is real.
All eight tools use snake_case verb_noun construction (list_, calculate_, get_, sync_, compare_, recommend_, estimate_) with predictable noun targets. The only nuance is get_ai_cost acting as an alias, but its naming still fits the same convention.
Eight tools is well-scoped for a pricing/cost-estimation server, with each tool mapping to a distinct user need (discover, price, compare, recommend, forecast, refresh, inspect). No padding beyond the single alias.
The surface covers the full lifecycle: model discovery, per-call cost math, comparison, recommendation, monthly forecasting, data sync, and metadata inspection. Minor gaps exist — no per-model detail lookup, no direct currency conversion tool, and no batch/multi-model cost calculation — but agents can work around these via the existing tools.
Maintenance
Related MCP Connectors
LLM API prices and AI agent cost estimates, verified daily. Read-only cost lookup tools.
Look up, compare and track AI model API prices from an AI assistant. No sign-in needed.
Find AI model pricing, estimate token costs and compare offers. No API key required.
Loan & mortgage calculator, compound interest, ROI, crypto prices, FX conversion for AI agents.
Related MCP Servers
- AlicenseNot 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.1MIT
- FlicenseAqualityDmaintenanceEnables AI agents to compare AI model pricing plans, run cost scenarios, find break-even points, and get plan recommendations using TokenLens data.4-

OptimToken MCPofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to fetch live, dated prices for LLM models and cloud compute instances across providers, compare and recommend models, and estimate monthly costs based on workload-specific token shapes and constraints.MIT
indextkn MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables agents to query live AI model pricing, compare providers, and calculate token workload costs from current published prices.MIT