# Connect Gemini CLI to Niro

**One command connects Gemini CLI to Niro:**

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

```

Then restart Gemini CLI, because it reads its settings only when it starts.

You must have run `niro start` first, so that you are signed in. See [Connect your coding agent to Niro](https://help.niroai.dev/cli/connect-your-ai-assistant/).

## What the install writes

- The connection, through Gemini's own command (`gemini mcp add -s user ...`), in `~/.gemini/settings.json`.

## How Gemini CLI learns to use Niro

- A section in `~/.gemini/GEMINI.md`.

## Check that it works

Ask it a question about your code, such as "which routes does this project serve?". An answer from Niro starts with "Answered from the local graph on this machine (niro-local)."

## Things to know

- If the Gemini command is missing, the install says it failed to register the server.

## Remove it

```
niro mcp uninstall --client gemini-cli

```

If something goes wrong, see [FAQ: coding agents and MCP](https://help.niroai.dev/cli/faq-assistants-and-mcp/).