Getting Started
Token Cost (@atriumn/tariff) is an MCP server that provides real-time LLM pricing data. It runs as a local process and communicates over stdio.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ — download
That’s it. No API keys, no accounts, no configuration files.
Install in Claude Code
Section titled “Install in Claude Code”The fastest way to get started:
claude mcp add tariff -- npx -y @atriumn/tariffThis registers the MCP server and it will be available in all future Claude Code sessions.
Install in Cursor
Section titled “Install in Cursor”Add to your Cursor MCP config (.cursor/mcp.json):
{ "mcpServers": { "tariff": { "command": "npx", "args": ["-y", "@atriumn/tariff"] } }}Manual MCP config
Section titled “Manual MCP config”For other MCP clients, the server config is:
{ "mcpServers": { "tariff": { "command": "npx", "args": ["-y", "@atriumn/tariff"] } }}Your first query
Section titled “Your first query”Once installed, just ask your AI assistant a pricing question in natural language:
“How much does Claude Sonnet 4.5 cost per million tokens?”
The assistant will call the get_model_details tool and return something like:
Model: claude-sonnet-4-5Provider: anthropicMode: chat
Pricing (per 1M tokens): Input: $3.00 Output: $15.00
Context Window: Max Input: 200K Max Output: 8K
Capabilities: vision, function_calling, parallel_function_callingHow it works
Section titled “How it works”- On first use, the server fetches pricing data from the LiteLLM community registry
- Data is cached in-memory for 24 hours (with a disk fallback)
- Your AI assistant calls one of the 4 tools via the MCP protocol
- Results are returned as formatted text
No data leaves your machine — the only network request is fetching the public pricing registry.