# compare-cli MCP server

> Enables AI agents to perform contract version diffing, redlining, and drift detection using structured document comparison tools.

- Repository: https://github.com/DrBaher/compare-cli
- Page: https://hostedmcp.org/servers/drbaher/compare-cli-mcp
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.1.4

## Install

### Claude Code

```sh
claude mcp add compare-cli-mcp -- npx -y compare-cli-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "compare-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "compare-cli-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "compare-cli-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "compare-cli-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"compare-cli-mcp","type":"stdio","command":"npx","args":["-y","compare-cli-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "compare-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "compare-cli-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add compare-cli-mcp -- npx -y compare-cli-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.compare-cli-mcp]
command = "npx"
args = ["-y", "compare-cli-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user compare-cli-mcp npx -- -y compare-cli-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "compare-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "compare-cli-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `COMPARE_MCP_BASE_DIR` | no | no |  |

## Tools (3)

- `compare_files`
- `compare_with_negotiation`
- `compare_demo`

## FAQ

### Can I restrict the files the agent can access?

Yes, you can use the COMPARE_MCP_BASE_DIR environment variable to set a base directory. Any path provided by the agent that escapes this directory will be rejected.

### Is a substantive difference considered an error?

No, substantive drift is treated as a successful tool call because the agent's request to identify differences was fulfilled.
