MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.
DiffSense is a Change Risk Gate for the PR stage: it evaluates whether the current diff introduces regression risks without performing full codebase scans or style checks. Designed for minimal alerts, high precision, low latency, and interpretable results.
| Scenario | Action |
|---|---|
| GitHub Pull Request | Copy the workflow from diffsense/docs/quickstart.md (Method 1) to .github/workflows/diffsense.yml in your target repository. Uses the default GITHUB_TOKEN with no additional configuration required. After committing and creating/updating a PR, the workflow will automatically execute the audit and post results under the PR. |
| Local Audit | Run pip install -e diffsense in the repository root, or pip install "git+https://github.com/GoldenSupremeSaltedFish/DiffSense.git@main#subdirectory=diffsense", then execute diffsense replay <path-to-diff>. |
| Agent / LLM Integration | Install the MCP server with pip install "diffsense[mcp]" and run diffsense-mcp, or consume the JSON contract / SARIF directly. See Agent Integration Guide. |
Complete steps are available at diffsense/docs/quickstart.md.
Optional: Add .diffsense.yaml to your repository root to use the officially recommended configuration, suitable for most teams.
review_level and recommended actions. Analyzes only changed content without slowing down pipelines. Low-quality rules are automatically downgraded. Does not automatically modify CI status; decisions to block are made manually or by downstream processes.schema_version), SARIF 2.1.0 output, and a read-only MCP server (audit_diff / audit_replay / list_rules / explain_rule). See the Agent Integration Guide and CLI Contract.Copy the complete YAML from diffsense/docs/quickstart.md (Method 1) to your repository's .github/workflows/diffsense.yml to enable PR auditing.
DIFFSENSE_TOKEN (Personal Access Token with api permissions; recommended to check Mask variable)..gitlab-ci.yml. See the example at diffsense/gitlab-ci-example.yml.Maintained in the vscode-extension directory of this repository. Install from the Marketplace or download the VSIX from Releases.
DiffSense/
├── diffsense/ # CLI, rule engine, GitHub/GitLab adapters, MCP server; see docs/quickstart.md for quick start
├── vscode-extension/ # VS Code extension (dual-artifact line)
├── AGENTS.md # repository guide for AI coding agents
└── technical_documentation/
git clone https://github.com/GoldenSupremeSaltedFish/DiffSense.git
cd DiffSense/diffsense
pip install -e ".[dev]"
pytest tests/ -v
See diffsense/CONTRIBUTING.md for details.
English | 中文版(存档)
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx diffsenseMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-goldensupremesaltedfish-diffsense": {
"command": "uvx",
"args": [
"diffsense"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencediffsensepypiDiffSense works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.