# DiffSense [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/GoldenSupremeSaltedFish/DiffSense  
**GitHub Stars:** 30  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/diffsense

## Description
MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "diffsense": {
    "command": "npx",
    "args": ["-y","diffsense"]
  }
}
```

## Documentation

## What DiffSense MCP server does

DiffSense MCP server evaluates changed content in merge-request and pull-request diffs for possible regression risk. Its scope is deliberately narrower than a repository-wide analyzer: it does not perform full codebase scans or general style checks. Results include a `review_level` and recommended actions, giving downstream agents or CI processes a structured basis for deciding whether a change needs attention.

The server is read-only. It analyzes input and reports findings without modifying source files, pull requests, or CI status. The project also provides JSON and SARIF 2.1.0 contracts, so the same audit information can be consumed by automation outside an MCP client.

## How it works

The audit combines semantic diff processing with a rule engine. It examines changed content, applies the available risk rules, and returns machine-readable results. Rules considered lower quality are automatically downgraded, which is reflected in the resulting assessment. Blocking a pipeline is not an automatic behavior; a human or downstream process must interpret the result and take that action.

DiffSense MCP server exposes four operations: `audit_diff` analyzes a supplied diff, `audit_replay` evaluates a replay file, `list_rules` returns the available rules, and `explain_rule` provides information about a selected rule. These operations support agent workflows that need either an audit result or context about how the rule engine works.

## Setup and configuration

Install the MCP extra from the Python package and start the server with:

```bash
pip install "diffsense[mcp]"
diffsense-mcp
```

For local auditing without an agent, the project documents editable installation or installation directly from the Git repository, followed by `diffsense replay <path-to-diff>`. A repository can optionally include `.diffsense.yaml` with the recommended configuration. The supplied material does not identify any environment variables required to start the MCP server.

The repository also documents GitHub Actions and GitLab CI usage. GitHub Actions can use the default `GITHUB_TOKEN`; GitLab CI requires a masked `DIFFSENSE_TOKEN` variable containing a personal access token with `api` permissions. Those settings apply to the CI integrations, not necessarily to a standalone MCP process.

## Tools and capabilities

- Audit a diff with `audit_diff`.
- Replay a saved diff with `audit_replay`.
- Enumerate available rules with `list_rules`.
- Inspect a rule with `explain_rule`.
- Produce versioned JSON results using a `schema_version` field.
- Produce SARIF 2.1.0 output for compatible analysis workflows.
- Return review levels and recommended actions for changed content.

## Limitations and notes

DiffSense MCP server is intended for change-risk gating at the PR stage, not comprehensive static analysis. It does not scan the entire codebase, replace style checks, or automatically alter CI decisions. The project describes the MCP interface as read-only, so consumers should treat its output as an assessment for an agent, reviewer, or downstream gate rather than as a mutation API.

A VS Code extension is maintained separately in the repository and is also distributed through the VS Code Marketplace or project releases. The provided documentation does not establish support for particular third-party MCP client applications beyond the documented command-line server entry point.

_Full upstream README: https://allmcps.com/mcp/diffsense/readme_

