# Install Nib MCP

**Prerequisites (read first)**

1. A human must install **Nib.app** to `/Applications` before any agent config will work.
2. **Restart your agent** after you add or change MCP configuration.

## Verify

After restart, ask the agent to call `get_state`. A healthy setup returns the active document path, selection, variables, and tree.

## Claude Code (JSON)

```json
{
  "mcpServers": {
    "nib": {
      "command": "/Applications/Nib.app/Contents/MacOS/Nib",
      "args": [
        "/Applications/Nib.app/Contents/Resources/mcp-shim/shim.js",
        "--agent",
        "claudeCodeCLI"
      ],
      "env": { "ELECTRON_RUN_AS_NODE": "1" },
      "type": "stdio"
    }
  }
}
```

## Claude Desktop (JSON)

Same as Claude Code; set `"claudeDesktop"` as the `--agent` arg value.

## Codex (TOML)

```toml
[mcp_servers.nib]
command = "/Applications/Nib.app/Contents/MacOS/Nib"
args = ["/Applications/Nib.app/Contents/Resources/mcp-shim/shim.js", "--agent", "codexCLI"]
startup_timeout_sec = 120
tool_timeout_sec = 300

[mcp_servers.nib.env]
ELECTRON_RUN_AS_NODE = "1"
```

## Easiest path

**Nib → Set up agents…** — pick Claude Code, Codex, or Claude Desktop and click **Apply**. Nib backs up existing configs before merging the `nib` entry.

Full guide: [Agent setup](/docs/agent-setup) · [Tools reference](/docs/tools-reference)
