Count your tokens.
Like beads on an abacus.
Every token counts — monitor budgets, optimize context, and cut AI costs before they add up. A VS Code extension, MCP server, and CLI that makes the invisible visible.
ext install tokalator
Quick Start
- 1Install from the VS Code Marketplace or run `ext install tokalator`
- 2Click the Tokalator icon in the Activity Bar — the sidebar dashboard opens
- 3Type `@tokalator /count` in Copilot or Claude Chat to see your token budget
- 4Pin important files with `/pin` so they always stay in context
- 5Run `/optimize` to get a full health report on your context window
Under the hood
- Tokenizers
- Claude BPE (Anthropic), o200k_base (OpenAI), heuristic (Gemini)
- Models
- 17 profiles — Claude 4.x, GPT-5.4, GPT-5.4 Mini, GPT-5.x Codex, GPT-4.1, o3, o4-mini, Gemini 3.x, Gemini 2.5
- Caching
- Prompt caching (Anthropic 90%), automatic (OpenAI 50%), context caching (Google 75%)
- Scoring
- Relevance from 0 to 1 based on imports, language, path similarity, recency, and diagnostics
- MCP & CLI
- count_tokens, estimate_budget, preview_turn, list_models — works in Claude Code via stdio MCP or as a standalone terminal CLI
All Commands
Available through @tokalator in VS Code Chat.
/countShow current token count and budget status
/breakdownShow where your tokens are going
/optimizeClose low-relevance tabs to free up tokens
/pinPin a file so it's always included
/unpinUnpin a file so it returns to normal relevance scoring
/instructionsList, count, and estimate tokens for instruction files in workspace
/modelShow or switch the active AI model
/compactionShow per-turn token growth and compaction recommendations
/previewPreview token cost of your next message before sending
/resetReset session state (chat turn counter)
/exitEnd the current session and save summary
Beyond VS Code
Token budget awareness wherever you work — not just in the editor.
MCP Server for Claude Code
Real Claude BPE token counting inside Claude Code via stdio MCP transport. Count tokens, estimate file budgets, preview turn cost — zero API calls.
claude mcp add --transport stdio tokalator -- node tokalator-mcp/build/index.jsStandalone CLI
Terminal-first token budgeting for SSH sessions, containers, and non-VS Code workflows. Run tokalator count, budget, preview, or models anywhere.
npm install -g tokalatorEvery token you save
makes the next prompt better.
Open source. Community shaped. Free forever.