
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 分
请在仓库或注册中心条目中声明许可证。