
Contract Diff Mcp
io.github.mrfentmen由 GitHub 帳號 mrfentmen 發布v1.0.1更新於 Oct 30, 2026
Aggregate local contract snapshot changes without exposing schema contents. Tools include...
概覽
本機 MCP 伺服器,比較兩份 JSON 契約快照並回傳粗略的結構指紋,不會揭露 schema 內容。
- 可以做什麼
- 比較兩份本機 JSON 契約快照,僅使用節點數量、值類型類別與差值
- 提供快照變大、變小或結構改變的粗略訊號
- 結果不含 schema 名稱、路徑、值、描述、範例或檔案路徑
- 適用情境
- 適合在不把 schema 內容交給代理的情況下,快速判斷產生的 API 或 JSON Schema 快照在兩個版本之間是否出現結構性變化。它只是粗略的迴歸訊號,並非相容性驗證工具。
- 執行需求
- 以本機 Node.js 程序執行,從 npm 套件 contract-diff-mcp 安裝(安裝、建置後執行建置產物的進入點)。需要位於 CONTRACT_DIFF_ROOT 環境變數所指定根目錄下的本機 JSON 快照檔案。未宣告帳號、金鑰或網路存取需求。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Contract Diff Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
contract-diff-mcp
Contract Diff compares two local JSON contract snapshots and reports a coarse structural fingerprint. It is useful for quickly answering whether a generated API or schema snapshot became larger, smaller, or structurally different without handing schema contents to an agent. It does not prove endpoint compatibility or identify semantic additions and removals.
Tool
compare_contract_snapshots: compare two local JSON snapshots using node counts, value type categories, and deltas only. The result is a structural signal, not a semantic contract diff.
Safety
- Local paths only, bounded by
CONTRACT_DIFF_ROOTand realpath checks. - Files are capped at two megabytes and traversal is capped.
- Never returns schema names, paths, values, descriptions, examples, versions, file paths, or raw contents.
- This is a coarse regression signal, not a complete OpenAPI or JSON Schema compatibility validator.
Run
來源:README.md,提交 1df8363
工具
0版本歷史
1- v1.0.1最新Sep 22, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。