Repository navigation
v1.0.0 - AST-Driven MCP Context Pruner
ToolPrune v1.0.0: High-Utility, Zero-Bloat MCP Context Pruner & Router
ToolPrune intercepts MCP (Model Context Protocol) JSON-RPC communication over stdio and HTTP/SSE between AI clients (Claude Desktop, Cursor, Zed) and upstream tools. It dynamically compresses and optimizes schemas across 4 pruning tiers, achieving up to 91.4% prompt token reduction while maintaining 100% JSON Schema Draft-07 compliance.
Features
- 4 Pruning Tiers:
Tier 1: Lossless Minification- Strips markdown formatting, extra whitespace, schema titles, and default field noise.Tier 2: Condensation- Truncates verbose prose to concise 1-sentence summaries and removes HTML tags.Tier 3: Parameter Description Pruning- Strips self-evident descriptions from obvious parameters (id,query,url,limit).Tier 4: Catalog Card Mode- Replaces complete schemas with dynamic high-level discovery summaries until tool invocation.
- Transports:
- Full bidirectional stdio proxy with 10MB safe buffering and async stderr draining into ring buffers.
- HTTP/SSE streaming gateway (
GET /sse,POST /messages).
- Orphan Prevention:
- Windows Job Objects (
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE) and POSIX process group supervision.
- Windows Job Objects (
- Multi-Server Aggregation:
- Upstream prefix namespacing and zero-config single-server CLI proxy wrapping.
Verified Multi-Platform Assets
- Windows amd64 (
toolprune-windows-amd64.zip,toolprune-windows-amd64.exe) - Linux amd64 (
toolprune-linux-amd64.tar.gz) - Linux arm64 (
toolprune-linux-arm64.tar.gz) - macOS amd64 (
toolprune-darwin-amd64.tar.gz) - macOS arm64 (
toolprune-darwin-arm64.tar.gz) - SHA-256 Checksums (
checksums.txt)