semamerge
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 |
Removed/renamed export | Branch A removes |
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 |
Import path change | Branch A moves file, Branch B imports from old path |
Related MCP server: SYKE
Installation
npx semamergeOr install globally:
npm install -g semamergeOr clone and build from source:
git clone https://github.com/vineethwilson15/semamerge.git
cd semamerge
npm install
npm run buildMCP 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 showAST 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 testsLicense
MIT
Available Tools
4 toolsanalyze_branchesA
Deep semantic analysis between two branches. Returns a detailed per-file report of all semantic changes and conflicts, including cross-file dependency issues.
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Absolute path to the Git repository | |
| branchA | Yes | First branch to compare | |
| branchB | Yes | Second branch to compare | |
| baseBranch | No | Common base branch (auto-detected if not provided) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description provides some behavioral context (returns detailed report, includes conflicts and cross-file issues), but lacks details on potential side effects, performance, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: one stating purpose and one describing output. No unnecessary words; efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains the return value (per-file report of changes and conflicts). However, it could mention prerequisites like branch existence or edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, and the description does not add new meaning beyond the schema's parameter descriptions. It only reiterates the general purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it performs deep semantic analysis between two branches and returns a per-file report of changes and conflicts, distinguishing it from sibling tools like 'analyze_file_pair' and 'check_merge_safety'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for semantic comparison but does not provide explicit guidance on when to use this tool versus alternatives like 'list_semantic_changes' or 'check_merge_safety'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
analyze_file_pairA
Deep-dive semantic diff of a single file between two branches. Shows exactly what each branch changed and where conflicts arise.
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Absolute path to the Git repository | |
| filePath | Yes | Path to the file within the repository | |
| branchA | Yes | First branch | |
| branchB | Yes | Second branch |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. It discloses the tool 'shows' results, implying a read-only operation, but does not explicitly state it has no side effects or any performance considerations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single sentence that is direct and front-loaded with the purpose. While concise, a second sentence on usage or output could improve completeness without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and 4 parameters, the description explains the tool's purpose and high-level output (changes and conflicts), but lacks details on return format or how results are presented, which is important for a diff tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs a 'deep-dive semantic diff of a single file between two branches' and shows changes and conflicts. This distinguishes it from siblings like analyze_branches which likely covers multiple files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives (e.g., analyze_branches for broader diffs). The context is implied but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_merge_safetyA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Absolute path to the Git repository | |
| sourceBranch | Yes | The branch being merged (source) | |
| targetBranch | Yes | The branch being merged into (target) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must bear the full burden. It discloses the return risk score (safe/warning/danger), but does not mention side effects (e.g., read-only nature) or execution time. Adequate but could add more detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, concise and well-structured. No unnecessary words, and the key information is front-loaded (quick pre-merge safety check).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 required parameters and no output schema, the description provides a clear purpose and return risk score. It lacks details on the exact format of the risk score or any additional output, but is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (all three parameters have descriptions). The description adds that the tool analyzes branches for semantic conflicts, but this is implied by the overall purpose and does not significantly enhance parameter understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: a quick pre-merge safety check analyzing two branches for semantic conflicts. It specifies what it catches (signature changes, etc.) and distinguishes it from sibling tools like analyze_branches and list_semantic_changes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use before merging by stating 'Quick pre-merge safety check'. It mentions conflicts Git would miss, but does not explicitly state when not to use it or compare with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_semantic_changesA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Absolute path to the Git repository | |
| branch | Yes | Branch to analyze | |
| baseBranch | No | Base branch to compare against (defaults to merge-base with HEAD) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must carry the burden. It states 'Lists all semantic changes' suggesting read-only behavior, but lacks details on return structure, pagination, side effects, or error conditions. Incomplete for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with action and examples. No wasted words, efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and no annotations, the description explains purpose and examples but lacks details on return format, error handling, or performance. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (3 parameters all described). The description adds little beyond the schema: it mentions 'relative to a base' which aligns with baseBranch, but no deeper semantics. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool lists semantic changes on a branch relative to a base, with specific examples like function additions/removals, export changes, type changes. Distinguishes itself from sibling tools (analyze_branches, analyze_file_pair, check_merge_safety) which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Useful for understanding what semantically changed,' implying when to use it, but no explicit guidance on alternatives or when not to use it. No exclusions or comparisons with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.1- First observed
analyze_branches - First observed
analyze_file_pair - First observed
check_merge_safety - First observed
list_semantic_changes
TDQS
Each tool targets a distinct aspect of semantic merge analysis: branch-wide comparison, single-file deep dive, quick safety check, and listing changes. No overlap in purpose.
All tool names follow a consistent verb_noun pattern in snake_case (analyze_branches, analyze_file_pair, check_merge_safety, list_semantic_changes), making them predictable.
With 4 tools, the server is well-scoped for its purpose. Each tool covers a core operation needed for semantic merge analysis without redundancy or bloat.
The set covers key operations: overview, file-level diff, safety check, and change listing. Missing a tool for cross-branch summary comparison, but the domain is analysis, not execution, so minor gap.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Monitor MCP servers, API contracts and AI outputs for schema drift. Alerts on breaking changes.
MCP server for static security analysis of Android source code
Related MCP Servers
- FlicenseCqualityDmaintenanceMCP server providing Git-related functionalities, primarily a tool to generate diffs for Git merge commits against their first parent.4-
- AlicenseNot gradedqualityFmaintenanceAI code impact analysis MCP server that monitors file changes, maps dependency graphs, detects cascading breakage, and gates builds before damage spreads.1372Elastic 2.0
- AlicenseNot gradedqualityAmaintenancean MCP server that auto-resolves Git merge conflicts so agents only touch the complex hunks — deterministic pattern engine with confidence scores and a full decision trace, plus merge/rebase preview and hunk-level resolution tools167MIT
- AlicenseNot gradedqualityBmaintenanceMulti-language code intelligence MCP server providing structured code analysis including symbol search, references, hierarchies, and change impact. Supports 25 languages with persistent indexing and LSP integration.71MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vineethwilson15/semamerge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server