
DiffSense
io.github.GoldenSupremeSaltedFish由 GitHub 帳號 GoldenSupremeSaltedFish 發布v2.3.1更新於 Oct 24, 2026
MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.
概覽
唯讀的 MCP 伺服器,以語意 diff 與規則引擎稽核 MR/PR 變更的迴歸風險,輸出審查等級與規則說明。
- 可以做什麼
- 稽核目前的 diff 或重播已儲存的 diff,取得風險審查等級與建議動作
- 列出內建規則並說明單一規則檢查的內容
- 輸出可重現的機器可讀結果,例如帶版本號的 JSON 契約或 SARIF 2.1.0,供 CI 閘門使用
- 只分析變更內容,不做全庫掃描或程式碼風格檢查
- 適用情境
- 適合讓助理判斷某個合併請求的 diff 是否帶來迴歸風險,或在 PR 階段流程與代理程式管線中需要可重現、唯讀風險訊號時使用。
- 執行需求
- 以本機 stdio 程序執行,從 PyPI 安裝(pip install "diffsense[mcp]")後以 diffsense-mcp 啟動,需要 Python。MCP 伺服器本身未宣告驗證、環境變數或標頭。另外的 GitLab CI 設定使用 DIFFSENSE_TOKEN 變數,GitHub 工作流程則依賴預設的 GITHUB_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 DiffSense,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
DiffSense
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.
[Version] [License] [VSCode] [Marketplace] [DeepWiki] [Agent]
Quick Start
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.
Features
- CI / Local: Performs semantic risk auditing on MR/PR diffs, outputting
review_leveland 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. - Agent / LLM Integration: Deterministic, machine-readable surfaces for agents and CI gates — versioned JSON contract (
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. - VSCode Extension: Maintained in the vscode-extension directory of this repository (dual-artifact layout). Install from the Marketplace or download the VSIX from Releases.
Quick Start (Detailed)
GitHub Actions
Copy the complete YAML from diffsense/docs/quickstart.md (Method 1) to your repository's .github/workflows/diffsense.yml to enable PR auditing.
GitLab CI
- In your project, go to Settings → CI/CD → Variables and add the variable
DIFFSENSE_TOKEN(Personal Access Token withapipermissions; recommended to check Mask variable). - Add the corresponding job to
.gitlab-ci.yml. See the example at diffsense/gitlab-ci-example.yml.
VSCode Extension
Maintained in the vscode-extension directory of this repository. Install from the Marketplace or download the VSIX from Releases.
Project Structure (This Branch)
Development
See diffsense/CONTRIBUTING.md for details.
License & Links
- License: Apache-2.0
- Issues: Report a bug
- Marketplace: DiffSense
English | 中文版(存档)
來源:README.md,提交 81fe7eb
工具
0版本歷史
1- v2.3.1最新Oct 12, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。