Token Enhancer
A local proxy that strips web pages down to clean text before they enter your AI agent's context window. 704K tokens → 2.6K tokens. No LLM required.
What is Token Enhancer?
Token Enhancer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local proxy that strips web pages down to clean text before they enter your ai agent's context window. 704k tokens → 2.6k tokens. no llm required.
A local proxy that strips web pages down to clean text before they enter your AI agent's context window. 704K tokens → 2.6K tokens. No LLM required.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A local proxy that strips web pages down to clean text befor
Use Cases
Maintainer
Works with
Installation
PIP
pip install xelektron-token-enhancerManual Installation
pip install xelektron-token-enhancerConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Token Enhancer
Token Enhancer is a local MCP server and proxy that fetches web pages and strips them down to clean, readable text before they enter an AI agent's context window — reducing a typical page from hundreds of thousands of tokens to just a few thousand. It exposes three tools (fetch_clean, fetch_clean_batch, and refine_prompt) that any MCP-compatible client can call in place of a raw browser fetch. Developers building web-research agents or RAG pipelines use it to dramatically cut API costs and avoid context-length limits without needing an LLM to do the cleaning.
Prerequisites
- Python 3.10 or higher installed
- pip package manager
- An MCP-compatible client such as Claude Desktop or Cursor
- Internet access to fetch URLs at runtime — no API keys required
Install the package
Install Token Enhancer from PyPI. This installs the mcp_server module and the optional standalone proxy.
pip install xelektron-token-enhancerVerify installation
Confirm the module is importable and check which Python binary is being used.
python3 -m mcp_server --helpConfigure Claude Desktop
Add the Token Enhancer MCP server to your Claude Desktop configuration. On macOS/Windows no extra environment variables are needed.
{
"mcpServers": {
"token-enhancer": {
"command": "python3",
"args": ["-m", "mcp_server"]
}
}
}Restart Claude Desktop
Quit and reopen Claude Desktop to load the new server. The fetch_clean, fetch_clean_batch, and refine_prompt tools will appear in the tools panel.
Test the standalone proxy (optional)
You can also run Token Enhancer as a plain HTTP proxy on port 8080 and call it with curl or any HTTP client, independently of Claude Desktop.
python3 proxy.py
# In another terminal:
curl -s http://localhost:8080/fetch \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'Token Enhancer Examples
Client configuration
Claude Desktop configuration for Token Enhancer. Linux users with SSL issues can add the REQUESTS_CA_BUNDLE environment variable.
{
"mcpServers": {
"token-enhancer": {
"command": "python3",
"args": ["-m", "mcp_server"],
"env": {}
}
}
}Prompts to try
Example prompts that use the fetch_clean and fetch_clean_batch tools to retrieve web content with minimal token usage.
- "Fetch https://news.ycombinator.com and summarise the top 5 stories"
- "Clean and read the content at https://docs.python.org/3/library/asyncio.html"
- "Fetch these three URLs and compare their content: [url1, url2, url3]"
- "Use fetch_clean_batch to retrieve the latest posts from https://blog.example.com and https://another-blog.com"
- "Refine and clean the following raw text before I paste it into our analysis"Troubleshooting Token Enhancer
SSL certificate verification errors on Linux
Add REQUESTS_CA_BUNDLE to the env block in your MCP config: set it to '/etc/ssl/certs/ca-certificates.crt' (Debian/Ubuntu) or '/etc/pki/tls/certs/ca-bundle.crt' (RHEL/Fedora).
python3 -m mcp_server fails with ModuleNotFoundError
Ensure you installed into the same Python environment that your MCP client will use. If using a virtualenv, activate it first or provide the full path to the Python binary in the 'command' field.
Fetched content is still very large despite cleaning
Some sites serve heavily JavaScript-rendered pages where the HTML itself is minimal but embeds large inline scripts. Try the refine_prompt tool to do a secondary pass, or use fetch_clean_batch to process only specific subsections of a page.
Frequently Asked Questions about Token Enhancer
What is Token Enhancer?
Token Enhancer is a Model Context Protocol (MCP) server that local proxy that strips web pages down to clean text before they enter your ai agent's context window. 704k tokens → 2.6k tokens. no llm required. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Token Enhancer?
Install via pip with: pip install xelektron-token-enhancer. Then configure your AI client to connect to this MCP server.
Which AI clients work with Token Enhancer?
Token Enhancer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Token Enhancer free to use?
Yes, Token Enhancer is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Token Enhancer Alternatives — Similar Developer Tools Servers
Looking for alternatives to Token Enhancer? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Token Enhancer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Token Enhancer?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.