Count your tokens.
Like beads on an abacus.
Every token counts — monitor budgets, estimate costs, optimize context, and cut AI spending before it adds up. A VS Code extension, MCP server, and CLI that makes the invisible visible.

Features
BPE Tokenization
Real token counts with Claude BPE and OpenAI o200k_base encoders.
v3.1.7Context Budget Meter
Live sidebar showing token usage vs model context window with Budget Level indicators.
v3.1.7Tab Relevance Scoring
5-signal scoring: language match, import relationships, path similarity, edit recency, diagnostics.
v3.1.7Cost-per-Turn Estimate
Know the dollar cost before you send. Per-MTok pricing for 17 models.
v3.1.717 Model Profiles
Claude Opus/Sonnet/Haiku 4.x, GPT-5.x, o4-mini, Gemini 3.x/2.5 with live pricing.
v3.1.7Next Turn Preview
Project total tokens after your next turn to decide whether to send or restart.
v3.1.7Workspace Security Scan
Detect Sensitive Files (.env, .pem, credentials) and generate deny rules for Claude and Copilot.
ProUpgrade to Pro →Smart Model Routing
Automatically select the most cost-effective model based on task complexity.
ProUpgrade to Pro →Team Analytics
Usage dashboards, audit logs, cost insights, and spend controls across your organization.
EnterpriseContact Sales →Quick Start
- 1Install from the VS Code Marketplace or run `ext install vfaraji89.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 Opus/Sonnet/Haiku 4.x, GPT-5.5, GPT-5.4 family, GPT-5.3 Codex, 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
- Pricing
- Live cost estimation per turn — input/output breakdown with per-MTok rates for all 17 models
- 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
/terminology-genScan terminology sources and show token compression potential
/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 tokalatorBuilt for teams that ship with AI
The free extension keeps your own context in check. Tokalator Pro takes that across your team, your pipeline, and your sensitive code, so context stays a managed budget instead of a surprise.
See it across the team
Shared context budgets and a team dashboard, so the whole org sees what is filling the window, not just the person who opened the file.
Catch regressions early
Historical token analytics across days, sprints, and models. Spot context spend creeping up long before it shows on the invoice.
Guardrails in CI
Budget gates fail the build when context blows past your threshold, keeping AI agents honest inside the pipeline.
Keep secrets out of context
Secure Workspace shields sensitive files from the model, and custom model profiles plug in your internal or fine-tuned models.
Every token you save
makes the next prompt better.
Open source. Community shaped. Free forever.