← Docs

MergeSafe in Claude Code and Codex

Last updated .

What does MergeSafe add to Claude Code and Codex?

MergeSafe is the GitHub gatekeeper for builders and small teams. Before a pull request merges, it reviews the code, checks new dependencies and fails its check while a blocking finding is open. Connect it to Claude Code or Codex, and your agent asks for that review, reads the findings and fixes them in your checkout.

Your agent writes the code. MergeSafe checks it on GitHub, where the merge happens.

Is there a Claude Code review skill or plugin?

You don’t need one. MergeSafe connects as an MCP server, the standard way Claude Code and Codex use outside tools. Add it once, and your agent can call MergeSafe from any repository. The same server works in Cursor and other MCP clients: see Fix findings from your editor.

Rather have your agent set it up? Point it at mergesafe.ai/agents/setup.md: it walks you through setup one step at a time and asks before each change.

Set up in Claude Code

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

Then run /mcp, choose mergesafe and sign in with GitHub.

Set up in Codex

codex mcp add mergesafe --url https://mcp.mergesafe.ai
codex mcp login mergesafe

Sign in with GitHub when the browser opens. Run /mcp in Codex to check that mergesafe is listed.

On CI or a machine where nobody can sign in, use an API key instead: see Fix findings from your editor.

Claude Code review on GitHub: the loop

  1. Push your branch and open a pull request.
  2. Ask your agent: “Ask MergeSafe to review PR 42 in acme/widgets and fix the blocking findings.”
  3. It calls request_review, waits for the review, then reads it with get_findings: each finding has a severity, a file and line, and a link to its comment on GitHub, which holds the full explanation and a prompt for fixing it.
  4. It fixes each P0 and P1 finding in your checkout and runs your tests. You review the change and push it.
  5. It asks for a new review. The pull request is ready when no P0 or P1 finding is open and the mergesafe-review check passes.

Disagree with a finding? Reply on its thread with your reasoning, and it is judged again. See Replying to a finding.

What does it cost?

The MergeSafe MCP server is free and open source (MIT). Each review your agent asks for is charged like any other review, at the repository’s level, from your prepaid balance, and your spending limits still apply. See pricing and How reviews are charged.

Your agent’s own usage is billed by its provider, as usual.

Related: Fix findings from your editor (every tool, what leaves your machine, troubleshooting).

Next: When reviews run →