semamerge
MCP server that detects semantic (non-textual) merge conflicts between Git branches using AST-level analysis. Catches incompatible changes that Git merges cleanly — signature changes, removed exports, parameter changes, interface breaks, and cross-file dependency conflicts.
README
SemaMerge
<!-- mcp-name: io.github.vineethwilson15/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 Type | Example |
|---|---|
| Type signature change | Branch A changes getUser() return type, Branch B calls getUser().address |
| Removed/renamed export | Branch A removes export function validate(), Branch B adds import { validate } |
| Parameter change | Branch A adds required param to function, Branch B calls with old signature |
| Interface/contract break | Branch A adds required field to interface, Branch B implements without it |
| Enum/constant change | Branch A removes Status.PENDING, Branch B uses Status.PENDING |
| Import path change | Branch 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
- 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
npm run build # Compile TypeScript
npm run dev # Watch mode
npm test # Run tests
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.