← Docs

Fix findings from your editor

Last updated .

What is the MergeSafe MCP server?

It connects your own coding agent, such as Claude Code or Cursor, to MergeSafe, so the agent can read a pull request’s findings, fix them in your checkout, reply on each thread and ask for a new review, without leaving your editor.

MCP (Model Context Protocol) is the standard way coding agents use outside tools. The MergeSafe server runs on your machine, next to your agent.

Why use it

Install

You need uv. Run the server on demand with uvx mergesafe-mcp, or install it once:

uv tool install mergesafe-mcp

Get an API key

In the MergeSafe app, open your organization’s API keys and create a key. Only Admins can create keys; a key’s secret is shown once. See API keys and API reviews.

Configure Claude Code

claude mcp add mergesafe --env MERGESAFE_API_KEY=ms_live_... -- uvx mergesafe-mcp

Configure Cursor

Add this to your user-level ~/.cursor/mcp.json, not a project’s .cursor/mcp.json: the file holds your API key, so keep it out of any repository.

{
  "mcpServers": {
    "mergesafe": {
      "command": "uvx",
      "args": ["mergesafe-mcp"],
      "env": { "MERGESAFE_API_KEY": "ms_live_..." }
    }
  }
}

The server reads your GitHub token from gh auth token. If you don’t use the GitHub CLI, export GITHUB_TOKEN in your shell rather than writing it into a config file.

The tools

ToolWhat it does
get_findingsThe latest review’s findings on a pull request, each with its fix prompt.
request_reviewAsks MergeSafe to review the pull request’s current head. It is charged like any other review.
request_review_with_contextAsks for a review and sends relevant test files from your checkout as extra context. Off unless enabled for your organization.
replyReplies on a finding’s thread, as you.
report_reproductionPosts the result of reproducing a finding (the command, its exit code and the last lines of output) on its thread, as you.

The loop

  1. Ask your agent: “Fix MergeSafe’s blocking findings on PR 42 in acme/widgets.”
  2. It gets the findings, fixes each one in your checkout and runs your tests.
  3. You review the change and push it.
  4. It replies on each thread with what it changed, or why a finding is wrong. See Replying to a finding.
  5. It asks for a re-review, and the open findings are checked again on the new commit.

What leaves your machine

Troubleshooting

Related: API keys and API reviews, Security and data retention.

Next: When reviews run →