TokenCost
An MCP (Model Context Protocol) server that provides real-time LLM token pricing data for 60+ AI models across 15 providers.
TokenCost MCP Server
An MCP (Model Context Protocol) server that provides real-time LLM token pricing data for 60+ AI models across 15 providers.
Query, compare, and estimate costs for models from OpenAI, Anthropic, Google, Meta, xAI, Mistral, DeepSeek, and more — directly from your AI assistant.
Built by TokenCost — the free LLM token cost calculator.
Tools
| Tool | Description |
|---|---|
tokencost_get_model_pricing | Get pricing for a specific model |
tokencost_compare_models | Side-by-side pricing comparison |
tokencost_estimate_cost | Calculate cost for given token counts |
tokencost_find_cheapest | Find cheapest models with filters |
tokencost_list_models | List all available models |
tokencost_list_providers | List all providers with pricing ranges |
Quick Start
Claude Desktop / Cursor / Windsurf
Add to your MCP config:
{
"mcpServers": {
"tokencost": {
"command": "npx",
"args": ["-y", "tokencost-mcp-server"]
}
}
}
From Source
git clone https://github.com/ankit-aglawe/tokencost-mcp-server
cd tokencost-mcp-server
npm install
npm run build
npm start
Example Usage
"How much would it cost to process 1M input tokens with GPT-5?"
→ Uses tokencost_estimate_cost with model="gpt-5", input_tokens=1000000, output_tokens=0
"Compare Claude Sonnet 4.6 vs GPT-5 vs Gemini 3 Pro pricing"
→ Uses tokencost_compare_models with ["claude-sonnet-4.6", "gpt-5", "gemini-3-pro"]
"What's the cheapest model with at least 200K context?"
→ Uses tokencost_find_cheapest with min_context=200000
Supported Providers
OpenAI, Anthropic, Google, xAI, Meta, Mistral, DeepSeek, Alibaba (Qwen), Amazon (Nova), NVIDIA, Cohere, Perplexity, Moonshot (Kimi), Zhipu (GLM), MiniMax
Pricing Data
Pricing is kept accurate and up to date by the TokenCost team. We track official provider announcements and update pricing as soon as changes are published — new models, price cuts, and deprecations are reflected within days.
If you notice outdated pricing or a missing model, open an issue and we'll get it updated.
License
MIT
Serveurs connexes
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Bash MCP
Execute shell commands without permission prompts.
Swap API
Free token swaps for AI agents. No API keys. Returns executable transaction calldata for 40+ EVM chains.
Deephaven MCP
MCP servers for Deephaven to orchestrate data workers and power documentation Q&A with LLMs, enabling AI-driven data workflows.
Moralis Web3 API
Interact with the Moralis Web3 API to access blockchain data across multiple networks through a structured interface.
Bio-MCP FastQC Server
Provides quality control for biological sequence data using the FastQC and MultiQC tools.
Chrome DevTools MCP
Debug web applications by connecting to Chrome's developer tools via the Chrome DevTools Protocol.
Reference Servers
Reference implementations of Model Context Protocol (MCP) servers in Typescript and Python, showcasing MCP features and SDK usage.
Cloudflare MCP Server Example
An example of deploying a remote MCP server on Cloudflare Workers without authentication.
Autodev Codebase
A platform-agnostic code analysis library with semantic search capabilities and MCP server support.
PHP MCP Server
Provides semantic PHP code analysis and refactoring tools, enabling AI assistants to perform safe, intelligent code transformations at the AST level.