Densely MCP server
io.github.alibaizhanov/densely·v0.2.1·8 starsLossless context compression: 2-8x fewer tokens, byte-exact recovery, search inside payloads
8 stars46 downloads/wk
Reviews
Write oneNobody has reviewed Densely yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Densely tools (5)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
compress_fileRead a file and return it compressed 2x-8x as a dense payload plus a short preview. Use INSTEAD of reading large files (logs, JSON, data dumps) you don't need to fully read right now. The payload is unreadable but restores the exact bytes via the expand tool. Do NOT compress files you are actively editing or need to understand — read those normally; compress reference material and bulky data.
compress_textCompress a large piece of text (tool output, log excerpt, document) into a dense payload 2x-8x smaller in tokens. The payload is unreadable but restores the exact bytes via the expand tool.
expandRestore the exact original text from a densely payload (sha256-verified, byte-identical). Pass the payload string itself OR payload_file (path to a .dense file written by compress_file). Pass start_line/end_line (1-based, inclusive) to return only that slice and spend fewer tokens; omit both for the full text.
searchSearch inside a densely payload WITHOUT expanding it into context: decompression happens server-side, only matching lines return. Use this to count/find/filter (errors, ids, keywords) — it costs tokens only for the matches, never for the whole content. Pattern is a Python regex.
statsShow cumulative tokens saved by densely on this machine (from the auto-compression hook ledger).
Public scan report
scanner v0.1.10 · 2026-11-04 · same rubric, same numbers if you re-run it
- Code scan6 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 83 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- mediumeval / new Function used
exec.evaldensely-0.2.1/densely/neural.py: …torch.float32).to(device) model.eval() _state = (tok, model, device) …
How Densely compares
Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 80/100
- higher than 65% of 3,470 Web search servers
- Tools
- 5
- the typical Web search server has 5
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 8
- more than 84% of 1,786 Web search servers
- Downloads a week
- 46
- more than 32% of 827 Web search servers with a package
What its tools let an agent do: 5 read
Install Densely in Claude Code, Cursor or VS Code
claude mcp add densely -- uvx densely
What the publisher says
From the Densely repository's README, as published. We do not edit it. Read it on GitHub
densely
Lossless context compression for LLMs. Pack any text into 2x–8x fewer tokens with guaranteed byte-exact reconstruction — verified by sha256 on every decompress.
MIT, free forever. (A hosted tier is coming for teams — waitlist.)
An o200k token can carry up to ~17.6 bits of information, but typical code occupies tokens at only ~5–6 bits each. densely reclaims the difference:
text -> lzma -> 16-bit chunks -> 65,536 single-token English wordsEach carrier word (" the", " of", …) costs exactly 1 token — the o200k pre-tokenizer never merges across word boundaries — so every token in the payload carries 2 bytes of compressed data (16 of the ~17.6 theoretically available bits, 91% of channel capacity).
Benchmarks
Reproduce with python3 bench.py (fixed seeds, stdlib code sample):
The neural backend (--backend neural, python3 bench.py --neural) drives an integer arithmetic coder with next-token probabilities from Qwen2.5-Coder-0.5B, NNCP-style batched across segments. The 88.3% figure benefits from the model having seen Python's stdlib during training; the 86.3% row is this repo's own sources — code that did not exist before 2026-08-08 — and is the honest number for novel code (~0.56 bit/byte).
Measured on real-world data
Same pipeline pointed at data we didn't curate: this repo's own sources, an installed pip module, a slice of a real macOS /var/log/install.log, a real package-lock.json, and the live npm registry response for express. o200k counted locally with tiktoken; Claude counted via Anthropic's own count_tokens endpoint (Sonnet 5, request overhead calibrated out), using the claude1 alphabet. Every row round-tripped byte-exact.
For comparison, Headroom reports 15–20% savings for coding agents and 60–95% on JSON — achieved by dropping content from context, with originals kept in a local cache with a TTL. densely keeps the full data in the context itself, restorable byte-for-byte with no external storage and no expiry.
Lossless compression below the entropy of the data is mathematically impossible (Shannon; see also Fundamental Limits of Prompt Compression) — within that bound, densely sits near the practical ceiling for a deterministic, CPU-only method.
Usage
pip install "densely[mcp]"
# extras: [neural] for the neural backend (torch + transformers)Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Densely: common questions
- Is Densely MCP server safe?
- Mostly: it is graded B (80/100). Read the Densely safety report
- How do I install Densely?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Densely need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Densely maintained?
- The last commit was 83 days ago (2026-08-13). The latest release is v0.2.1.
- What can I use instead of Densely?
- Servers from other publishers that do the same job: Bitbybit CAD MCP server, Ref Tools MCP server and Crg MCP server.
- How does Densely compare with other Web search MCP servers?
- safety score 80/100 (higher than 65% of 3,470 Web search servers); tools 5 (the typical Web search server has 5); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Densely
Same job from other publishers: the closest match first, then the best rated.
Bitbybit CAD MCPBitbybit 3D parametric CAD API, version-exact, for coding agents: search, describe, examples, guidenot reviewedEstablishedA- Ref ToolsToken-efficient search for coding agents over public and private documentation.not reviewedEstablishedA
- CrgToken-efficient code review knowledge graph: semantic search and call-graph resolution.not reviewedEstablishedB
- AlzaUnofficial MCP server for Alza.cz: catalog search plus token-guarded account and checkout.not reviewedEstablishedB
- Ref ToolsToken efficient search for coding agents over public and private documentation.not reviewedGrowingC