Diffgate logo

Diffgate

by srbsa

Reviews changed code over MCP with deterministic security, structural, guideline, and impact-aware findings.

Install Diffgate

Run the project’s own setup commands, in order.

Setup steps from the project

srbsa/diffgate installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    npm install -g diffgate-review
    
  2. 2. Add to Claude Code
    claude mcp add diffgate -- diffgate mcp
    
  3. 3. Start the server
    diffgate mcp                   # start the MCP stdio server
    

Overview

The srbsa/diffgate MCP server gives coding agents a deterministic review loop for generated or changed code. It compares findings with the Git baseline, limits results to changed lines, and can inspect staged or working-tree changes across eight languages. Reach for it when an agent needs structured security and maintainability checks before code is written, committed, or surfaced for review. Optional code-graph and model-assisted features add blast-radius analysis, explanations, and deep review for selected findings.

Use cases

  • Review generated code before writing it to disk
  • Check staged changes before committing
  • Triage high-impact findings with repository context
  • Compare changes with directory-specific coding guidelines
  • Record reviewer feedback for future reviews

Key features

  • Diff-scoped findings across eight languages
  • Deterministic security and structural rules
  • Staged and working-tree review
  • Optional code-graph impact analysis
  • Deep review and concise finding explanations
  • Guideline checks and reviewer feedback storage

Tools7

What Diffgate lets your agent do. Expand a tool for its parameters.

Verified live~1.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

16/17 checks healthy over the last 90d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8/17/2026 via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed7Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Diffgate works

What srbsa/diffgate MCP server does

The srbsa/diffgate MCP server provides an MCP interface to DiffGate's code-review engine. It focuses on changes rather than treating every existing issue in a file as new. The engine checks changed lines for security risks such as SQL injection, SSRF, XXE, permissive CORS, prototype pollution, and hardcoded secrets. It also supports structural checks for reinvented helpers and over-abstraction across eight languages.

Results are tiered so an agent can distinguish changes that can pass, changes that need a look, and higher-impact changes that need verification. Findings can include a verdict describing whether the change should pass, be reviewed, escalated, autofixed, or remain advisory.

How it works

Call diffgate_analyze for one file, including unsaved or generated content through the content parameter. For repository-wide review, diffgate_check_staged examines staged or working-tree changes and returns counts, per-file findings, an overall tier, and a verdict block.

The server compares code with the Git baseline, so unchanged lines are normally outside the review scope. When a code graph is available, public-surface findings can include caller counts, suggested reviewers, and test gaps. That information may adjust a finding's tier based on its likely blast radius.

diffgate_deep_review investigates one high-impact finding with repository tools such as search, file reading, reference lookup, and blame inspection. diffgate_explain provides a shorter explanation using one model call without a tool loop. diffgate_guidelines checks directory-scoped guidance files, including AGENTS.md, CLAUDE.md, and .cursorrules. Host-mode guideline results are advisory self-reviews rather than independent model gates.

Setup and configuration

Install the package globally with npm install -g diffgate-review, then start the MCP server with diffgate mcp. A Claude Code registration uses claude mcp add diffgate -- diffgate mcp; Cursor can register the same command with diffgate and the mcp argument. Claude Desktop can use the published diffgate.mcpb package.

For repository setup, run diffgate init. It detects the language and test command and writes .diffgate.json. The CLI can also scan a demonstration setup with diffgate init --demo.

Tools and capabilities

  • diffgate_capabilities reports active core, code-graph, and LLM layers, available tools, and the autonomy budget.
  • diffgate_feedback stores confirm or dismiss decisions in .diffgate/learnings.json; dismissals suppress matching rule-and-code findings in later reviews.
  • Core checks run without LLM tokens. Model-assisted explanations, deep reviews, and configured guideline reviews use the model path described by their result mode.
  • The same engine is also available through the CLI, editor extensions, pre-commit hooks, and CI, although those surfaces are outside the MCP tool interface.

Limitations and notes

The MCP tools are most useful when a Git baseline or repository context is available. diffgate_analyze can inspect content that has not been written to disk, but repository-wide checks depend on the repository's staged or working-tree state. Code-graph impact fields are conditional on a graph being available.

Guideline results in host mode must not independently block a change because the calling agent performs the evaluation. Deep review is limited to a selected high-impact finding, while explanation is intentionally narrower and does not perform repository tool loops. DiffGate's published benchmark reports zero false blocks on its versioned clean-change corpus; that result is a benchmark claim, not a guarantee for every repository or codebase.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Diffgate

srbsa/diffgate is an MCP server that connects an AI coding agent to a Git repository and DiffGate's deterministic review engine. Its main tools analyze files, check staged or working-tree changes, explain or deeply review findings, inspect repository guidelines, report capabilities, and record feedback.

Install it with `npm install -g diffgate-review`, then register `diffgate mcp` as the MCP command. Claude Code can use `claude mcp add diffgate -- diffgate mcp`; Cursor uses an MCP entry with command `diffgate` and argument `mcp`.

Yes, srbsa/diffgate works with Cursor through its MCP settings. Register `diffgate` as the command and pass `mcp` as its argument. The project also provides a Cursor-compatible editor extension through Open VSX.

Yes, `diffgate_analyze` can review unsaved or generated code when you pass it through the `content` parameter. Repository-wide staged or working-tree checks use `diffgate_check_staged` and depend on the repository's Git state.

No, its core analysis runs without LLM tokens and produces deterministic findings. `diffgate_explain`, `diffgate_deep_review`, and model-mode guideline reviews use model-assisted analysis when those capabilities are configured and available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDiffgate AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/srbsa-diffgate?style=directory)](https://allmcps.com/mcp/srbsa-diffgate)
HTML Embed
<a href="https://allmcps.com/mcp/srbsa-diffgate"><img src="https://allmcps.com/api/badge/srbsa-diffgate?style=directory" alt="Diffgate on AllMCPs" /></a>