tokencost_get_model_pricingLABSCO SUMMARY
Model pricing is the fact an assistant is most confidently wrong about.
Prices change and training data does not, so a model asked what something costs answers from memory and is out of date. These calls put a maintained price table in front of it instead.
What it is
A pricing lookup for large language models across the providers the vendor tracks. It runs locally from npx and answers from a price table the vendor maintains.
What you get
- tokencost_get_model_pricing — the price for one named model
- tokencost_compare_models — several models priced side by side
- tokencost_estimate_cost — the cost of the input and output token counts you supply
- tokencost_find_cheapest — the cheapest models that pass filters such as a minimum context window
- tokencost_list_models and tokencost_list_providers — every model it knows, and every provider with its pricing range
Requirements
npx on your PATH. No account and no key.
Setup effort
One command — npx -y tokencost-mcp-server
USE CASES
Budgeting a feature before you build it
Give it the token counts you expect per request and get a figure you can multiply, rather than a guess you have to defend later.
Choosing between two models on price
Put the candidates side by side in one call, so the comparison is against today's prices for both.
Finding the cheapest model that still fits your context
Filter by the context window you actually need and let it return what qualifies, instead of checking provider pages one at a time.
Checking whether a price you remember is still right
Look the model up directly, and read the provider's range around it to see whether the whole tier moved.
6 tools
Listed in project docs. Your client may show a different list.
tokencost_compare_modelstokencost_estimate_costtokencost_find_cheapesttokencost_list_modelstokencost_list_providersBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
npx on PATH
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
npx -y tokencost-mcp-serverMCP Clients
Claude Desktop, Cursor, Windsurf
{
"mcpServers": {
"tokencost": {
"command": "npx",
"args": [
"-y",
"tokencost-mcp-server"
]
}
}
}