Tokencost Mcp Server
@ankit-aglawe
An MCP (Model Context Protocol) server that provides real-time LLM token pricing data for 60+ AI models across 15 providers.
Overview
What is Tokencost Mcp Server?
Tokencost Mcp Server is an MCP (Model Context Protocol) server that provides real-time LLM token pricing data for 60+ AI models across 15 providers. It allows AI assistants to query, compare, and estimate costs for models from OpenAI, Anthropic, Google, Meta, xAI, Mistral, DeepSeek, and more.
How to use Tokencost Mcp Server?
Install by adding the server to your MCP config with npx -y tokencost-mcp-server as the command, or clone the repository and run from source. Use tools like tokencost_get_model_pricing, tokencost_compare_models, tokencost_estimate_cost, tokencost_find_cheapest, tokencost_list_models, and tokencost_list_providers.
Key features of Tokencost Mcp Server
- Real-time pricing for 60+ models across 15 providers
- Dedicated MCP tools for pricing queries and comparisons
- Cost estimation for given input/output token counts
- Filtered search for cheapest models by context length
- Up-to-date pricing tracked by the TokenCost team
- Free and open-source deployment via npx
Use cases of Tokencost Mcp Server
- Query pricing for a specific LLM model by name
- Compare side-by-side pricing of multiple models
- Estimate processing cost for a known token count
- Find the cheapest model meeting a minimum context window
- List all available models or providers with price ranges
FAQ from Tokencost Mcp Server
What are the runtime requirements?
Node.js and npm are required; the server runs via npx or from a local clone.
How is pricing data kept current?
The TokenCost team monitors official provider announcements and updates pricing within days of changes.
Which providers are supported?
OpenAI, Anthropic, Google, xAI, Meta, Mistral, DeepSeek, Alibaba (Qwen), Amazon (Nova), NVIDIA, Cohere, Perplexity, Moonshot (Kimi), Zhipu (GLM), and MiniMax.
How can I report outdated pricing or a missing model?
Open an issue on the GitHub repository, and the team will update the data.
What transport does Tokencost Mcp Server use?
It uses standard MCP stdio transport, as indicated by the command-based configuration. No authentication is required.