使用说明
compare-mcp
compare-mcp is a stdio Model Context Protocol server written in Go. It offers a read-only, typed layer over the host diff(1): clients get structured JSON—unified diff text, parsed hunks, directory deltas, and classifications—instead of scraping a shell session. Subprocess invocation uses a fixed argv (no shell), with bounded stdout, per-run timeouts, and optional workspace path containment.
The server targets agents and editors that need dependable compares without passing arbitrary flags or commands through to the host.
Tools
Each link goes to the tools reference (arguments, examples, limits, and error semantics):
- compare_text — Diff two in-memory strings via short-lived private temp files.
- diff_files — Unified diff for two existing regular files.
- diff_directories — Brief directory tree report (
-q/-qrstyle buckets). - summarize_diff — Digest unified text or a directory-brief snapshot without spawning
diffagain.
For when to use which tool and typical workflows, see the user guide. For a stable JSON contract across versions, see the client contract.
Documentation
All setup, usage, design, and policy detail lives under docs/—the root file stays descriptive only.
- Setup & operations — Getting started · Deploying · Troubleshooting
- Usage — User guide · Tools reference · Examples
- Design & security — Architecture · Security model · Security policy
- Community & releases — Contributing · Development · Code of conduct · Changelog · Releases · Releasing
Full index: Documentation hub
License
Apache License 2.0 · Copyright © Ioannis Polyzos
