Connect Claude Code to Niro
One command connects Claude Code to Niro:
niro mcp install --client claude-code
Then restart Claude Code, 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.
What the install writes
- The connection, through Claude Code's own command:
claude mcp add --scope user niro ... -- niro mcp serve.
How Claude Code learns to use Niro
- Six hooks in
~/.claude/settings.json. A hook is a small command Claude Code runs at a fixed moment. Niro's hooks run after Claude Code compacts its memory, when you send a prompt, before searches and file reads, before a shell command that searches or reads source code, before an edit (the impact check), and when a task ends (the end-of-task line check). - A short section in
~/.claude/CLAUDE.md. - Two skills:
~/.claude/skills/niro-skill(how to use the tools) and~/.claude/skills/niro-local(how to manage Niro from chat).
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
- Claude Code is the only agent that gets hooks, so it is the one most likely to ask Niro first.
- The impact check before an edit is advisory only. Turn it off with
touch ~/.niro/impact-gate-off. - The shell reminder adds a short note when Claude Code runs
grep,rg,git grep,cat,head,tail,sed -n,awk,nl,less,batorfind -nameon source code in a folder Niro indexes. It never blocks the command, and it stays quiet for config, docs, logs, build output, a file changed in the last 10 minutes, and a command that reads a pipe (ps aux | grep node). - To check the connection, type
/mcpinside Claude Code:niroshould be listed as connected. - If Claude Code is not installed, the install says "Failed to register MCP server", gives the address to get Claude Code (https://claude.ai/code), and prints the command to run by hand.
Remove it
niro mcp uninstall --client claude-code
If something goes wrong, see FAQ: coding agents and MCP.