Agents

Connect OpenCode to Repowise

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

OpenCode registers MCP servers under its own mcp key and reads AGENTS.md for instructions. Repowise writes both, at project and user scope.

Install

Local, with your agent. Paste this into OpenCode:

Paste into Claude Code, Codex, Cursor or any MCP agent

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

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

bash
repowise agents add --target=opencode

The default writes the project pair and the user pair. Pass --scope=project or --scope=user for one.

Hosted. Run in the repository, then sign in:

bash
repowise agents add --target=opencode --hosted
opencode mcp auth repowise

What gets written where

FileScopeWhat repowise writes
opencode.jsoncprojectmcp.repowise: {"type": "local", "command": ["repowise", "mcp", ...]}
AGENTS.mdprojectThe managed Repowise block, shared with Codex and Hermes
~/.config/opencode/opencode.jsoncuserThe same server entry
~/.config/opencode/AGENTS.mduserThe managed block

The user directory is $XDG_CONFIG_HOME/opencode when that is set, else ~/.config/opencode, on Windows too: OpenCode does not read %APPDATA%. An existing opencode.json is updated in place. command is one array holding the binary and its arguments, unlike the command plus args shape other hosts use. The hosted entry is "type": "remote" with a url, named repowise-hosted when a local repowise exists.

Restart

Quit and start OpenCode again in the repository. For a hosted entry, run opencode mcp auth repowise (or repowise-hosted) and approve Repowise in the browser.

Verify

bash
opencode mcp list
repowise agents

You should see repowise in OpenCode's list and opencode with status configured.

Uninstall

bash
repowise agents remove --target=opencode

This removes the repowise entry and the managed AGENTS.md block, keeping your own content and other servers. The block stays while Codex or Hermes still uses it.

Troubleshooting

SymptomFix
opencode.jsonc left unchangedOpenCode accepts comments in this file and repowise does not rewrite one it cannot parse as strict JSON. Run repowise agents print-config opencode and paste the entry under mcp.
The user entry never loads on WindowsCheck it is in ~/.config/opencode, not %APPDATA%\opencode.
AGENTS.md left unchangedIts Repowise markers are unpaired or duplicated. Fix them by hand and re-run.
Only five Repowise tools are listedOpenCode gets the core profile by default. See Tool profiles.

Next

Hosted

Indexed on every push, with nothing to install.

Start free
Was this page helpful?
Report a problem with this pageUpdated