komp
Provides a tool to fetch and compress logs from Kubernetes pods using kubectl logs --timestamps in the current kube context, with optional namespace, container, since, tail, and previous parameters.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
комп (komp)
Website: https://samchinmaya.github.io/komp
Compress DevOps and Kubernetes logs into a short, meaningful summary, so Claude spends a few hundred tokens reading them instead of tens of thousands.
2,001 lines of Go service logs ~76,000 tokens → 12 lines ~340 tokens
1,350 lines of Spring Boot logs ~41,000 tokens → 9 lines ~220 tokens
1,200 lines of Node JSON logs ~60,000 tokens → 10 lines ~300 tokens
700 lines of kubelet logs ~39,000 tokens → 7 lines ~320 tokensInstall
macOS and Linux, one line:
curl -fsSL https://raw.githubusercontent.com/samchinmaya/komp/master/install.sh | shIt downloads the right binary for your machine from the
latest release, checks
its SHA-256 checksum and puts komp in ~/.local/bin.
Windows: download komp-x86_64-pc-windows-msvc.zip from the
latest release and put
komp.exe somewhere on your PATH.
From source (needs Rust):
cargo install --git https://github.com/samchinmaya/kompThen connect it to Claude Code:
claude mcp add --scope user komp -- komp serveCopy some logs and ask Claude "what's wrong in the logs I copied?".
If macOS says the binary "cannot be opened" (only happens when you download the release file with a browser instead of the install script), run
xattr -d com.apple.quarantine ~/.local/bin/komp.
Related MCP server: token-saver-mcp
The idea
Pasting logs into Claude costs the full token price before any tool can help: Claude reads everything you send. So комп never takes logs through the chat. The engineer copies the logs, types "check the logs I copied", and Claude calls комп, which reads the clipboard itself, on the laptop, and hands Claude only the summary.
engineer copies logs (Cmd+C)
│
▼
┌──────────────────┐ JSON-RPC over stdin ┌───────────────────────────┐
│ Claude Code │ ────────────────────▶ │ komp serve │
│ (MCP client) │ ◀──────────────────── │ src/mcp.rs protocol │
└──────────────────┘ stdout │ src/input.rs where logs │
│ come from │
│ src/guard.rs privacy │
│ check │
│ src/compress.rs the │
│ compressor │
└───────────────────────────┘Privacy check
Before anything is returned to Claude, комп checks the text on your machine:
Is it logs? Clipboard text or a file that does not look like logs is refused, and none of it is shared. A copied password, a
.envfile or an SSH key stops here.Remove sensitive values. API keys, tokens, passwords, cookies, private keys, credentials in URLs, emails, card numbers, phone numbers and public IP addresses become markers such as
[redacted:secret]. Private IPs stay, because they are often the clue in an outage.Compress, then check the summary again. The result ends with a line saying what was removed.
This is pattern matching, so it greatly reduces the risk but cannot recognise every secret.
Text pasted straight into the chat does not go through комп. To stop pasted logs when you
press Enter, add komp hook as a Claude Code UserPromptSubmit hook in
~/.claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [
{ "hooks": [{ "type": "command", "command": "komp hook", "timeout": 5 }] }
]
}
}What the output looks like
Input (7 lines):
2026-11-18T10:00:01.123Z INFO [pod/api-7d9f-x2k4] GET /health 200 2ms
2026-11-18T10:00:02.456Z INFO [pod/api-7d9f-x2k4] GET /health 200 1ms
2026-11-18T10:00:03.789Z INFO [pod/api-7d9f-x2k4] GET /health 200 3ms
2026-11-18T10:00:04.012Z ERROR [pod/api-7d9f-x2k4] db connection refused: 10.0.3.17:5432
2026-11-18T10:00:05.334Z ERROR [pod/api-7d9f-x2k4] db connection refused: 10.0.3.17:5432
2026-11-18T10:00:06.901Z WARN [pod/api-7d9f-x2k4] retrying in 4s (attempt 3/5)
2026-11-18T10:00:07.220Z INFO [pod/api-7d9f-x2k4] GET /health 200 2msOutput:
[komp] 7 lines → 3 templates, 3 entries · 2026-11-18 10:00:01–10:00:07 · [pod/api-7d9f-x2k4]
levels: ERROR 2 · WARN 1 · INFO 4
10:00:01–10:00:07 INFO GET /health 200 1–3ms ×4
10:00:04–10:00:05 ERROR db connection refused: 10.0.3.17:5432 ×2
10:00:06 WARN retrying in 4s (attempt 3/5)How the compressor works
src/compress.rs is a pipeline of five steps. It knows nothing about MCP or
the clipboard: text in, text out.
step | what it does | example |
1. parse | split into records: timestamp, level, message, stack-trace lines. Understands plain text, JSON (incl. pino), logfmt, klog, syslog |
|
2. hoist | what every line shares moves into the header once |
|
3. mine | Drain-style template mining in |
|
4. group | tokens that differ inside a template become slots, with count, time range and all slot values |
|
5. render | template and entry counts, one line per group, slot summaries, and a real sample when an important line's values were abbreviated |
|
Ordinary lines use Drain3's default similarity threshold of 0.4. Warnings and errors use 0.7, so different failures that merely start the same way stay separate.
Rules that keep the meaning:
Errors and warnings keep more detail: up to 6 distinct values are listed, and their stack traces are kept.
Order survives: every entry has its first–last time, so you can still see that the errors started at 10:04.
Bursts get their own line: if a value only shows up during one stretch (
status=503only during a database outage), it is split out with its own time range instead of hiding insidestatus={200|503}. Values spread evenly over the log stay merged.Known boilerplate is dropped: Spring Boot's process id and thread name (
1 --- [nio-8080-exec-3]).Exceptions join their error:
ERROR request failedfollowed byjava.lang.NullPointerException: …(or a PythonZeroDivisionError: …) becomes one entry,ERROR request failed → java.lang.NullPointerException: …. Different exceptions stay separate entries.Stack traces print once per group, with runs of framework frames (Spring, Tomcat,
node_modules…) folded into… 12 framework frames.Nothing silently disappears: if there are more than 80 patterns, the rarest low-severity ones are dropped and the output says how many lines were omitted.
Benchmarks
Measured with scripts/benchmark.py and scripts/compare.py on an Apple M5 Mac with 16 GB of
memory while other apps were running. Each time and memory figure is a median. Results will
differ on other machines.
test log | lines | time | peak memory | tokens before → after |
Go | 2,001 | 27 ms | 15.8 MB | ~75,958 → ~344 |
Spring Boot | 1,350 | 20 ms | 15.7 MB | ~41,216 → ~220 |
Node.js | 1,200 | 21 ms | 14.0 MB | ~59,552 → ~295 |
kubelet | 700 | 20 ms | 14.9 MB | ~39,180 → ~318 |
Repeating the Go log to 100,050 lines (14.5 MB) took 632 ms and 131.5 MB of peak memory, 0.80% of system memory.
Across all four logs, against common shell shortcuts:
method | tokens | facts kept |
the whole log | ~215,906 | 14 of 14 |
| ~212,899 | 14 of 14 |
| ~35,083 | 9 of 14 |
| ~17,259 | 10 of 14 |
комп | ~1,177 | 14 of 14 |
Tokens are estimated at about 4 characters each. The facts come from komp's own tests, and komp was built against these logs, so expect smaller gaps on other logs.
Use it
From the terminal:
komp # compress the clipboard
komp app.log # compress a file
kubectl logs api | komp - # compress stdinFor a whole team: commit this as .mcp.json in your repo and everyone who
opens it in Claude Code (with komp installed) gets the tools automatically:
{ "mcpServers": { "komp": { "command": "komp", "args": ["serve"] } } }MCP tools
tool | arguments | reads logs from |
|
| the clipboard |
|
| a file |
|
|
|
Project layout
src/
main.rs the `komp` command: picks an input, prints the summary
lib.rs declares the modules below
compress.rs the compressor (+ unit tests at the bottom)
drain.rs Drain template mining, tokenizing and masks
input.rs clipboard, file, stdin, kubectl
mcp.rs the MCP server: JSON-RPC over stdio (+ protocol tests)
tests/
fixtures/ realistic logs: Go/logfmt, Node/JSON, Java/Spring, kubelet/klog
fixtures.rs checks each is ≥95% smaller and still contains the key facts
brand/ logo, favicons, app icons
web/ the website (Next.js + Tailwind), a Turborepo workspace deployed to GitHub Pages
scripts/ benchmarks, comparison and demo data, plus image generators for the site
.claude/ the maintenance skill for working on this repositoryBrand
The logo is just the name, комп, drawn as plain rounded strokes (no font
needed). The favicon and app icons use its first letter, к.
Colours: ink #0F1419, paper #E8ECF1.
file | use |
| the name, for light / dark backgrounds |
| the name rotated, for narrow spaces |
| the к icon, source for the PNGs |
| browser tab icons |
| phone home screen / PWA |
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">Develop
cargo test # unit tests + fixture tests
cargo build --release # build target/release/komp
cargo install --path . # install your local build as `komp`
npm ci # install the website workspace
npm run dev # run the website through Turborepo
npm run lint # lint the website
npm run build # build the websiteReleases: push a tag like v0.2.0. The Release workflow builds macOS
(Apple Silicon + Intel), Linux (x86_64 + arm64, static musl) and Windows
binaries and attaches them to the GitHub release that install.sh reads.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Give Claude only the Google Drive files you choose. Every action logged.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to delegate coding tasks to local Ollama models, reducing API token usage by up to 98.75% while leveraging local compute resources. Supports code generation, review, refactoring, and file analysis with Claude providing oversight and quality assurance.27AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceAutomatically reduces token usage in Claude Code sessions using algorithmic optimizations like code compression, smart file reading, output summarization, and prompt rewriting, with no extra API calls or cost.62 npm1MIT
- AlicenseNot gradedqualityFmaintenanceEnables LLMs to analyze logs by extracting patterns, redacting secrets, and providing token-efficient summaries from files, Docker containers, or journald.19 PyPI5MIT
- AlicenseAqualityCmaintenanceGives Claude persistent, local context about how you work, your weekly agenda, and shipped work, with automatic work logging and git integration—all stored privately on your machine.12MIT