# How to Configure Platform-Specific MCP Installations for code-review-graph

> Easily configure platform-specific MCP installations for code-review-graph using the install command with the --platform flag for Cursor or Claude Code.

- Repository: [Tirth Kanani/code-review-graph](https://github.com/tirth8205/code-review-graph)
- Tags: how-to-guide
- Published: 2026-07-29

---

**Use the `code-review-graph install` command with the `--platform` flag to generate Cursor or Claude Code-specific MCP configuration files automatically.**

The `code-review-graph` CLI provides a dedicated installation workflow that detects your development environment and writes the correct Model Context Protocol (MCP) settings for each supported AI coding tool. When you need to configure only one platform—such as Cursor or Claude Code—you can target that specific editor without affecting other tools.

## Using the Install Command with Platform Flags

The `install` subcommand accepts a `--platform` argument that restricts configuration generation to a single target. This prevents unnecessary file creation and ensures paths are optimized for the specific tool chain.

Run one of the following commands from your project root:

```bash

# Configure only Cursor

code-review-graph install --platform cursor

# Configure only Claude Code

code-review-graph install --platform claude-code

```

The command probes for the presence of the target tool by checking for standard configuration directories (`~/.cursor` or `~/.claude`) before writing files. If the platform is detected, the tool generates the appropriate JSON descriptors in your project tree according to the implementation in `code_review_graph/skills.py::install_platform_configs` (lines 505-550).

## Generated Configuration Files

Each platform receives a tailored set of configuration files that tell the AI client how to launch and communicate with the `code-review-graph` MCP server.

### Cursor MCP Configuration

For Cursor, the installer creates a single file at **[`.cursor/mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.cursor/mcp.json)**. This JSON object contains the launch descriptor that Cursor uses to start the MCP server in stdio mode:

- **`cmd`**: The executable command (`code-review-graph`)
- **`args`**: The arguments array (`["serve"]`)
- **`cwd`**: The working directory pointing to your repository root

You can inspect the generated configuration immediately after installation:

```bash
cat .cursor/mcp.json

```

Expected structure:

```json
{
  "cmd": "code-review-graph",
  "args": ["serve"],
  "cwd": "/path/to/your/project"
}

```

### Claude Code MCP Configuration

Claude Code requires two linked configuration files:

1. **[`.mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.mcp.json)** (project root): A JSON-C file containing the project-scoped MCP settings, including `repo_root`, transport type, and server port. This file is shared across all platforms.
2. **[`.claude/settings.json`](https://github.com/tirth8205/code-review-graph/blob/main/.claude/settings.json)**: A platform-specific settings file that points the Claude Code client to the [`.mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.mcp.json) configuration.

The dual-file structure allows Claude Code to resolve server paths while maintaining a central configuration that other editors can reuse.

## Verification and Troubleshooting

After running the install command, confirm that the MCP server is correctly wired to your AI tool.

### Verifying Cursor Integration

Cursor exposes MCP status through its command palette or CLI. Run the following to confirm the server is active:

```bash
cursor mcp status

```

You should see the `code-review-graph` server listed with a "connected" status and the correct repository path.

### Verifying Claude Code Integration

Inside the Claude Code console, invoke the MCP diagnostic:

```

/mcp

```

This displays active MCP servers. Follow with `/mcp help` to list the available tools provided by `code-review-graph`, such as graph querying and review history retrieval.

### Handling Path Changes and Windows Compatibility

If you relocate your repository or switch Python interpreters, you must **re-run the install command** to refresh the hard-coded paths inside [`.claude/settings.json`](https://github.com/tirth8205/code-review-graph/blob/main/.claude/settings.json). The tool does not dynamically resolve symbolic links or environment variables.

On Windows, ensure the generated [`.cursor/mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.cursor/mcp.json) does not use the `cmd /c` wrapper. According to the troubleshooting documentation (lines 68-78 in [`docs/TROUBLESHOOTING.md`](https://github.com/tirth8205/code-review-graph/blob/main/docs/TROUBLESHOOTING.md)), you should specify the direct path to the Python executable or the installed CLI script to avoid shell escaping issues.

## Summary

- **Target specific platforms** using `code-review-graph install --platform <cursor|claude-code>` to avoid generating unused configuration files.
- **Cursor** receives [`.cursor/mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.cursor/mcp.json) with stdio launch parameters.
- **Claude Code** receives [`.claude/settings.json`](https://github.com/tirth8205/code-review-graph/blob/main/.claude/settings.json) referencing the shared [`.mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.mcp.json) project configuration.
- **Re-run installation** after moving the repository or changing interpreters to update absolute paths.
- **Verify integration** using `cursor mcp status` or the `/mcp` command in Claude Code.

## Frequently Asked Questions

### Can I install MCP configurations for both Cursor and Claude Code in the same repository?

Yes. Run the install command twice with different `--platform` flags, or omit the flag entirely to configure all detected platforms simultaneously. The shared [`.mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.mcp.json) ensures settings remain consistent across both tools.

### Why does Claude Code use two configuration files while Cursor uses one?

Claude Code expects a separation between client settings and project-scoped server definitions. The [`.claude/settings.json`](https://github.com/tirth8205/code-review-graph/blob/main/.claude/settings.json) file acts as a pointer to [`.mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.mcp.json), allowing the latter to serve as a common configuration layer that other editors—including future platform support—can consume without modification.

### What happens if I move my project directory after installation?

The generated files contain absolute paths to your repository root and Python interpreter. After moving the project, re-run `code-review-graph install --platform <your-platform>` to regenerate the configuration with updated paths. Failure to do so will result in "server not found" errors when the AI tool attempts to launch the MCP process.

### Does the Windows configuration require special handling?

Yes. On Windows, avoid `cmd /c` wrappers in the [`.cursor/mcp.json`](https://github.com/tirth8205/code-review-graph/blob/main/.cursor/mcp.json) command field. Specify the full path to the `code-review-graph` executable or the Python module directly to ensure proper stdio stream handling between the AI client and the server.