TokenTally by Harlo
Server Details
Count tokens (o200k/cl100k), truncate to a budget, chunk text for RAG and estimate LLM cost.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 4 tools
Each tool has a clearly distinct operation: counting tokens, chunking text, truncating to a token budget, and estimating cost. Although chunk_text and truncate_to_budget both operate on token-bounded text, their outputs and use cases are clearly separated. count_tokens and estimate_cost are also distinct: one measures tokens, the other estimates USD cost.
All four tool names follow a consistent snake_case verb_noun pattern: chunk_text, count_tokens, estimate_cost, truncate_to_budget. There are no mixed conventions or vague names. The naming is predictable and easy for an agent to scan.
Four tools is well-scoped for a token utility server focused on counting, chunking, truncating, and cost estimation. Each tool earns its place without obvious redundancy. The surface is neither thin nor bloated.
The server covers the core token-management workflow: count tokens, split text, truncate to a budget, and estimate cost. Minor gaps exist, such as no direct way to list supported models/encodings or inspect the dated price table independently. Agents can still accomplish the main tasks through the provided tools.
Available Tools
4 toolschunk_textChunk text for RAGARead-onlyIdempotentInspect
Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.
Inputs: text (required), model, encoding, chunk_tokens, +1 more.
count_tokensCount tokensARead-onlyIdempotentInspect
Count tokens for text in o200k_base and cl100k_base side by side, plus approximate Claude/Gemini/Llama counts with method notes. OpenAI counts (o200k_base, cl100k_base) are exact for those tokenizers. Claude, Gemini and Llama counts are APPROXIMATE (proxy encoding; real tokenizers differ, often by 10-20%, and newer Claude tokenizers by ~30% or more). Cost estimates use a dated price table (prices_as_of 2026-10-27) and are estimates, not live billing. Stateless: text is not stored or logged; no URL fetching. Max input is 256 KB. A single unbroken run of characters near that cap may hit a CPU timeout (503); normal text at the cap is supported.
Inputs: text (required).
estimate_costEstimate LLM costARead-onlyIdempotentInspect
Estimate USD cost per model from text or input_tokens plus output_tokens using a dated price table (prices_as_of 2026-10-27). Estimates, not live billing.
Inputs: text, models, input_tokens, output_tokens.
truncate_to_budgetTruncate to token budgetARead-onlyIdempotentInspect
Truncate text to max_tokens (keep start or end) for an encoding or model.
Inputs: text (required), max_tokens (required), keep, model, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Token counting, RAG chunking, truncation, HTML to Markdown and JSON repair
Count tokens exactly for any text and see if it fits a 128K, 200K or 1M context window.
Exact Claude API cost calc with real cache economics, plus a tiktoken-misuse scanner.
Web pages and PDFs to clean, LLM-ready Markdown with token counts, small crawls and RAG chunks.
Related MCP Servers
- AlicenseAqualityDmaintenanceEstimates Claude API token counts, per-model cost, and prompt-caching break-even without an API key or network.5MIT
- AlicenseNot gradedqualityDmaintenanceProvides tools to count tokens, estimate API costs, optimize prompts, and compare AI model pricing for multiple LLMs.MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to estimate LLM token costs, enforce context-budget thresholds, compress prompts, and scan for leaked credentials before sending requests to Claude, OpenAI, or Gemini over stdio.MIT
- AlicenseAqualityDmaintenanceLets Claude Desktop, Cursor, Cline, Windsurf, Zed, or any other MCP client estimate token counts and fit a chat history into a model's context budget on demand.358 npm1MIT
Glama MCP Gateway
Add one secure layer between your agents and this server.