io.github.vineethwilson15/semamerge

السجل الرسمي أدوات المطورين

Detects semantic merge conflicts between Git branches using AST-level analysis

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package semamerge
Claude Code
claude mcp add semamerge -- npx -y semamerge@0.1.2
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "semamerge": {
            "command": "npx",
            "args": [
                "-y",
                "semamerge@0.1.2"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. SemaMerge
  2. What It Detects
  3. Installation
  4. MCP Tools
  5. Configuration
  6. Supported Languages
  7. How It Works
  8. Development
  9. License

SemaMerge

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

Conflict TypeExample
Type signature changeBranch A changes getUser() return type, Branch B calls getUser().address
Removed/renamed exportBranch A removes export function validate(), Branch B adds import { validate }
Parameter changeBranch A adds required param to function, Branch B calls with old signature
Interface/contract breakBranch A adds required field to interface, Branch B implements without it
Enum/constant changeBranch A removes Status.PENDING, Branch B uses Status.PENDING
Import path changeBranch A moves file, Branch B imports from old path

Installation

npx semamerge

Or install globally:

npm install -g semamerge

Or clone and build from source:

git clone https://github.com/vineethwilson15/semamerge.git
cd semamerge
npm install
npm run build

MCP Tools

check_merge_safety

Quick pre-merge check. Returns a risk score (safe/warning/danger).

{
  "repoPath": "/path/to/repo",
  "sourceBranch": "feature-x",
  "targetBranch": "main"
}
analyze_branches

Deep analysis with per-file breakdown of all semantic conflicts.

{
  "repoPath": "/path/to/repo",
  "branchA": "feature-x",
  "branchB": "feature-y",
  "baseBranch": "main"
}
list_semantic_changes

Lists all semantic changes on a branch (functions, exports, types, etc.).

{
  "repoPath": "/path/to/repo",
  "branch": "feature-x",
  "baseBranch": "main"
}
analyze_file_pair

Deep-dive into a specific file's semantic diff between two branches.

{
  "repoPath": "/path/to/repo",
  "filePath": "src/utils.ts",
  "branchA": "feature-x",
  "branchB": "main"
}

Configuration

VS Code (Copilot)

Add to your VS Code settings.json:

{
  "mcp": {
    "servers": {
      "semamerge": {
        "command": "node",
        "args": ["/path/to/semamerge/dist/index.js"]
      }
    }
  }
}
Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "semamerge": {
      "command": "node",
      "args": ["/path/to/semamerge/dist/index.js"]
    }
  }
}

Supported Languages

  • TypeScript / JavaScript (.ts, .tsx, .js, .jsx, .mjs, .cjs)
  • Python support planned

How It Works

  1. Git layer — Reads file content from branches without checkout using git show
  2. AST parsing — Parses source code with tree-sitter (WASM) into syntax trees
  3. Semantic extraction — Walks ASTs to extract function signatures, types, exports, imports, enums
  4. Three-way comparison — Computes semantic diffs from common ancestor to each branch
  5. Conflict detection — Cross-references changes to find incompatibilities

Development

npm run build    # Compile TypeScript
npm run dev      # Watch mode
npm test         # Run tests

License

MIT

الأسئلة الشائعة

ما هو io.github.vineethwilson15/semamerge؟

Detects semantic merge conflicts between Git branches using AST-level analysis

كيف أثبّت io.github.vineethwilson15/semamerge؟

يعمل على جهازك. في Claude Code: claude mcp add semamerge -- npx -y semamerge@0.1.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.vineethwilson15/semamerge إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.vineethwilson15/semamerge مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.vineethwilson15/semamerge؟

ينشره vineethwilson15. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.