Skip to content
MCP server

TokenTally by Harlo

Count tokens, trim text to a budget, chunk for RAG and estimate LLM cost

Install
Pricing
Freemium
Platforms
API, Web
Runs
Remotely
Version
0.1.0
Listing updated
2 days ago

About TokenTally by Harlo

TokenTally by Harlo is a freemium MCP server for ai models and llm tooling. It runs as a hosted remote server, so there is nothing to install locally.

OpenAI counts use the o200k_base and cl100k_base tokenizers and are exact; counts for Claude, Gemini and Llama come from a proxy encoding and are approximate. The site warns real tokenizers often differ by 10 to 20 percent, and newer Claude tokenizers by about 30 percent or more. Cost estimates use a price table dated 2026-10-27 and are not live billing.

count_tokens shows both OpenAI encodings side by side with method notes. truncate_to_budget keeps the start or end of a text to fit max_tokens. chunk_text splits on paragraph and sentence boundaries with character offsets, token counts and optional overlap, for retrieval pipelines. estimate_cost prices text, or input and output token counts, per model.

The service is stateless: text is not stored or logged and the service makes no outbound requests to URLs. Maximum input is 256 KB, and one unbroken run of characters near that cap may hit a CPU timeout (503). Free is 2,000 calls, Basic $9 a month for 50,000 and Pro $15 for 250,000.

Install

Run in a terminal

claude mcp add --transport http tokentally https://tokentally.mike-tusa.workers.dev/mcp

Add to Settings → Connectors → Add custom connector

https://tokentally.mike-tusa.workers.dev/mcp
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "tokentally": {
      "url": "https://tokentally.mike-tusa.workers.dev/mcp"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "tokentally": {
      "type": "http",
      "url": "https://tokentally.mike-tusa.workers.dev/mcp"
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "tokentally": {
      "serverUrl": "https://tokentally.mike-tusa.workers.dev/mcp"
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "tokentally": {
      "type": "http",
      "url": "https://tokentally.mike-tusa.workers.dev/mcp"
    }
  }
}

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

count_tokens
Counts tokens in o200k_base and cl100k_base side by side, plus approximate Claude, Gemini and Llama counts.
truncate_to_budget
Truncates text to max_tokens, keeping the start or end.
chunk_text
Splits text into token-bounded chunks on paragraph and sentence boundaries with offsets and optional overlap.
estimate_cost
Estimates USD cost per model from text or input and output token counts.

What it does

Side-by-side token counts
o200k_base and cl100k_base counted together.
Budget truncation
Keep the start or end of a text within max_tokens.
RAG chunking
Token-bounded chunks with offsets and optional overlap.
Cost estimates
USD per model from a dated price table.
Stateless processing
Text is not stored, logged or retrieved.

Good for

  • Check whether a prompt fits a context window
  • Trim a document to a token budget
  • Split a long text into overlapping chunks
  • Estimate the cost of a batch before running it

Pricing

Freemium, from $9 a month

Free 2,000 calls; Basic $9/month for 50,000; Pro $15/month for 250,000.

Prices change. Check tokentally.mike-tusa.workers.dev before you buy.

TokenTally by Harlo FAQ

Are the counts exact?

Exact for OpenAI's two tokenizers; approximate for Claude, Gemini and Llama.

Is the cost live?

No. It is an estimate from a price table dated 2026-10-27.

Is my text stored?

No. It is not stored or logged.

What is the size limit?

256 KB of input.

Is TokenTally by Harlo free?

TokenTally by Harlo has a free plan, with paid plans for more usage or features. Paid plans start at $9 a month.

How do I add TokenTally by Harlo to Claude Code?

Run this command in your terminal: claude mcp add --transport http tokentally https://tokentally.mike-tusa.workers.dev/mcp

What are the best alternatives to TokenTally by Harlo?

The closest alternatives to TokenTally by Harlo are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to TokenTally by Harlo

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools