The Problem: Your Web Fetches Are 99% Noise
When you ask Claude Code to fetch a web page—to read documentation, check an API, or summarize an article—it doesn't get clean text. It gets the full HTML dump: navigation bars, JavaScript bundles, ad scripts, tracking pixels, and footer links. One developer found a single page that was 700,000 tokens. The actual content? Just 2,600 tokens.
That's 99.6% waste. You're paying for Claude to process megabytes of irrelevant markup.
The Solution: An MCP Proxy That Cleans Before Context
The fix is token-enhancer, an open-source Model Context Protocol (MCP) server that acts as a proxy. When Claude Code fetches a URL through it, the server:
- Downloads the page
- Strips all HTML tags, scripts, styles, and non-content elements
- Returns clean, readable text
- Claude Code receives only the meaningful content
This follows Anthropic's push to expand Claude Code's capabilities through MCP servers, like the recent integrations for Terraform and Ansible we covered on March 25th.
Install It in 2 Minutes
# Clone the repository
git clone https://github.com/Boof-Pack/token-enhancer
cd token-enhancer
# Install dependencies (requires Node.js)
npm install
# Configure Claude Code to use it
# Add to your Claude Code config file (~/.config/claude-code/config.json):
{
"mcpServers": {
"token-enhancer": {
"command": "node",
"args": ["/path/to/token-enhancer/src/server.js"],
"env": {}
}
}
}
Restart Claude Code. The agent will now use the cleaner automatically when fetching web content through the MCP protocol.
When This Matters Most
- Research tasks: When Claude needs to read multiple documentation pages
- Competitive analysis: Fetching competitor websites for comparison
- API integration: Reading API documentation from vendor sites
- Content summarization: Any task where Claude needs to understand web content
The savings compound quickly. If your agent fetches 10 pages daily at 100K tokens each (with 90% waste), you're burning 900K tokens daily on HTML junk. That's roughly $9/day with Claude 3.5 Sonnet pricing.
Check Your Own Waste
Run Claude Code with verbose logging to see what's actually hitting context:
claude code --verbose your-task-here
Look for the context window usage reports. If web fetches are consuming disproportionate tokens, you need this MCP server.
gentic.news Analysis
This development highlights a critical, often-overlooked aspect of agentic workflows: context hygiene. While most optimization focuses on prompt engineering, the data entering Claude's context window is equally important. The token-enhancer MCP server represents a growing category of tools that pre-process inputs before they reach the model, aligning with the trend of MCP servers for major IaC tools that became available in late March.
The 700K-to-2.6K token ratio isn't an outlier—it's typical of modern web pages. As Claude Code's usage grows (appearing in 138 articles this week alone), developers are discovering these hidden costs. This follows our March 25th coverage of running Claude Code locally with Ollama, where cost control was a primary motivation.
Looking forward, expect more MCP servers that optimize inputs: image compressors before vision analysis, code minifiers before refactoring, and data sanitizers before analysis. The Model Context Protocol, developed by Anthropic and used by Claude Code in 23 documented integrations, is becoming the pipeline where efficiency battles are won or lost.





