# semamerge [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/vineethwilson15/semamerge  
**GitHub Stars:** 0  
**npm Downloads (last month):** 204  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/semamerge

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

## Tools
Capabilities this server exposes over MCP:

- **check_merge_safety** — Quick pre-merge safety check. Analyzes two branches for semantic conflicts that Git would miss (signature changes, removed exports, parameter mismatches, etc.). Returns a risk score: safe/warning/danger.
- **analyze_branches** — Deep semantic analysis between two branches. Returns a detailed per-file report of all semantic changes and conflicts, including cross-file dependency issues.
- **list_semantic_changes** — Lists all semantic changes on a branch (function additions/removals, export changes, type changes, etc.) relative to a base. Useful for understanding what semantically changed.
- **analyze_file_pair** — Deep-dive semantic diff of a single file between two branches. Shows exactly what each branch changed and where conflicts arise.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "semamerge": {
    "command": "npx",
    "args": ["-y","semamerge"]
  }
}
```

## Documentation

## What the semamerge MCP server does

The semamerge MCP server analyzes Git branches for semantic incompatibilities that are not necessarily reported as textual merge conflicts. It can identify changes to function signatures, parameters, exports, imports, types, interfaces, enums, constants, and related code contracts. Examples include one branch removing an export while another still imports it, changing a return type used by another branch, or adding a required interface field that another implementation does not provide.

The server works with local repositories supplied through a `repoPath` argument. It supports TypeScript and JavaScript files, including `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, and `.cjs` extensions. Python support is planned but is not described as available.

## How it works

SemaMerge reads file contents directly from Git branches with `git show`, so its analysis does not require checking each branch out. It parses source files with tree-sitter and WASM, then walks the resulting syntax trees to extract semantic information such as functions, signatures, exports, imports, types, and enums.

For branch comparisons, the analysis uses a three-way model: it evaluates changes from a common ancestor to each branch, then cross-references those changes to find incompatible assumptions. This approach is intended to surface cases where textual merging succeeds but the resulting code may contain broken references or contract mismatches.

## Tools and capabilities

The semamerge MCP server exposes four MCP tools:

- `check_merge_safety` performs a quick comparison between a source and target branch and returns a `safe`, `warning`, or `danger` risk result.
- `analyze_branches` performs a deeper comparison of two branches, with a per-file breakdown of semantic conflicts. It accepts two branches and a base branch.
- `list_semantic_changes` lists semantic changes made on one branch relative to a base branch, including changes involving functions, exports, and types.
- `analyze_file_pair` narrows the investigation to one file path across two branches and returns a detailed semantic comparison.

Use the quick check when deciding whether to proceed with a merge. Choose the branch analysis when you need conflict details, and use the file-pair tool when a particular source file needs closer inspection.

## Setup and configuration

You can start the published package with `npx semamerge`, install it globally with `npm install -g semamerge`, or build it from a cloned repository. A source build uses `npm install` followed by `npm run build`; the resulting server entry point is `dist/index.js`.

The documented client configurations launch that file with Node. In VS Code, add an MCP server entry under the `mcp.servers` settings object. In Claude Desktop, add a corresponding entry under `mcpServers`. Both configurations use a `command` of `node` and pass the built file path in `args`.

No environment variables are documented. Each analysis request supplies the repository path and the relevant branch names; file-pair analysis also supplies a file path.

## Limitations and notes

The semamerge MCP server is limited to the language extensions listed in the README. Python analysis is not currently presented as available. Results depend on the Git repository, branch names, base branch where required, and source files being accessible through the supplied local path. The server identifies semantic conflicts through extracted syntax and code relationships; it does not replace tests or a full application-level validation pass.

_Full upstream README: https://allmcps.com/mcp/semamerge/readme_

