ctxprune

● Active

io.github.riceharvest/ctxprune

Read big logs, JSON dumps and test output compacted: lossless, or token-pruned keeping IDs.

Connect this server

One click to install, or copy the config below. Suits: Claude Desktop · Cursor.

Add to Cursor Add to VS CodeClaude Desktop / Claude Code: paste the config below.

Or add it manually — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "ctxprune": {
      "command": "uvx",
      "args": [
        "ctxprune",
        "mcp"
      ]
    }
  }
}
One line, from the terminal
Claude Code
claude mcp add ctxprune -- uvx ctxprune mcp
OpenAI Codex CLI
codex mcp add ctxprune -- uvx ctxprune mcp
VS Code
code --add-mcp '{"name":"ctxprune","type":"stdio","command":"uvx","args":["ctxprune","mcp"]}'

Syntax from each client's docs (Claude Code: claude mcp add; Codex: codex mcp add; VS Code: code --add-mcp). Placeholders in angle brackets are values you fill in.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Cloud & DevOps
Version
0.3.2
Registry
active
Published
11/18/2026

On GitHub

read Nov 18, 2026
Stars
0
Forks
0
Last push
Nov 18, 2026
License
0BSD

Pythonai-agentsclaude-codecodexcoding-agentscontext-compressionlangchainllamaindexllmllmlinguamcponnxprompt-compressionragtoken-classification

From the README

ctxprune Shrink what your LLM reads, locally. ctxprune has two parts: Both run on your machine with no API key, and nothing leaves it. What it's good for • MCP-heavy agents (Linear, Notion, GitHub, databases, Playwright): JSON record lists become rows and Playwright snapshots lose their YAML noise. This is where the agent hooks save the most: 8.7% of tool-output tokens on an MCP-heavy mix, 12.0% on Claude Opus. • Claude Code on Windows: PowerShell output loses its colour codes, saving 4.1% of tool-output tokens (6.5% on Opus) in real sessions. • Long Claude Opus sessions: cross-turn dedup turns a repeat of an output that is still in context into a reference. Opus reads those references as well as the originals (−0.2 points [−1.8, +1.3]). Open models don't, so dedup is on for Opus only. • Agents that must not lose a detail: unlike lossy compactors, the safe preset never drops content, leaves file views and code the agent may edit alone, and caused no re-fetches in next-action replay. • RAG and prompt pipelines: CtxpruneDocumentCompressor (LangChain) and CtxpruneNodePostprocessor (LlamaIndex) cut retrieved documents to a set share of tokens and keep IDs, paths and numbers unsplit. • Logs and CI output before you paste them into a chat: some_command | ctxprune --keep 0.33 --protect. Not for: shrinking source files you'll edit (left alone by design), or coding sessions that are mostly file reads…

Read the full README on GitHub →

Alternatives to ctxprune

Best Cloud & DevOps servers →

The most-starred Cloud & DevOps servers in the index, with their live-check result.

ServerStarsLast pushLive check
Netdata81,426Nov 2026Needs sign-in
kubeshark MCP12,146Nov 2026Local / not checked
OneUptime7,820Nov 2026Working
cloudflare.mcp MCP4,473Oct 2026Working
Radar Kubernetes MCP Server4,129Nov 2026Local / not checked

ctxprune: questions people ask

Is ctxprune a remote or a local MCP server?
According to its entry in the official MCP registry, ctxprune ships as a local package (PyPI) that your client starts on your machine.
Is ctxprune still maintained?
Active: the repository's last commit today. Last push Nov 18, 2026, 0 GitHub stars, 0BSD licence. Read from GitHub on Nov 18, 2026.
How do I add ctxprune to Claude, Cursor or VS Code?
Copy the config in "Connect this server" into your client's MCP config file (claude_desktop_config.json, ~/.cursor/mcp.json or .vscode/mcp.json), or use the one-click Add to Cursor / Add to VS Code buttons and the one-line commands for Claude Code and Codex; then restart the client.
Browse all Cloud & DevOps →

Add the badge to your site

Show visitors that ctxprune is listed here — it’s also the link we check for a free listing.

ctxprune — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-riceharvest-ctxprune?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="ctxprune — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![ctxprune — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-riceharvest-ctxprune?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.