Skip to main content
The MergeGuide MCP server lets AI coding assistants check changes against your policies as part of their loop — so AI-written code is governed at the moment it’s produced, not just at review time. It is published as the npm package @mergeguide/mcp-server and exposes a mergeguide-mcp command.
Requires Node.js 18 or newer. The MCP server connects an MCP-capable client (such as Claude Code) to your MergeGuide policies.

Run it

The simplest way to run the server is with npx, which fetches and runs the published package without a global install:
npx @mergeguide/mcp-server
If you ran mergeguide init, the MCP server was already installed via npx and registered in your project’s .mcp.json for you. You can skip the manual configuration below.

Configure your client

Add the server to your client’s .mcp.json so it launches automatically. Most MCP clients use this shape:
.mcp.json
{
  "mcpServers": {
    "mergeguide": {
      "type": "stdio",
      "command": "npx",
      "args": ["@mergeguide/mcp-server"]
    }
  }
}
Reload your client; “mergeguide” should appear among its available MCP servers.

Optional environment variables

You can tune the server’s behavior through environment variables in the env block of your .mcp.json entry:
VariableDefaultDescription
MERGEGUIDE_MODElocal-onlyOperating mode: online, offline, or local-only.
MERGEGUIDE_LOG_LEVELinfoLog level: debug, info, warn, or error.
MERGEGUIDE_CACHE_TTL300000Result cache lifetime in milliseconds.
.mcp.json
{
  "mcpServers": {
    "mergeguide": {
      "type": "stdio",
      "command": "npx",
      "args": ["@mergeguide/mcp-server"],
      "env": {
        "MERGEGUIDE_MODE": "online",
        "MERGEGUIDE_LOG_LEVEL": "info"
      }
    }
  }
}

Next steps

Install the CLI

The CLI powers local checks and git hooks.

Enforcement layers

How the MCP server fits with the IDE, hooks, and PR gate.