← Docs

Fix findings from your editor

Last updated .

Paste it into your coding agent and it sets up MergeSafe with you, asking before each change. It holds no key. The same text is at mergesafe.ai/agents/setup.md.

Using Codex? See MergeSafe in Claude Code and Codex.

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 and ask for a new review, without leaving your editor.

MCP (Model Context Protocol) is the standard way coding agents use outside tools. MergeSafe hosts the server at https://mcp.mergesafe.ai: there is nothing to install and no key to copy.

Why use it

Connect Claude Code

claude mcp add --transport http mergesafe https://mcp.mergesafe.ai

Then run /mcp in Claude Code and choose mergesafe. Sign in with GitHub when prompted, and allow the connection.

Connect Cursor or another client

Any client that supports remote MCP servers with OAuth works. In Cursor, add this to ~/.cursor/mcp.json, then sign in with GitHub when prompted:

{
  "mcpServers": {
    "mergesafe": { "url": "https://mcp.mergesafe.ai" }
  }
}

Who can do what

The connection acts as you, in the organizations you belong to in MergeSafe, with your role in each: what you can see and do in the app, your agent can see and do. To disconnect an agent, open your profile in the MergeSafe app and choose Disconnect next to it; it is cut off on its next request.

The tools

ToolWhat it does
get_findingsThe latest review’s findings on a pull request, each with a link to its inline comment.
request_reviewAsks MergeSafe to review the pull request’s current head. It is charged like any other review.
get_settingsReads how your organization’s MergeSafe is set up: each setting’s value, where it comes from, and the values it may take. Read-only.
list_repositoriesLists the repositories MergeSafe reviews, each with its level, and the GitHub link where you add or remove repositories. Read-only.
local_context_statusWhether your organization accepts local context.
request_review_with_contextAsks for a review and sends relevant test files from your checkout as extra context. Off unless enabled for your organization.
start_sessionStarts a review session for local changes, before or without a pull request, with a cost limit you choose. Nothing is posted to GitHub.
review_localSends your local diff and returns its price at each level (Essential, Strong, Ultra). Nothing runs until you accept the price.
confirm_reviewRuns the quoted review at the level you chose. You are charged at most the quoted price, and less if the review does less.
approve_moreRaises the session’s cost limit, only with your approval.
get_session_findingsThe session’s findings and the latest review’s price.
answer_findingAnswers a finding (won’t fix here, or why it is intended). Free. A fix needs no answer: the next review re-checks it.
session_costThe session’s total so far and what is left under its limit.
end_sessionCloses the session and deletes the uploaded code. Findings and charges are kept.

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 asks for a re-review, and the open findings are checked again on the new commit.

What leaves your machine

Advanced: API key, for CI and headless use

Where nobody can sign in in a browser, run the server locally with an organization API key. You need uv, and an Admin creates the key in the app (see API keys and API reviews; its secret is shown once):

claude mcp add mergesafe --env MERGESAFE_API_KEY="$MERGESAFE_API_KEY" -- uvx mergesafe-mcp

Keep the key out of shell history and repositories: set it from your secret store. This local server also offers reply and report_reproduction, which reply on a finding’s thread as you; they read your GitHub token from gh auth token or GITHUB_TOKEN.

Troubleshooting

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

Next: Coding agents →