Cuts AI web-fetching costs up to 99.9% by stripping page junk before it reaches your LLM.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"token-enhancer": {
"env": {
"REQUESTS_CA_BUNDLE": "/etc/ssl/certs/ca-certificates.crt"
},
"args": [
"-m",
"mcp_server"
],
"command": "python3"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A local proxy that strips web pages down to clean text before they enter your AI agent's context window.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'xelektron-token-enhancer' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked xelektron-token-enhancer against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in browser / ai-ml
Persistent memory using a knowledge graph
Multi-engine MCP server, CLI, and local daemon for agent web search and content retrieval — skill-guided workflows, no API keys.
MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
MCP Security Weekly
Get CVE alerts and security updates for io.github.xelektron/token-enhancer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
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.
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% |
pip install xelektron-token-enhancer
git clone https://github.com/xelektron/token-enhancer.git
cd token-enhancer
chmod +x install.sh
./install.sh
source .venv/bin/activate
python3 test_all.py --live
source .venv/bin/activate
python3 proxy.py
Then in another terminal:
curl -s http://localhost:8080/fetch \
-H "content-type: application/json" \
-d '{"url": "https://finance.yahoo.com/quote/AAPL/"}' \
| python3 -m json.tool
This is the plug and play option. Your AI agent discovers the tools automatically and uses them on its own.
pip install xelektron-token-enhancer
Claude Desktop: Add to your config file
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"token-enhancer": {
"command": "python3",
"args": ["-m", "mcp_server"],
"env": {
"REQUESTS_CA_BUNDLE": "/etc/ssl/certs/ca-certificates.crt"
}
}
}
}
On Linux hosts where SSL verification fails, the
envblock above overrides the default CA bundle. Remove it on macOS/Windows.
Cursor: Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"token-enhancer": {
"command": "python3",
"args": ["-m", "mcp_server"]
}
}
}
Once connected, your agent gets three tools:
fetch_clean fetches any URL and returns clean text (86 to 99% smaller)
fetch_clean_batch fetches multiple URLs at once
refine_prompt optional prompt cleanup, shows both versions so you decide
from langchain.tools import tool
import requests
@tool
def fetch_clean(url: str) -> str:
"""Fetch a URL and return clean text with HTML noise removed."""
r = requests.post("http://localhost:8080/fetch", json={"url": url})
return r.json()["content"]
Add fetch_clean to your agent's tool list. Start python3 proxy.py first.
Data Proxy (Layer 2) Fetches any URL, strips HTML/JSON noise, returns clean text. Caches results so repeat fetches are instant. Handles HTML, JSON, and plain text.
Prompt Refiner (Layer 1, opt in) Strips filler words and hedging while protecting tickers, dates, money values, negations, and conversation references. You see both versions and choose.
MCP Server Plug into Claude Desktop, Cursor, OpenClaw, or any MCP client. Agent discovers the tools and uses them automatically.
| Endpoint | Method | Description |
|---|---|---|
/fetch | POST | Fetch URL, strip noise, return clean data |
/fetch/batch | POST | Fetch multiple URLs at once |
/refine | POST | Opt in prompt refinement |
/stats | GET | Session statistics |
python3 test_all.py # Layer 1 only (offline)
pytho
... [View full README on GitHub](https://github.com/xelektron/token-enhancer#readme)