xelektron avatar

Token Enhancer

xelektron/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 tools

Public 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.

SourceRaw TokensAfter ProxyReduction
Yahoo Finance (AAPL)704,7602,62599.6%
Wikipedia article154,44019,47987.4%
Hacker News8,66285990.1%
GitHub repo page171,2346,97695.9%

Install

pip install xelektron-token-enhancer

View the full README on GitHub

Details

Repository
github.com/xelektron/token-enhancer
Category
AI & LLM Tools
Package
xelektron-token-enhancer
Transport
STDIO
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1sagemindai avatarThreadline Mcpsagemindai/instarAgent-to-agent messaging relay. Discover agents, send messages, and receive replies. Zero-config.0stars
2dmitriygolub avatarThree.js DevTools MCPdmitriygolub/threejs-devtools-mcpInspect and edit Three.js scenes, materials, shaders, lights in real time from any AI agent64stars
3amanhij avatarZikkaronamanhij/zikkaronBiologically-inspired persistent memory engine for Claude Code MCP agents60stars
4tomohiro-owada avatarDevragtomohiro-owada/devragLightweight local RAG MCP server. 40x token reduction.60stars
5dnotitia avatarAkbdnotitia/akbGit-backed org memory for AI agents — hybrid search, tables, files & a URI graph over MCP.52stars
6mastercard avatarMastercard Developers MCPmastercard/developers-agent-toolkitAccess Mastercard Developers APIs, documentation, and API specifications through MCP.0stars