mergesafe-mcp
OfficialAllows the agent to read MergeSafe review comments on GitHub pull requests and post replies or reproduction results to the corresponding GitHub comment threads as the authenticated user.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mergesafe-mcp Fix MergeSafe's blocking findings on PR 42 in acme/widgets."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mergesafe-mcp
MergeSafe's findings for your own coding agent (Claude Code, Cursor, or anything else that speaks MCP over stdio). Your agent reads what MergeSafe found on a pull request, fixes it on your machine, replies on the thread, and asks for a new review.
Tool | What it does |
| The latest review's findings, each with a self-contained |
| Asks MergeSafe to review the PR's current head |
| Replies on a finding's thread, as you |
| Posts the result of reproducing a finding (the command, its exit code, the last lines of output) on its thread, as you |
Install
uvx mergesafe-mcp # run without installing
uv tool install mergesafe-mcp # or install itFrom source: uv tool install git+https://github.com/mergesafe-ai/mergesafe-mcp
Related MCP server: PR Review MCP Server
Configure
Variable | |
| An organization API key from the MergeSafe app ( |
| Optional. Defaults to |
| Optional. Defaults to |
Claude Code
claude mcp add mergesafe --env MERGESAFE_API_KEY=ms_live_... -- mergesafe-mcpCursor (~/.cursor/mcp.json or .cursor/mcp.json)
{
"mcpServers": {
"mergesafe": {
"command": "mergesafe-mcp",
"env": { "MERGESAFE_API_KEY": "ms_live_..." }
}
}
}Then ask your agent: "Fix MergeSafe's blocking findings on PR 42 in acme/widgets."
What leaves your machine
To MergeSafe: your API key, the repo name and the PR number. MergeSafe's API returns the review's index (severity, title, file, line) and no code.
To GitHub: your own token, to read comments you can already see on github.com and to post your replies.
Your agent writes the fixes locally, with your tokens. MergeSafe never generates or applies a patch.
Available Tools
4 toolsget_findingsA
List MergeSafe's findings on the latest review of a pull request. repo is "owner/name". Each finding has severity (P0 most severe .. P3), title, problem, file, line, status, blocking, comment_id, comment_url, agent_prompt (a self-contained instruction for fixing it, read from the inline comment on GitHub) and comment_status: ok; no_comment (the finding has no inline comment); no_github_token (set GITHUB_TOKEN or run gh auth login, then call again); unavailable (the comment could not be read: open comment_url or the PR on GitHub). Intended loop: for each finding with blocking=true, check the claim against the file as it stands now; if it holds, apply the fix the agent_prompt describes and add a regression test; run the tests; commit and push; then call reply with "Fixed in " (or why it is not a real problem) on its comment_id.
Inputs: repo (required), pr_number (required).
replyA
Reply on one MergeSafe inline comment thread, as you (with your own GitHub token, not MergeSafe's). repo is "owner/name"; comment_id is the finding's comment_id from get_findings. Use it to say "Fixed in " after pushing a fix, or to explain why a finding is not a real problem.
Inputs: body (required), repo (required), pr_number (required), comment_id (required).
report_reproductionA
Report the result of reproducing one MergeSafe finding, as a reply on its thread (with your own GitHub token). repo is "owner/name"; comment_id is the finding's comment_id from get_findings. Pass the exact command you ran, its exit code (non-zero when the defect showed) and the tail of its output; the output is shortened to its last lines; a command over 500 characters is refused rather than shortened. Run it against the code as it stands, before fixing, and report what happened rather than what you expected: the reply records it on the thread as evidence for whoever judges the finding.
Inputs: repo (required), command (required), exit_code (required), pr_number (required), +2 more.
request_reviewA
Ask MergeSafe to review the current head of a pull request. repo is "owner/name" (or the bare name in the key's own organization). tier and addons are optional; leave them out to use the repository's own settings. Returns MergeSafe's answer unchanged. Call it after pushing fixes; a head that was already reviewed is refused, not charged twice.
Inputs: repo (required), pr_number (required), tier, addons.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
get_findings and request_review are clearly distinct (read vs. trigger a review), but report_reproduction and reply both post a reply on a MergeSafe inline comment thread, differing only in payload and intent. The descriptions do explain when to use each, so an agent can pick correctly, but the overlap is real.
Three tools follow a verb_noun pattern (get_findings, request_review, report_reproduction) and one is a bare verb (reply). Mostly consistent with a single minor deviation that is still readable.
Four tools is a tight, well-scoped surface for a review-feedback loop (fetch findings, request review, respond, report reproduction). It is on the lean side but each tool earns its place.
The intended loop of fetch findings, fix, push, reply, and re-request review is fully covered. Minor gaps exist — no tool to resolve/dismiss a thread or inspect the PR diff/files — but agents can work around these via GitHub directly.
Maintenance
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform comprehensive GitHub pull request code reviews, including analysis of code patterns, complexity, and security issues, while managing review comments and ensuring compliance with team coding standards.2MIT
- AlicenseAqualityDmaintenanceEnables management of GitHub pull request review threads through natural language, allowing users to list, reply to, and resolve PR review comments using GitHub's GraphQL API.4MIT
- FlicenseAqualityDmaintenanceEnables LLM clients to list, read, review, and comment on GitHub pull requests, turning an AI assistant into a fully capable code reviewer.61-
- AlicenseNot gradedqualityDmaintenanceEnables interactive GitHub pull-request review from Claude Code, with tools to fetch PRs, inspect files and repo structure, post review comments, and query a RAG index of the codebase.1MIT