# Connect Hermes to Repowise

Wire the Hermes agent to the local Repowise MCP server and AGENTS.md, see which files change, verify the connection and remove it.

Hermes reads one `config.yaml` per machine and one project context file per
repository. Repowise registers its server in the first and writes its block
into `AGENTS.md`.

## Install

**Local, with your agent.** Paste this into Hermes:

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

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

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

**Hosted.** `repowise agents add --hosted` does not write a Hermes entry.
Hermes takes a remote server as `url` plus `headers`; use 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 |
|---|---|---|
| `config.yaml` | user | `mcp_servers.repowise`: `command` and `args`, with no `type` field and no repository path |
| `AGENTS.md` | project | The managed Repowise block, shared with Codex and OpenCode |

`config.yaml` lives at `$HERMES_HOME/config.yaml` when that is set, else
`%LOCALAPPDATA%\hermes\config.yaml` on Windows and `~/.hermes/config.yaml`
everywhere else. One entry serves every repository: the server answers for
the one Hermes starts in.

Hermes loads one project context file, first match wins: `.hermes.md` or
`HERMES.md`, then `AGENTS.md`, then `CLAUDE.md`. Repowise writes to
`AGENTS.md`, so a repository with a `HERMES.md` loads that file instead.

> **Warning**
>
> `platform_toolsets.cli` becomes an allowlist once it names any MCP server, and
> every server it leaves out drops out of the Hermes CLI. Repowise adds itself
> there only when the list is already an allowlist, so it never turns a
> permissive config into a restrictive one.

## Restart

Start a new Hermes session in the repository so it reloads `config.yaml`.

## Verify

```bash
repowise agents
```

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

## Uninstall

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

This removes the `repowise` entry from `config.yaml` and the managed block
from `AGENTS.md` (kept while Codex or OpenCode still uses it).

## Troubleshooting

| Symptom | Fix |
|---|---|
| The entry is written but no tool appears | `platform_toolsets.cli` includes `no_mcp`, which turns every MCP server off for the Hermes CLI. Remove it. |
| `config.yaml left unchanged` | Its `repowise` entry names a remote server, or the file could not be parsed. Run `repowise agents print-config hermes` and paste the entry under `mcp_servers`. |
| Nothing loads on Windows | The config is in `%LOCALAPPDATA%\hermes`, not `~/.hermes`. Run `repowise agents add --target=hermes` to write the right file. |
| Only five Repowise tools are listed | Hermes gets the core profile by default. See [Tool profiles](https://docs.repowise.dev/agents/tool-profiles). |

## Next
- [OpenCode](https://docs.repowise.dev/agents/opencode), which shares `AGENTS.md`.
- [Tool profiles](https://docs.repowise.dev/agents/tool-profiles) to list all ten tools.
- [repowise agents](https://docs.repowise.dev/cli/agents) for every flag.
