Semamerge

io.github.vineethwilson15Published by GitHub account vineethwilson15v0.1.2Updated Nov 3, 2026

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

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

Local MCP server that detects semantic merge conflicts between Git branches using AST-level analysis of TypeScript and JavaScript code.

What you can do
  • Run a quick pre-merge safety check between a source and target branch, returning a safe/warning/danger risk score
  • Deep-analyze two branches against a common base with a per-file breakdown of semantic conflicts
  • List the semantic changes on a branch, such as functions, exports, types, imports and enums
  • Inspect the semantic diff of a single file between two branches
  • Detect type signature, parameter, export, interface, enum and import path incompatibilities
When to use it
Useful when reviewing or merging feature branches in a TypeScript or JavaScript repository and you want to catch changes that Git merges cleanly but that break callers, contracts or imports. Best suited to pre-merge checks and code review of branch divergence.
Requirements
Runs as a local stdio process, typically via npx or a global npm install, so Node.js and npm are needed. It operates on a local Git repository path supplied in each tool call, and the repository must be readable by the process. No accounts, API keys or environment variables are declared.
Before you install
Tools take a repository path and branch names and read Git history and file contents from that repository; point it only at repositories you are comfortable exposing to the assistant. It is described as read-only analysis, but confirm before relying on it in automated merge workflows. Only TypeScript and JavaScript are supported; Python is listed as planned.

Installation

In SourceWeft

  1. Open Semamerge in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

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

bash
npx semamerge

Or install globally:

bash
npm install -g semamerge

Or clone and build from source:

bash
git clone https://github.com/vineethwilson15/semamerge.gitcd semamergenpm installnpm run build

MCP Tools

check_merge_safety

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

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

analyze_branches

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

json
{  "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.).

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

analyze_file_pair

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

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

Configuration

VS Code (Copilot)

Add to your VS Code settings.json:

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

Claude Desktop

Add to claude_desktop_config.json:

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

bash
npm run build    # Compile TypeScriptnpm run dev      # Watch modenpm test         # Run tests

License

MIT

Source: README.md at commit f01682b

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts