MCP Server

Token Counter

com.apished/token-counter
Developer Tools Public & reachable MCP 2025-11-25

What this MCP does

Counts text tokens using OpenAI-compatible model or encoding tokenizers.

tokens_count
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', 'required': ['text'], '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'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'required': ['tokens'], 'properties': {'tokens': {'type': 'integer'}, 'encoding': {'type': 'string'}}, 'additionalProperties': False}
Added
tokens_count
Sept. 17, 2026, 12:33 p.m.