pare
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pare compress this pytest log and keep the failure details"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pare — Lean Context & Honesty Harness for Coding Agents
Pare down context noise, code bloat, and dishonest AI tests.
Pure Python 3.10+ standard library · Zero external dependencies · Built-in CLI + stdio MCP server + Agent Skill.
中文文档见 README.zh-CN.md。
Why pare?
Coding agents fail in three predictable ways: they burn context windows reading repetitive logs/JSON/CSV dumps, pass CI by writing dishonest tests (sleep(), retry decorators, except: pass, assert True), and over-engineer simple changes.
pare stitches the sharpest ideas from four lightweight projects trending on GitHub into a single ~1,000-line, zero-dependency micro-tool:
Capability | Subcommand | Upstream Inspiration | What |
Lossless Output Compression |
| Compresses JSON arrays, CSV/TSV tables, and test/server logs by 95%–99% while archiving byte-exact originals by SHA-256 ID for instant slice/regex recall | |
AI Code Honesty Guard |
| AST + structural linter for Python and JS/TS blocking fixed test sleeps, retry flake-masking, silent | |
YAGNI Debt Ledger & Rules |
| Harvests inline | |
Self-Producing MCP Contract |
| Derives JSON Schema tool contracts directly from |
Related MCP server: Compressor Reflex MCP
Quick Start
Requires only Python 3.10+ (uv, pipx, or direct python3 -m pare with zero packages to download):
# Install globally as an isolated CLI tool (or run `python3 -m pare` directly from the repo)
uv tool install .
# 1. Run any noisy test suite or command; errors stay verbatim, noise shrinks, exit code is preserved
pare run -- pytest -v
# 2. Recover exact raw lines or regex hits from any compressed block
pare recall <12-char-id> --lines 1:60
pare recall <12-char-id> --grep "AssertionError"
# 3. Catch dishonest AI test patterns and silent error swallowing
pare check .
# 4. Audit deliberate `shortcut:` trade-offs across git-tracked code
pare debt .
# 5. Bootstrap AGENTS.md, .claude/skills/pare/SKILL.md, and MCP config
pare init .Connect to Claude Code, Antigravity, Codex, or Gemini CLI
Add pare to .mcp.json (or your agent's MCP settings):
{
"mcpServers": {
"pare": {
"command": "python3",
"args": ["-m", "pare", "mcp"]
}
}
}Every MCP tool schema (pare_shrink, pare_recall, pare_check, pare_debt) is generated directly from pare/cli.py's argparse definitions (pare contract), guaranteeing zero drift between CLI flags and MCP tool schemas.
Measured Compression Ratios
Measured locally with pare shrink on representative outputs (100% of raw bytes remain recoverable via pare recall <id>):
Workload | Raw Size |
| Bytes Saved | Preserved Automatically |
JSON API response (250 objects) | 49,642 B | 599 B | 98.8% | Schema fields, numeric |
Training metrics CSV (300 rows) | 6,817 B | 320 B | 95.3% | Column names, numeric column bounds, flagged error rows, head/tail rows |
Test + server log stream (331 lines) | 16,871 B | 249 B | 98.5% | Exact |
Honesty Rules (pare check)
Every violation includes an actionable instead: remediation instruction so coding agents fix the root cause in the same turn:
no-fixed-sleep: Flagstime.sleep(N)/asyncio.sleep(N)/setTimeout(..., N)in test files. Instead: await a readiness signal, event, or fake clock.no-flake-masking: Flags@pytest.mark.flaky,reruns=, non-strictxfail,.retry(N), andjest.retryTimes(N). Instead: fix the underlying race condition.no-hollow-catch: Flags Pythonexcept ...: passand JS/TS emptycatch {}blocks. Instead: catch the specific exception type and handle, log, or re-raise.no-tautology-assert: Flagsassert True,expect(true).toBe(true), andtest_*functions with zero assertions. Instead: assert concrete outputs or expected exceptions.ratchet-stale: Optional.pare.jsonallowlist ({"allow": {"tests/legacy_test.py": {"no-fixed-sleep": 1}}}) suppresses legacy debt and fails as soon as actual violations drop below the allowance so debt only moves downward.
Repository Layout
pare/
├── pare/
│ ├── shrink.py # JSON/CSV/log lossless-recoverable compressor + SHA-256 vault
│ ├── landmines.py # Python AST + JS/TS honesty scanner & downward ratchet
│ ├── debt.py # `shortcut:` debt ledger & AGENTS.md / SKILL.md bootstrapper
│ ├── contract.py # argparse -> JSON Schema SPEC builder & stdio MCP server
│ └── cli.py # Unified CLI entrypoint (`pare`)
├── tests/
│ └── test_pare.py # Hermetic stdlib unittest suite + self-dogfooding check
├── SKILL.md # Cross-agent skill specification
├── CREDITS.md # Upstream attribution & license provenance
└── pyproject.toml # Zero-dependency PEP 621 package metadataCredits & License
MIT License. Built from scratch on the Python standard library, inspired by JuliusBrussee/caveman, interfere-inc/landmines, DietrichGebert/ponytail, and kajisho5/ffmpeg-skill.
Available Tools
4 toolspare_checkB
Scan Python and JS/TS files for AI test landmines and hollow error handling.
Inputs: paths.
pare_debtA
Scan repository for shortcut: markers and return the technical debt ledger.
Inputs: path, marker.
pare_recallB
Recover exact lines or regex matches from a previously shrunk output ID.
Inputs: item_id (required), grep, lines.
pare_shrinkB
Compress verbose command/file output and return a lossless recall ID.
Inputs: file, text, max_lines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
pare_shrink and pare_recall form a clear compress/recover pair with distinct roles. pare_check and pare_debt are both repository/file scanners, but their targets (test landmines/hollow error handling vs `shortcut:` markers) are described clearly enough to avoid misselection, though 'check' alone is a fairly vague name.
All tools share a consistent `pare_` prefix and short, readable suffixes. Minor deviation: shrink/recall/check are verbs while debt is a noun, but the overall pattern holds.
Four tools is well-scoped for a focused output-compression-plus-scan utility. Each tool maps to a distinct capability (compress, recall, two targeted scans) with no filler.
The shrink/recall lifecycle is fully covered for the compression side, and the server covers two scan types. Minor gaps: no way to list or clear previously stored recall IDs, no options on scans (severity/filtering), and no action on findings such as exporting or resolving the debt ledger.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
A hosted MCP suite providing workflow primitives: web search, content fetching, compression, deduplication, cost/budget management, and agent memory pipelines.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Remote MCP utilities for agents: structured data, commerce checks, and x402 paid API discovery.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides reversible context compression for AI agents, reducing token usage while preserving the ability to retrieve original content, and serves as an MCP server for integration with tools like GitHub Copilot and Claude Code.31Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible developer environments to shrink verbose tool outputs—test logs, git diffs, directory listings, and file dumps—before they reach the context window, preserving compiler errors, failure signatures, and decisive anchors. It runs either as direct callable tools or as a transparent proxy wrapping other MCP servers such as filesystem, git, or terminal providers.1MIT
- AlicenseBqualityBmaintenanceEnables AI coding agents and local LLMs to store and recall project memory, compact verbose logs, look up code symbols, create and rewind workspace snapshots, detect risky commands and loops, pack context optimally, and draft tokens through MCP tools.102Apache 2.0
- AlicenseNot gradedqualityCmaintenanceA task-aware transparent proxy that wraps stdio MCP servers (such as git, filesystem, and terminal) and compresses large tool outputs field-by-field using declarative YAML profiles, passing narrow intent queries through untouched. Discarded data is stored in SQLite and can be losslessly retrieved via an injected tool, either in full, by line range, or by grep, while errors are always preserved and failures fall back to the raw result.MIT