# Connect Cursor to Niro

**One command connects Cursor to Niro:**

```
niro mcp install --client cursor

```

Then restart Cursor, 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, in `~/.cursor/mcp.json`.

- `niro:*` in the `mcpAllowlist` of `~/.cursor/permissions.json`, so Niro's tools run without asking each time.

## How Cursor learns to use Niro

- A project rule, `.cursor/rules/niro.mdc`, **in the folder you ran the install from**. Cursor has no rule file for all projects, so the rule goes into that folder.

## 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

- `niro upgrade` refreshes Cursor too. It writes the rule into the folder you run `niro upgrade` from, and says so first.

- `niro mcp uninstall --client cursor` removes the rule from the current folder only. Rules in other folders stay until you delete them.

## Remove it

```
niro mcp uninstall --client cursor

```

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