base76-research-lab avatar

Token Compressor

base76-research-lab/token-compressor

Compresses prompts by 40–60% using a local two-stage pipeline: llama3.2:1b rewrites text to semantic minimum, then nomic-embed-text validates via cosine similarity (default 0.85 threshold). If validation fails, original text passes through unchanged. Exposes a single compress_prompt tool that takes text and returns compressed output plus token stats. Requires Ollama running locally with both models pulled. Built for reducing token costs in long or repetitive workflows without sacrificing conditionals or negations. Skips compression automatically below 80 tokens. Works well as a pre-processing layer before expensive API calls or when operating under strict context budgets.

GitHub stars
8
tool
1
transport
STDIO
last updated
Mar 3, 2026

Tools

1 tools

Public tool metadata for what this MCP can expose to an agent.

compress_promptCompresses a prompt, taking text (string) as input and returning compressed text plus a stats footer.

Compresses a prompt, taking text (string) as input and returning compressed text plus a stats footer.

No parameter schema in public metadata yet.

Sponsors

Readme

token-compressor

Reduce LLM prompt tokens by 30–70% while preserving semantic meaning.

mcp-name: io.github.base76-research-lab/token-compressor

Semantic prompt compression for LLM workflows. Reduce token usage by 40–60% without losing meaning.

License: MIT Requires: Ollama MCP Compatible

Built by Base76 Research Lab — research into epistemic AI architecture.


Live demo

Intent Compiler MVP is now live and uses this project as part of the idea -> spec -> compressed output flow:


What it does

token-compressor is a two-stage pipeline that compresses prompts before they reach an LLM:


View the full README on GitHub

Details

Repository
github.com/base76-research-lab/token-compressor
Category
AI & LLM Tools
Package
token-compressor-mcp
Transport
STDIO
Registry
MCP registry, active

More from base76-research-lab

Related AI & LLM Tools MCP servers

View all
1theastraway avatarMINDtheastraway/mind-mcp-serverMIND knowledge-graph memory for agents. 44 tools: CRM, Life, MoneyMIND, Budget, Sheets, Email, Sign.7stars
2marsmanleo avatarMarsNMemarsmanleo/marsnmeAgent-agnostic memory backend that preserves continuity between humans and AI over time.7stars
3sralli avatarAgendumsralli/agendumAI agent memory: task tracking, scoped work packages, decisions, and cross-session continuity6stars
4vornicx avatarMidasvornicx/midasLocal-first, source-traceable agent memory — no LLM at ingest, fully offline6stars
5bahfahh avatarNoteit Mcpbahfahh/noteit-mcpMCP server for AI agent profiles and smart notes. 60+ coding prompt packs with expert personas.5stars
6blackfoil avatarClaude Token Saver Mcpblackfoil/claude-token-saver-mcpMCP server that offloads routine coding tasks to local LLM (Ollama) to save Claude API tokens4stars