# TokenTally by Harlo

> TokenTally by Harlo is a freemium MCP server for ai models and llm tooling. Count tokens, trim text to a budget, chunk for RAG and estimate LLM cost. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $9 a month
- **Platforms:** API, Web
- **Website:** https://tokentally.mike-tusa.workers.dev
- **MCP Registry name:** dev.workers.mike-tusa.tokentally/tokentally
- **Categories:** AI models and LLM tooling, developer tools
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://tokentally.mike-tusa.workers.dev/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tokentally": {
      "url": "https://tokentally.mike-tusa.workers.dev/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/tokentally-by-harlo
