SShortSingh.
Back to feed

Claude counts MCP server tokens 64% higher than tiktoken, study of 14 servers finds

0
·1 views

A developer conducted a structured measurement study across 14 MCP servers on August 18, 2026, comparing token counts between tiktoken (o200k_base), Claude, and Gemini tokenizers. The study found Claude consistently counts schema tokens 47–70% higher than tiktoken, with a median premium of 64.1%, while Gemini stayed within 11% of tiktoken across all tested servers. The GitHub MCP server alone consumed 86,843 tokens under Claude — roughly 43% of a 200k context window — before any user message is sent. Most existing MCP cost studies rely on tiktoken, meaning agents running on Claude face a context load approximately 60% larger than those studies suggest. The researcher published the methodology and results as a reproducible, monthly-updated tool called 'loadline' to address the lack of current, standardised MCP token measurement data.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Dev releases zero-allocation source generator to cut WPF/MAUI DependencyProperty boilerplate

A developer has released Kassyi.Generators.DependencyProperty, an open-source .NET source generator designed to eliminate the verbose boilerplate required when declaring DependencyProperty in UI frameworks such as WPF, MAUI, Avalonia, and WinUI 3. A single attribute replaces roughly 20 lines of repetitive registration code, while the generator automatically detects and wires up change-callback methods at compile time. The tool is built on a zero-allocation code synthesis engine using ref struct components, which the author says delivers 30 percent faster execution and 62 percent higher throughput than the upstream project it was forked from. This approach avoids the garbage-collection spikes that standard source generators can trigger on every keystroke, preventing IDE micro-stutters in Visual Studio and Rider at enterprise scale. The package is available on NuGet as Kassyi.Generators.DependencyProperty and the source code is published on GitHub under the Kassyi account.

0
ProgrammingDEV Community ·

117 Identical AI Agent Errors Over 7 Weeks Traced to Path Resolution Inconsistency

An IT analyst running an overnight AI content pipeline at bestaiweb.ai recorded 117 occurrences of a 'File does not exist' error between May 15 and July 2 this year. The pipeline relies on roughly 18 LLM agent sessions per article topic, each guided by a YAML brief file that specifies input and output paths. Investigation revealed no faulty code — instead, the root cause was the AI agent inconsistently resolving relative file paths, sometimes using the correct base directory and sometimes defaulting to its own working directory. Built-in retries masked the failures by allowing agents to self-correct, meaning articles kept delivering overnight while the errors silently accumulated costs. The analyst argues this represents a new category of software failure unique to LLM-based systems, where the same instruction can be interpreted differently across successive runs.

0
ProgrammingDEV Community ·

Stripe Python v15 Breaking Change Silently Halted Automated Digital Deliveries

A developer's automated delivery script stopped fulfilling paid orders after stripe-python was upgraded to version 15, with no errors logged and clean exit codes masking the failure. The root cause was a breaking change in v15 where charge.metadata shifted from a standard Python dict to a StripeObject, which does not support the .get() method, causing an AttributeError that aborted the resolution logic before any fallback could run. Customers were successfully charged, but their digital products were never dispatched because the script silently skipped each charge. The developer noted this was a recurring failure pattern, citing an earlier April incident where a locked log file caused the script to exit cleanly for three days without processing anything. The broader lesson identified was the need to treat all Stripe SDK objects as non-dict types and to build explicit upstream failure alerts rather than relying on exception handling around individual lines.

0
ProgrammingDEV Community ·

How Treating 2048 as a State Machine Can Improve Your Strategy

The popular tile-merging game 2048 can be better understood by analyzing it as a deterministic system rather than a reflex-based game. The 4x4 grid operates on a simple world model: each move compresses tiles in one direction, and a new tile (90% chance of a 2, 10% chance of a 4) spawns on a random empty cell afterward. A key mechanic that trips up beginners is that merging happens in a single pass per move, meaning a newly formed tile cannot merge again in the same swipe — so a row like [2, 2, 4, 4] becomes [4, 8], not [16]. Understanding this reducer-style merge logic, originally visible in Gabriele Cirulli's public source code, helps players anticipate board outcomes and avoid common mistakes like chasing impossible triple merges.