New advertisers: 50% off your first month with code FIRSTMONTHSee slots
riceharvest avatar

ctxprune

riceharvest/ctxprune

Lossless and token-pruned compaction for logs, JSON dumps, CSV, and test output, run locally.

tools
2
transport
STDIO
last updated
Nov 21, 2026
View on GitHub

What it does

  • Reads big inputs with read_compact, a lossless pipeline that drops no content from logs, JSON/MCP dumps, CSV, or test output
  • Reads big inputs with read_pruned, a lossy token-pruning mode where protect="auto" keeps IDs, numbers, and paths verbatim
  • Runs locally with no API key or network calls, and the lossless path leaves every value in place
  • Designed for shrinking large tool output or documents before they reach a model's context window

Tools

2 tools

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

read_compactThe lossless `safe` pipeline, for big logs, JSON/MCP dumps, CSV and test output. Nothing is dropped.

The lossless `safe` pipeline, for big logs, JSON/MCP dumps, CSV and test output. Nothing is dropped.

No parameter schema in public metadata yet.

read_prunedToken pruning with the model below (lossy). `protect="auto"` (the 0.4 default; it was `true` in 0.3.2) keeps technical text such as IDs, numbers and paths verbatim and prunes plain prose; `protect=true` keeps every identifier, `protect=false` keeps none.

Token pruning with the model below (lossy). `protect="auto"` (the 0.4 default; it was `true` in 0.3.2) keeps technical text such as IDs, numbers and paths verbatim and prunes plain prose; `protect=true` keeps every identifier, `protect=false` keeps none.

No parameter schema in public metadata yet.

Readme

ctxprune

Shrink what your LLM reads, locally.

real run: one MCP server's 14 tools and 13,123 characters of schema become 3 tools and 569 characters behind ctxprune mcp-gateway

ctxprune mcp-gateway (new in 0.5, opt-in), real run on the official filesystem MCP server: 14 tools / 13,123 characters of schema become 3 tools / 569 characters, and a call through it returns the directory listing. Characters of JSON, one server, not tokens and not a benchmark. The cost: the agent looks a tool up first, one or two extra steps (L4.3).

ctxprune has two parts:


View the full README on GitHub

Details

Repository
github.com/riceharvest/ctxprune
Categories
Memory & Context, AI Agents & LLM Apps
Package
ctxprune
Transport
STDIO
Registry
MCP registry, active

Similar to ctxprune

More Memory & Context