Token Counter
Counts tokens under OpenAI-compatible (tiktoken) encodings, by model or encoding name.
Should I use this
Quality & Safety
A
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
~175Tokens (tool definitions)
~1.3 KBTypical response size
Minimal attention impact (0.14% of 128k context)
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"token-counter": {
"url": "https://apished.com/mcp/v1/tokens"
}
}
}Remote endpoints
https://apished.com/mcp/v1/tokensstreamable-httpWhat it can do
Tool inventory
Tools (1)
🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢tokens_count(text, model, encoding)
Counts tokens under an OpenAI-compatible (tiktoken) encoding. Provide exactly one of model (e.g. "gpt-4o") or encoding ("o200k_base" or "cl100k_base"). No Claude/Anthropic tokenizer.
Input Schema
{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"model": {
"type": "string",
"description": "e.g. gpt-4o; exactly one of model/encoding"
},
"encoding": {
"type": "string",
"description": "o200k_base or cl100k_base; exactly one of model/encoding"
}
},
"required": [
"text"
],
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"tokens": {
"type": "integer"
},
"encoding": {
"type": "string"
}
},
"required": [
"tokens"
],
"additionalProperties": false
}Community
Evidence
Recent observations
verifiedversion not recorded1 tools
verifiedversion not recorded1 tools