mcp-server

headroom – Slash token usage up to 95% for LLM pipelines

Cut token costs dramatically while keeping answer quality. Ideal for founders building AI agents, RAG systems, or any LLM‑driven app. 74k+ GitHub stars.

From the repo · “Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.”

77,533 stars+2,113★ this week6,019 forksPythonGuide quality 9/10 · reviewed Sep 29Install verified Oct 19Updated 10/22/2026100% free · open source
What it does

Headroom reduces the number of tokens required to get the same answers from a large language model by compressing tool outputs, logs, files, and RAG chunks

When to use it
  • •When you need to minimize token usage for cost savings or optimization
  • •When your LLM workflows involve large amounts of data or logs
  • •When you want to improve the efficiency of your language model-powered applications
Ready-to-paste prompt
curl -X POST -H 'Content-Type: application/json' -d '["echo", "Hello World"]' http://localhost:8080/compress
Heads up: Make sure to set the `HEADROOM_URL` environment variable to the correct URL of the headroom server, otherwise the compression will not work
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

⚡ Runs out of the box✓ Install verified 10/19/2026

A prompt/skill package — nothing to install beyond adding it to your AI tool.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/headroomlabs-ai-headroom && curl -fsSL https://workflowstacks.com/api/skills/headroomlabs-ai-headroom/claude-skill -o ~/.claude/skills/headroomlabs-ai-headroom/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How headroom – Slash token usage up to 95% for LLM pipelines works
Codeflow
Free to inspect

Headroom – Slash token usage up to 95% for LLM pipelines is a very large Python project (~274k lines across 850 code files, plus 912 test files). You install it into your AI tool with one command; there is nothing to run yourself. Last commit this month, Apache-2.0 license, has a test suite.

Size
Very large codebase
~274k lines · 850 code files · days to read — use, don't read
Setup
Install as a skill / plugin
Add it to Claude Code (or your AI tool) with one command. Nothing to run yourself.
Runs on
Inside your AI tool
Helper scripts use Python · Rust · Docker · needs API keys
Python 80%Rust 14%JavaScript 2%TypeScript 2%HTML 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    headroom/cli.py
    Where the program starts running
  3. 3
    .env.example
    The API keys and settings you must provide
  4. 4
    headroom/__init__.py
    Inside headroom/ — the main logic begins here
  5. 5
    examples/07-context-compression.ipynb
    A worked example — copy this to get going
What's in each folder
headroom/Core code — the actual logic534 files
plugins/Sub-packages / plugins57 files
docs/Documentation93 files
wiki/Documentation42 files
examples/Examples you can copy26 files
crates/Folder210 files
sdk/SDKs / client libraries60 files
scripts/Helper scripts37 files
READMEHas testsDocumentedCI checksDocker readyExamples includedApache-2.0 licenseUpdated this month
Quick Actions
Details
Creator
headroomlabs-ai
Language
Python
Category
mcp-server
Published
1/7/2026

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/headroomlabs-ai-headroom.svg)](https://workflowstacks.com/skills/headroomlabs-ai-headroom?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.

Do this with a working workflow

Pages we wrote and tested that put a skill like this to work — importable n8n templates, outcome guides and Claude Desktop configs.