Yue Token Cost
Analyze, compare, and explain tokenization costs across Chinese, Cantonese, and English scripts for modern LLM tokenizers.
Yue Token Cost is a specialized Model Context Protocol (MCP) server and developer utility designed to measure and explain the real token expenses of Chinese and Cantonese text. By comparing across scripts like Simplified Chinese, Traditional Chinese, Cantonese, and English, it uncovers why bill discrepancies occur across tokenizers like o200k_base and cl100k_base. The tool operates deterministically without requiring GPUs, data pipelines, or model training, delivering per-token attributions, byte-level breakdown explanations, and clear cost metrics directly to MCP-enabled IDEs and environments.
Key Features
01Detailed token attribution and breakdown highlighting byte-level splits, partial characters, and digit splittings
02Direct token, character, byte, and USD cost estimation based on configurable pricing models
03Zero-GPU, lightweight stdio MCP server packaged for quick execution with npx
040 GitHub stars
05Multi-tokenizer support for modern families like o200k_base and legacy cl100k_base
06Cross-script token comparison across English, Simplified Chinese, Traditional Chinese, and Cantonese
Use Cases
01Evaluating prompt engineering choices to determine if rewriting text or upgrading tokenizer architectures yields better token savings
02Auditing and optimizing LLM API expenses for multilingual applications handling Chinese and Cantonese dialects
03Debugging tokenization artifacts such as fragmented characters or sub-optimal byte splits during NLP preprocessing