# Connect your AI assistant to Niro

Setup is one command, run inside the repo you are working on:

```
npx @niroai/niro@latest start

```

`niro start` signs you in, builds the graph for that folder on your machine, and connects your AI assistants. This page is for the rest: the exact command for each of the 14 supported assistants, so you can connect another one or script it. Each is a `niro mcp install` call that configures one client at a time. Run `niro mcp install` with no flags to pick from a list; "Other" prints a config block to paste into any assistant that is not listed.

## Before you start

Run `niro start` once on this machine. Your assistant then reads the graph through `niro mcp serve`, which answers from the local engine. None of the commands below need an API key.

## All Niro tools are read-only

Every tool Niro exposes over MCP only *reads* your code graph. None can modify your code or anything else. That is why several of the installers below turn on auto-approve for Niro's tools: there is nothing for a read-only tool call to break.

## Claude Code

```
niro mcp install --client claude-code

```

Registers the server (`claude mcp add --scope user`), adds a `PostCompact` + `UserPromptSubmit` hook so Claude stays aware of Niro after context compaction, appends a short reminder to `~/.claude/CLAUDE.md`, and installs the **`niro-skill`** (routes code questions through the graph) and **`niro-local`** skill (drives the CLI from chat) to `~/.claude/skills/`.

Verify: type `/mcp` inside Claude Code. `niro` should be listed as connected.

## Codex

```
niro mcp install --client codex

```

Registers the server in `~/.codex/config.toml`, sets `default_tools_approval_mode = "auto"` (safe, because every niro tool is read-only), appends a reminder to `~/.codex/AGENTS.md`, and installs the shared `niro-skill` + `niro-local` skill to `~/.agents/skills/` (also read by Windsurf).

Verify: `/mcp` inside the Codex TUI.

Note that `AGENTS.md` is read once at the start of a session, so on a long task the reminder to prefer niro's tools carries less weight than it does in Claude Code, where a per-tool-call hook reinforces it. A per-prompt hook for Codex is in progress.

## Cursor

```
niro mcp install --client cursor

```

Writes `~/.cursor/mcp.json`, adds `"niro:*"` to `~/.cursor/permissions.json`'s `mcpAllowlist` (so Agent doesn't ask before every tool call), and writes a project rule to `.cursor/rules/niro.mdc` in the current repo.

Requires Cursor's Agent **Auto-run** mode enabled (Settings) for the allowlist to take effect. "Ask every time" ignores it.

## VS Code (GitHub Copilot)

```
niro mcp install --client vscode

```

Writes the user-profile `mcp.json` (`servers.niro`), the same file VS Code's **MCP: Open User Configuration** command opens.

Verify: run **MCP: List Servers** from the Command Palette, or check the Chat view's tools icon. First use of a new server needs a one-time trust confirmation.

## Windsurf

```
niro mcp install --client windsurf

```

Writes `~/.codeium/windsurf/mcp_config.json`, appends a reminder to `~/.codeium/windsurf/memories/global_rules.md`, and installs the shared `niro-skill` + `niro-local` skill to `~/.agents/skills/` (also read by Codex).

## Claude Desktop

```
niro mcp install --client claude-desktop

```

Writes `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`, Linux: `~/.config/claude/`). Restart Claude Desktop after.

## Gemini CLI

```
niro mcp install --client gemini-cli

```

Runs `gemini mcp add -s user` to register the server (`~/.gemini/settings.json`) and appends a reminder to `~/.gemini/GEMINI.md`.

Verify / reload: run `/mcp reload` inside Gemini CLI.

## GitHub Copilot CLI

```
niro mcp install --client copilot-cli

```

Runs `copilot mcp add` (writes `~/.copilot/mcp-config.json`) and appends a reminder to `~/.copilot/copilot-instructions.md`.

Verify: run `/mcp` inside the Copilot CLI. Servers are available immediately, no restart needed.

## Factory (droid)

```
niro mcp install --client factory

```

Runs `droid mcp add` (writes `~/.factory/mcp.json`) and appends a reminder to `~/.factory/AGENTS.md`. droid reloads automatically when the config file changes.

## Goose

```
niro mcp install --client goose

```

Writes an `extensions.niro` entry into `~/.config/goose/config.yaml` (Windows: `%APPDATA%\Block\goose\config\config.yaml`). Restart Goose (or start a new session) after.

If your `config.yaml` already has an unusual `extensions:` layout, the installer prints the YAML block to paste in by hand instead of guessing at a risky merge.

## OpenCode

```
niro mcp install --client opencode

```

Writes `~/.config/opencode/opencode.json` (`mcp.niro`) and appends a reminder to `~/.config/opencode/AGENTS.md`. Restart OpenCode after.

## Cline

```
niro mcp install --client cline

```

Writes Cline's `cline_mcp_settings.json` (under VS Code's `globalStorage` for Cline's publisher id) and adds a global rule file to Cline's Rules directory.

## Kiro

```
niro mcp install --client kiro

```

Writes `~/.kiro/settings/mcp.json` with `autoApprove: ["*"]` (safe, because niro's tools are read-only) and adds a global steering file at `~/.kiro/steering/niro.md`. Kiro reconnects MCP servers automatically when you save the config.

## Antigravity

```
niro mcp install --client antigravity

```

Writes `~/.gemini/config/mcp_config.json`. Reload via **Agent Settings → Customizations → Installed MCP Servers → Refresh** (or `/mcp` in the Antigravity CLI).

## Test it

After connecting any client, restart it (where noted above) and ask:

> "What calls `chargeCard()`? Use Niro tools." "What breaks if I change the `Invoice` schema?" "Is there existing code that parses webhooks, before I write a new one?"

If the assistant answers from the graph instead of grepping files, you're connected.

## Disconnect

```
niro mcp uninstall --client <id>     # one client
niro mcp uninstall --all -y          # every client, no confirm

```

`mcp uninstall` is the inverse of `mcp install` for each client. It only removes what install added, leaving your own config, rules, and other MCP servers untouched. To remove Niro from the machine entirely, see [Install, update and uninstall](https://help.niroai.dev/cli/install/).