Context7
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Description from the maker (original English)
Compress prompts 40-60% using local LLM + embedding validation. Preserves all conditionals.
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"token-compressor": {
"command": "uvx",
"args": [
"token-compressor-mcp"
]
}
}
}Run this in your terminal
claude mcp add token-compressor -- uvx token-compressor-mcpPaste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"token-compressor": {
"command": "uvx",
"args": [
"token-compressor-mcp"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"token-compressor": {
"type": "stdio",
"command": "uvx",
"args": [
"token-compressor-mcp"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026
The registry name was verified with the GitHub account base76-research-lab, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.1.1) reached the registry 8 months ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: Context7, Codebase Memory, Exa
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
mcp-name: io.github.base76-research-lab/token-compressor
Semantic prompt compression for LLM workflows. Reduce token usage by 40–60% without losing meaning.
Built by Base76 Research Lab — research into epistemic AI architecture.
Intent Compiler MVP is now live and uses this project as part of the idea -> spec -> compressed output flow:
token-compressor is a two-stage pipeline that compresses prompts before they reach an LLM:
The result: shorter prompts, lower costs, same intent.
Input prompt (300 tokens)
↓ LLM compresses ↓ Embedding validates (cosine ≥ 0.85?) ↓ Pass → compressed (120 tokens) Fail → original (300 tokens)
Key design principle: conditionality is never sacrificed. If your prompt says "only do X if Y", that constraint survives compression.
ollama pull llama3.2:1b
ollama pull nomic-embed-text
pip install ollama numpy
from compressor import LLMCompressEmbedValidate
pipeline = LLMCompressEmbedValidate() result = pipeline.process("Your prompt text here...")
print(result.output_text) # compressed (or original if validation failed) print(result.report()) # MODE / COVERAGE / TOKENS saved
Result object:
| Field | Description |
|---|---|
output_text | Text to send to your LLM |
mode | compressed / raw_fallback / skipped |
coverage | Cosine similarity (0.0–1.0) |
tokens_in | Estimated input tokens |
tokens_out | Estimated output tokens |
tokens_saved | Difference |
echo "Your long prompt here..." | python3 cli.py
Output: compressed text on stdout, stats on stderr.
Add to your ~/.claude/settings.json under hooks → UserPromptSubmit:
{
"type": "command", "command": "echo \"${CLAUDE_USER_PROMPT:-}\" | python3 /path/to/token-compressor/cli.py > /tmp/compressed_prompt.txt 2>/tmp/compress.log || true" }
This runs on every prompt submission and writes the compressed version to a temp file, which can be injected back into context via a second hook or MCP server.
The MCP server exposes compression as a tool callable from Claude Code and any MCP-compatible client.
Install:
pip install token-compressor-mcp
Tool: compress_prompt
text (string)Claude Code MCP config (~/.claude/settings.json):
{
"mcpServers": { "token-compressor": { "command": "uvx", "args": ["token-compressor-mcp"] } } }
Or from source:
{
"mcpServers": { "token-compressor": { "command": "python3", "args": ["-m", "token_compressor_mcp"], "cwd": "/path/to/token-compressor" } } }
pipeline = LLMCompressEmbedValidate(
threshold=0.85, # cosine similarity floor (lower = more aggressive) min_tokens=80, # skip pipeline below this (not worth compressing) compress_model="llama3.2:1b", embed_model="nomic-embed-text", )
Stage 1 — LLM compression
The compression prompt instructs the model to:
if, only if, unless, when, but only)Stage 2 — Embedding validation
Computes cosine similarity between the original and compressed text using nomic-embed-text. If similarity falls below threshold, the original is returned unchanged. This prevents silent meaning loss.
Tested across Swedish and English prompts, technical and natural language:
| Input | Tokens in | Tokens out | Saved |
|---|---|---|---|
| Research abstract (EN) | 89 | 38 | 57% |
| Session intent (SV) | 32 | 18 | 44% |
| Technical instruction | 47 | 22 | 53% |
| Short command (<80t) | — | — | skipped |
This tool implements the architecture from:
Wikström, B. (2026). *When Alignment Reduces Uncertainty: Epistemic Variance
Collapse and Its Implications for Metacognitive AI.*
Part of the Base76 Research Lab toolchain for epistemic AI infrastructure.
MIT — Base76 Research Lab, Sweden