
Token Enhancer
Connects to Claude Desktop, Cursor, or any MCP client and exposes three tools: fetch_clean for single URL retrieval, fetch_clean_batch for multiple URLs, and refine_prompt for optional query cleanup. Uses Python libraries to strip HTML cruft before pages hit your context window. The numbers are wild: a 704K token Yahoo Finance page drops to 2.6K tokens. Runs locally with no API keys or models. You'd reach for this when your agent is burning tokens on navigation bars and ad scripts instead of actual content. Works standalone as an HTTP proxy or drops into LangChain as a custom tool. Ships with caching so repeat fetches are instant.
- GitHub stars
- 66
- tools
- 3
- transport
- STDIO
- last updated
- Apr 3, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
fetch_cleanFetches any URL and returns clean text (86 to 99% smaller)
Fetches any URL and returns clean text (86 to 99% smaller)
No parameter schema in public metadata yet.
fetch_clean_batchFetches multiple URLs at once
Fetches multiple URLs at once
No parameter schema in public metadata yet.
refine_promptOptional prompt cleanup, shows both versions so you decide
Optional prompt cleanup, shows both versions so you decide
No parameter schema in public metadata yet.
Sponsors
Readme
Token Enhancer
A local proxy that strips web pages down to clean text before they enter your AI agent's context window.
One fetch of Yahoo Finance: 704,760 tokens → 2,625 tokens. 99.6% reduction.
No API key. No LLM. No GPU. Just Python.
The Problem
AI agents waste most of their token budget loading raw HTML pages into context. A single Yahoo Finance page is 704K tokens of navigation bars, ads, scripts, and junk. Your agent pays for all of it before any reasoning happens.
The Solution
Token Enhancer sits between your agent and the web. It fetches the page, strips the noise, caches the result, and returns only clean data.
| Source | Raw Tokens | After Proxy | Reduction |
|---|---|---|---|
| Yahoo Finance (AAPL) | 704,760 | 2,625 | 99.6% |
| Wikipedia article | 154,440 | 19,479 | 87.4% |
| Hacker News | 8,662 | 859 | 90.1% |
| GitHub repo page | 171,234 | 6,976 | 95.9% |
Install
pip install xelektron-token-enhancer
Details
- Repository
- github.com/xelektron/token-enhancer
- Category
- AI & LLM Tools
- Package
xelektron-token-enhancer- Transport
- STDIO
- Registry
- MCP registry, active