Count tokens (o200k/cl100k), truncate to a budget, chunk text for RAG and estimate LLM cost.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Optional. 'Bearer <key>' for higher limits. Works without a key.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.
Text (≤256 KB). URLs are not fetched.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
claude mcp add --transport http tokentally https://tokentally.mike-tusa.workers.dev/mcp
Headers
Authorization (optional, not in the config above): Optional. 'Bearer <key>' for higher limits. Works without a key.Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.
| Argument | Type | Description |
|---|---|---|
| text* | string | Text (≤256 KB). URLs are not fetched. |
| model | string | |
| encoding | string | |
| chunk_tokens | integer | |
| overlap_tokens | integer |
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"model": {
"type": "string"
},
"encoding": {
"enum": [
"o200k_base",
"cl100k_base"
],
"type": "string"
},
"chunk_tokens": {
"type": "integer"
},
"overlap_tokens": {
"type": "integer"
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| text* | string | Text (≤256 KB). URLs are not fetched. |
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| text | string | Text (≤256 KB). URLs are not fetched. |
| models | array | |
| input_tokens | integer | |
| output_tokens | integer |
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"models": {
"type": "array",
"items": {
"type": "string"
}
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
}
}
}Truncate text to max_tokens (keep start or end) for an encoding or model.
| Argument | Type | Description |
|---|---|---|
| keep | string | |
| text* | string | Text (≤256 KB). URLs are not fetched. |
| model | string | |
| encoding | string | |
| max_tokens* | integer |
{
"type": "object",
"required": [
"text",
"max_tokens"
],
"properties": {
"keep": {
"enum": [
"start",
"end"
],
"type": "string"
},
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"model": {
"type": "string"
},
"encoding": {
"enum": [
"o200k_base",
"cl100k_base"
],
"type": "string"
},
"max_tokens": {
"type": "integer"
}
}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 1, 2026.