
mergelock
io.github.sadayamuthuPublished by GitHub account sadayamuthuv0.1.5Updated Oct 24, 2026
Finds merge conflicts git can't see between branches: changed signatures vs new callers.
Overview
A git-native merge gate that reports conflicts git misses, such as changed signatures versus new callers, exposed to an AI agent over MCP.
- What you can do
- Compare two branches before they merge and report semantic conflicts git does not surface
- Detect changed signatures against newly added calls, symbols deleted on one side but still used on the other, and the same function written twice
- Flag ordinary textual conflicts, both branches adding a file at the same path, and edit-versus-delete collisions
- Understand TypeScript, JavaScript (including TSX/JSX) and Python semantically, with textual checks for other languages
- Return findings with severities and exit codes suitable for scripting, hooks and CI
- When to use it
- Useful when an AI coding agent works on branches that will be merged and you want it to catch cross-branch breakage before the merge, for example in a pre-push hook, a CI job, or while reviewing in-flight branches.
- Requirements
- Runs as a local stdio process; the manifest lists an OCI image (ghcr.io/sadayamuthu/mergelock:0.1.5) that must be mounted with the repository, or install via Homebrew, deb/rpm, prebuilt binary, or Go 1.25+ with a C compiler. Needs git 2.38 or newer and a git repository to inspect. No authentication or environment variables are declared.
Installation
In SourceWeft
- Open mergelock in the dashboard and add it to a workspace.
- 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
mergelock
[CI] [Release] [Homebrew] [Docker] [deb/rpm] [MCP Registry] [Glama] [License]
A git-native merge gate. mergelock check compares two branches before
they meet and reports the conflicts git itself won't tell you about: a
function whose signature changed on one branch while the other branch
added calls to the old signature, a symbol deleted on one side but still
used on the other, the same function written twice.
It never touches your working tree. Everything is computed from commits
with git merge-tree and tree-sitter parsers, so it is safe to run in a
pre-push hook, in CI, or from an AI coding agent over MCP.
What it detects
Semantic rules understand TypeScript, JavaScript (incl. TSX/JSX) and Python. Files in other languages still get the textual, add/add and modify/delete checks.
Install
mergelock needs git 2.38 or newer (for git merge-tree --write-tree).
Homebrew (macOS and Linux):
Debian / Ubuntu (.deb, amd64 and arm64; needs a distribution with git
2.38+, such as Debian 12 or Ubuntu 24.04):
Fedora / RHEL (.rpm, x86_64 and aarch64):
Docker (linux/amd64 and linux/arm64; mount the repository at /repo):
GitHub Actions (checks each pull request against its base branch; see In CI):
Prebuilt binary (macOS and Linux, amd64 and arm64): download the archive
for your platform from the
latest release,
then put mergelock on your PATH:
On macOS, a binary from an archive downloaded in a browser is blocked by Gatekeeper because it isn't signed yet (Homebrew installs aren't affected). Clear the quarantine flag once:
With Go (needs Go 1.25 or newer and a C compiler, since cgo is used for
tree-sitter; on macOS install the Xcode command-line tools, on
Debian/Ubuntu build-essential):
Or build from source:
Check it works:
Quick start
Run inside any git repository:
Exit codes make it easy to script:
See USAGE.md for the full command reference, the
.mergelock.yml config, the JSON output schema, CI and git-hook recipes,
and how to connect it to an AI agent over MCP.
To report a missed conflict or add a language, see
CONTRIBUTING.md; for a security problem, see
SECURITY.md.
Development
Rule behaviour is pinned by branch-pair fixtures in testdata/fixtures/*.txtar;
each one is a tiny repo with a base, two branches and the expected findings.
License
Source: README.md at commit c816d3c
Tools
0Version history
3- v0.1.5LatestOct 17, 2026
- v0.1.4Oct 16, 2026
- v0.1.3Oct 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