
Semamerge
io.github.vineethwilson15由 GitHub 账号 vineethwilson15 发布v0.1.2更新于 Nov 3, 2026
Detects semantic merge conflicts between Git branches using AST-level analysis
概览
本地 MCP 服务器,通过 AST 级分析检测 Git 分支之间的语义合并冲突,目前支持 TypeScript 和 JavaScript。
- 可以做什么
- 在源分支与目标分支之间做快速合并前安全检查,返回 safe/warning/danger 风险评分
- 以共同祖先为基准深度分析两个分支,并按文件列出所有语义冲突
- 列出某个分支上的语义变更,如函数、导出、类型、导入和枚举
- 查看单个文件在两个分支之间的语义差异
- 识别类型签名、参数、导出、接口、枚举和导入路径等不兼容变更
- 适用场景
- 适用于 TypeScript 或 JavaScript 仓库中审查或合并功能分支时,找出 Git 能干净合并但会破坏调用方、契约或导入的改动。适合合并前检查与分支差异的代码审查。
- 运行要求
- 以本地 stdio 进程运行,通常通过 npx 或全局 npm 安装,因此需要 Node.js 与 npm。每次工具调用需提供本地 Git 仓库路径,且该仓库需对进程可读。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Semamerge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
SemaMerge
[npm version] [License: MIT] [semamerge MCP server]
An MCP (Model Context Protocol) server that detects semantic merge conflicts between Git branches using AST-level analysis.
When two branches change code in ways that Git merges cleanly but are functionally incompatible, SemaMerge catches it before the merge breaks your app.
What It Detects
Installation
Or install globally:
Or clone and build from source:
MCP Tools
check_merge_safety
Quick pre-merge check. Returns a risk score (safe/warning/danger).
analyze_branches
Deep analysis with per-file breakdown of all semantic conflicts.
list_semantic_changes
Lists all semantic changes on a branch (functions, exports, types, etc.).
analyze_file_pair
Deep-dive into a specific file's semantic diff between two branches.
Configuration
VS Code (Copilot)
Add to your VS Code settings.json:
Claude Desktop
Add to claude_desktop_config.json:
Supported Languages
- TypeScript / JavaScript (
.ts,.tsx,.js,.jsx,.mjs,.cjs) - Python support planned
How It Works
- Git layer — Reads file content from branches without checkout using
git show - AST parsing — Parses source code with tree-sitter (WASM) into syntax trees
- Semantic extraction — Walks ASTs to extract function signatures, types, exports, imports, enums
- Three-way comparison — Computes semantic diffs from common ancestor to each branch
- Conflict detection — Cross-references changes to find incompatibilities
Development
License
MIT
来源:README.md,提交 f01682b
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分