DiffSense — Claude Code MCP server: what it does, how to install
Audits pull request diffs for regression risks without scanning entire repositories. It provides a read-only MCP interface backed by a semantic rule engine.
claude mcp add diffsense -- uvx diffsenseWhat DiffSense does
DiffSense exposes tools such as audit_diff and explain_rule to coding assistants through a read-only MCP server. Instead of running linter checks across the entire codebase, it focuses strictly on modified lines. Output arrives as structured JSON or SARIF 2.1.0, flagging risks with an explicit review_level.
The engine automatically drops the severity of noisy rules to limit false alarms. It will never block your CI pipeline on its own. Merging decisions stay in human hands or downstream automation. Running this server locally or inside an agent environment expects uv available in your path.
What it helps with
- audit pull request diffs for regression risks
- export code change risk reports in SARIF 2.1.0
- inspect rule evaluations with
explain_rule - evaluate patch safety without full repository scans
Example prompts for the agent
- Run a DiffSense audit on the current git diff and summarize the review level.
- Explain the triggered DiffSense rule for this patch.
- Check uncommitted changes with DiffSense for potential regressions.
How to install DiffSense
Platform CLI
claude mcp add diffsense -- uvx diffsenseuvx runs the command named after the package; if the README names another one, use uvx --from diffsense <command>
Platform CLI
codex mcp add diffsense -- uvx diffsenseuvx runs the command named after the package; if the README names another one, use uvx --from diffsense <command>
Config file
{
"mcpServers": {
"diffsense": {
"command": "uvx",
"args": [
"diffsense"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from diffsense <command>
Config file
{
"servers": {
"diffsense": {
"type": "stdio",
"command": "uvx",
"args": [
"diffsense"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from diffsense <command>
Platform CLI
gemini mcp add diffsense uvx diffsenseuvx runs the command named after the package; if the README names another one, use uvx --from diffsense <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about DiffSense
How to install DiffSense in Claude Code?
Run claude mcp add diffsense -- uvx diffsense in your terminal.
What does DiffSense do?
It evaluates git diffs for regression hazards without spending time on style rules or scanning untouched files.
Does DiffSense block CI pipelines automatically?
No, it only assigns a review_level with suggested actions. Blocking a pull request requires explicit downstream CI steps or manual approval.