# Connect Kiro to Repowise

Wire Kiro to the local Repowise MCP server with a steering file, see which files change, verify the connection and remove it.

Kiro reads MCP servers from a workspace file and a user file, and loads every
Markdown file in its steering directory as context. Repowise writes both.

## Install

**Local, with your agent.** Paste this into Kiro's agent chat:

```text
Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.
```

**Local, by hand.** `repowise init` wires Kiro when it is installed. To wire
it later:

```bash
repowise agents add --target=kiro
```

`--scope project` writes only the workspace files, `--scope user` only the
user ones. The default writes both.

**Hosted.** `repowise agents add --hosted` does not write a Kiro entry. Add
the hosted server by hand with the URL and an API key from
[API keys](https://docs.repowise.dev/hosted/connecting-ide#advanced-api-keys).

## What gets written where

| File | Scope | What repowise writes |
|---|---|---|
| `.kiro/settings/mcp.json` | project | `mcpServers.repowise`: `command` and `args` |
| `.kiro/steering/repowise.md` | project | The Repowise steering file |
| `~/.kiro/settings/mcp.json` | user | The same server entry, with no repository path |
| `~/.kiro/steering/repowise.md` | user | The same steering file |

`$KIRO_HOME` replaces `~/.kiro` when it is set. The steering file starts
with a "Managed by Repowise" line, which is how removal tells it apart from
a file you wrote.

## Restart

Kiro IDE ships with MCP turned off. Turn MCP on in Kiro's settings, then
check that `repowise` appears in the MCP servers panel. The Kiro CLI reads
the same file without that switch.

## Verify

```bash
repowise agents
```

You should see `kiro` with status `configured`. Ask Kiro "What are the
hotspot files in this repo?" and check that it calls a Repowise tool.

## Uninstall

```bash
repowise agents remove --target=kiro
```

This removes the `repowise` server entries and deletes the steering files
repowise wrote.

## Troubleshooting

| Symptom | Fix |
|---|---|
| No Repowise tools in Kiro IDE | MCP is off. Turn it on in Kiro's settings. |
| `mcp.json left unchanged` | The file is not valid JSON. Run `repowise agents print-config kiro` and paste the entry under `mcpServers`. |
| `"repowise" entry names a remote server` | Run `repowise agents remove --target=kiro` first if you want the local server. |
| Only five Repowise tools are listed | Kiro gets the core profile by default. See [Tool profiles](https://docs.repowise.dev/agents/tool-profiles). |

## Next
- [Tool profiles](https://docs.repowise.dev/agents/tool-profiles) to list all ten tools.
- [Tools by question](https://docs.repowise.dev/agents/tools-by-question) for what to ask.
- [repowise agents](https://docs.repowise.dev/cli/agents) for every flag.
