TokenTally by Harlo
Count tokens (o200k/cl100k), truncate to a budget, chunk text for RAG and estimate LLM cost.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (1)
- LOWen estimate_cost
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"tokentally": {
"url": "https://tokentally.mike-tusa.workers.dev/mcp"
}
}
}Puntos de conexión remotos
https://tokentally.mike-tusa.workers.dev/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (4)
🟢count_tokens(text)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
}
},
"required": [
"text"
]
}🟢truncate_to_budget(text, max_tokens, keep, encoding, model)
Truncate text to max_tokens (keep start or end) for an encoding or model.
Esquema de entrada
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"max_tokens": {
"type": "integer"
},
"keep": {
"type": "string",
"enum": [
"start",
"end"
]
},
"encoding": {
"type": "string",
"enum": [
"o200k_base",
"cl100k_base"
]
},
"model": {
"type": "string"
}
},
"required": [
"text",
"max_tokens"
]
}🟢chunk_text(text, chunk_tokens, overlap_tokens, encoding, model)
Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.
Esquema de entrada
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"chunk_tokens": {
"type": "integer"
},
"overlap_tokens": {
"type": "integer"
},
"encoding": {
"type": "string",
"enum": [
"o200k_base",
"cl100k_base"
]
},
"model": {
"type": "string"
}
},
"required": [
"text"
]
}🟢estimate_cost(text, input_tokens, output_tokens, models)
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.
Esquema de entrada
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text (≤256 KB). URLs are not fetched."
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"models": {
"type": "array",
"items": {
"type": "string"
}
}
}
}Comunidad
Evidencia