# Connect a client

> The exact MCP config for Claude Desktop, Claude Code, Codex and Grok. Every client starts the same command, igpilot-local mcp.

> [!IMPORTANT]
> **Self-installed version only.** This page is about the local companion (`igpilot-local`), which works with a version of IG Pilot you install yourself. The Chrome Web Store version can't talk to the companion and has no **Control from Claude desktop** switch: connect it through the [connector](quickstart.md) at `https://api.igpilot.io/mcp` instead.

Every client runs the same thing: the Node that ran `install`, the companion's `cli.js`, and the argument `mcp`. `npx igpilot-local install` prints both paths for your computer. After a normal npx install they look like this:

| Part | Example | Where it comes from |
| --- | --- | --- |
| Node | `/usr/local/bin/node` | The Node that ran `install` (its full path, so a different Node on your PATH doesn't matter) |
| Companion | `/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js` | Copied there by `install` |
| Argument | `mcp` | Starts the stdio MCP server |

Use the paths `install` printed, not the examples on this page. The server registers itself as `igpilot`.

- [Claude Desktop](#claude-desktop): Add an entry to claude_desktop_config.json.
- [Claude Code](#claude-code): One claude mcp add command.
- [Codex](#codex): A codex mcp add command or a config.toml entry.
- [Grok](#grok): A grok mcp add command or a config.toml entry.

## Claude Desktop

1. Open `~/Library/Application Support/Claude/claude_desktop_config.json`. On other systems, open your `claude_desktop_config.json`.
2. Add the `igpilot` entry that `install` printed. If the file already has `"mcpServers"`, merge it in rather than adding a second one.
3. Quit and reopen Claude Desktop.

```json title="claude_desktop_config.json"
{
  "mcpServers": {
    "igpilot": {
      "command": "/usr/local/bin/node",
      "args": [
        "/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js",
        "mcp"
      ]
    }
  }
}
```

Then ask Claude: "call igpilot status".

## Claude Code

Run the command `install` printed. `--scope user` makes IG Pilot available in every project:

```sh
claude mcp add --scope user igpilot -- "/usr/local/bin/node" "/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js" mcp
```

Without `claude` on your PATH, `install` prints the same command through npx:

```sh
npx @anthropic-ai/claude-code mcp add --scope user igpilot -- "/usr/local/bin/node" "/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js" mcp
```

Check it with `/mcp` inside Claude Code, or ask: "call igpilot status".

To remove it later:

```sh
claude mcp remove --scope user igpilot
```

## Codex

> [!NOTE]
> `install` prints config for Claude Desktop and Claude Code only. Codex starts the same stdio command: take the two paths from the Claude Desktop entry that `install` printed.

Add it from a terminal:

```sh
codex mcp add igpilot -- "/usr/local/bin/node" "/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js" mcp
```

Or add it to `~/.codex/config.toml` yourself:

```toml title="~/.codex/config.toml"
[mcp_servers.igpilot]
command = "/usr/local/bin/node"
args = ["/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js", "mcp"]
```

The Codex app, CLI and IDE extension share that file. Restart Codex, then ask it to call `igpilot` `status`.

Some tools can take about two minutes before they answer (see [long-running tools](tools.md#long-running-tools)). If Codex gives up on them sooner, raise the server's tool timeout in Codex's config.

## Grok

> [!NOTE]
> This is xAI's Grok CLI (`grok`). `install` doesn't print a Grok command either: take the two paths from the Claude Desktop entry that `install` printed.

Add it from a terminal. `grok mcp add` writes to your user config (`~/.grok/config.toml`) by default, so IG Pilot is available in every project:

```sh
grok mcp add igpilot -- "/usr/local/bin/node" "/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js" mcp
```

Or add it to `~/.grok/config.toml` yourself:

```toml title="~/.grok/config.toml"
[mcp_servers.igpilot]
command = "/usr/local/bin/node"
args = ["/Users/you/.igpilot/companion/node_modules/igpilot-local/dist/cli.js", "mcp"]
```

Check it with `grok mcp doctor igpilot`, or `/mcps` inside a Grok session. Then ask Grok to call `igpilot` `status`.

Grok's default tool timeout is long enough for the [long-running tools](tools.md#long-running-tools).

To remove it later:

```sh
grok mcp remove igpilot
```

## After connecting

1. Make sure **Settings → Connections → Control from Claude desktop** is on in IG Pilot (the self-installed version; the Chrome Web Store version doesn't have it).
2. Run `npx igpilot-local doctor`. It should end with `All good.`
3. Ask your client to call `status`. The server's instructions also tell it to call `status` first for context.

## Moving or updating Node

The config points at one Node binary by its full path. If you remove or move that Node (for example after switching versions with a version manager), run `npx igpilot-local install` again and update the config with the new paths. `doctor` reports this as `Launcher node … is gone`.
