git-prism v0.9.0: Give AI Coding Agents Structured Diffs via MCP

✍️ OpenClawRadar📅 Published: June 1, 2026🔗 Source
git-prism v0.9.0: Give AI Coding Agents Structured Diffs via MCP
Ad

git-prism v0.9.0 is an MCP server written in Rust that gives AI coding agents structured JSON instead of raw git diff text. Instead of feeding Claude Code thousands of lines of unified-diff with @@ hunk headers and + / - prefixes, git-prism returns a manifest of files changed, line counts, and specific functions modified or added — along with caller/callee info and a blast-radius rating.

How It Works

Install via Cargo or Homebrew:

cargo install git-prism
# or:
brew tap mikelane/tap && brew install git-prism
claude mcp add git-prism -- git-prism serve

Once installed and your agent restarted, every git diff call returns JSON. A typical PR diff that would cost 5,000–50,000 tokens now fits in a few hundred tokens. The agent gets structured data — function signatures, import changes, generated-file flags — without needing to re-parse text.

Function-level analysis supports 13 languages: Rust, Python, Go, TypeScript, and more.

Ad

v0.9.0: PATH-Level Interception

The big change in v0.9.0: the interception layer now operates at the PATH level. git-prism installs a shim named git ahead of the real git, so every git call the agent makes — including ones nested inside Makefiles, build scripts, or pre-commit hooks — routes through the MCP server. The previous hook mechanism only caught top-level commands.

It also intercepts gh pr diff <number> and returns the same structured manifest. Regular commands like git status or human-driven git usage pass through untouched.

Honest Limitations

Because it's PATH-based, anything that resets PATH (e.g. env -i, a scrubbed container) bypasses the shim. Install is Unix/Darwin-only for now (though the shim runs on Windows, the installer doesn't). And you must restart your agent once after install — Claude Code freezes PATH at agent launch.

Who it's for: anyone using an agent for code review, refactor audits, or "what will this change break" questions on a codebase large enough that raw diffs eat your context window.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also