# Install the companion

> For a version of IG Pilot you install yourself. Install the local companion, turn on Control from Claude desktop and make your first call. About five minutes.

> [!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.

## Before you start

- **Node.js 20 or newer.** Check with `node --version`. The installer stops on older versions.
- **macOS or Linux.** The companion doesn't support Windows.
- **A version of IG Pilot you installed yourself**, open in Chrome and signed in to Instagram. The Chrome Web Store version doesn't work with the companion.
- **An MCP client** on the same computer: Claude Desktop, Claude Code, Codex or Grok.

## 1. Install the companion

```sh
npx igpilot-local install
```

This command:

1. Copies the companion out of the npx cache to `~/.igpilot/companion`, so it keeps working after npx cleans up.
2. Writes a small launcher, `~/.igpilot/bin/igpilot-host`.
3. Registers that launcher with Chrome as the native-messaging host `io.igpilot.bridge`, allowed only for known IG Pilot extension ids.
4. Prints the exact config for Claude Desktop and Claude Code.

It never edits your AI app's settings. You paste the config yourself in step 4.

> [!NOTE]
> **Does `chrome://extensions` show an id the companion doesn't know?** Copy IG Pilot's id (32 letters) from `chrome://extensions` and pass it:
>
> ```sh
> npx igpilot-local install --extension-id <your-extension-id>
> ```
>
> Using Brave, Edge or another Chromium browser? Add `--browser`. See the [CLI reference](cli.md#install) for every option.

## 2. Reload IG Pilot

Open `chrome://extensions` and reload IG Pilot, or restart Chrome. The extension picks up the new host when it starts.

## 3. Turn on Control from Claude desktop

In the IG Pilot side panel, open **Settings → Connections** and turn on **Control from Claude desktop**. The first time, Chrome asks you to allow IG Pilot to talk to the companion: allow it.

The status line under the switch should change to **Connected to the companion app**.

> [!NOTE]
> No such switch? You have the Chrome Web Store version, which doesn't include it. Connect through the [connector](quickstart.md) instead.

## 4. Connect your AI app

Paste the config that `install` printed into your client:

- **Claude Desktop:** add the `igpilot` entry to `claude_desktop_config.json`, then quit and reopen Claude Desktop.
- **Claude Code:** run the printed `claude mcp add --scope user igpilot -- … mcp` command.
- **Codex:** add the same command to `~/.codex/config.toml`.
- **Grok:** run `grok mcp add igpilot -- … mcp` with the same two paths.

[Connect a client](connect.md) has each snippet with an explanation.

## 5. Check the setup

```sh
npx igpilot-local doctor
```

`doctor` checks Node, Chrome's host registration, the launcher, whether the host is running and whether IG Pilot is connected. A healthy setup ends with:

```text
All good.
```

Anything marked `[FAIL]` comes with the fix. The [troubleshooting guide](troubleshooting.md) covers each one.

## 6. Make your first call

Ask your AI app:

```text
Call igpilot status
```

It should report your Instagram account, the Autopilot and anything waiting for review. From here, try "what did IG Pilot do today?" (`get_history`) or "show me the drafts waiting for review" (`get_review_queue`).

## Next steps

- [Tools reference](tools.md): Every tool, its parameters and an example.
- [Safety & limits](safety.md): How drafts, limits and refusals work.
- [Resources](resources.md): The Brain and the CRM as files your AI app can read.
- [Troubleshooting](troubleshooting.md): Fixes for each doctor check and error message.
