Agent Plan works in OpenCode v2 through the same stdio MCP server used by Claude Code and Codex. The CLI setup also adds an OpenCode slash command so humans can use planner-style commands.
npm install -g agent-planProject scope:
agent-plan setup opencode --projectUser scope:
agent-plan setup opencode --userLocal development from a built checkout:
agent-plan setup opencode --project --force --localThe command writes OpenCode config:
mcp.servers.agent-planwith a local stdio command.command.planner, which routes/planner ...text to Agent Plan MCP tools.- Flat shortcut aliases such as
/planner-load,/planner-task-start, and/planner-web-statusfor OpenCode command autosuggestion.
Agent Plan never auto-starts the planner or web dashboard. Run /planner load
when you want the planner context and dashboard.
OpenCode command registration exposes one slash command name plus prompt arguments. Agent Plan therefore supports:
/planner load
/planner task start P001(F001)/T001
/planner web status
OpenCode does not currently expose nested segment autosuggestion for every
space-separated /planner subcommand. To improve discovery, setup also creates
flat shortcut aliases:
/planner-load
/planner-task-start
/planner-web-status
Older slash-path aliases such as /planner/load are removed by setup to avoid
duplicate command suggestions.
The generated command templates are intentionally short. They do not embed the
full Agent Plan operating guide on every command invocation; the agent should
read the installed skill or .planner/SKILL.md only when deeper routing context
is needed.
The equivalent OpenCode config block is:
{
"mcp": {
"servers": {
"agent-plan": {
"type": "local",
"command": ["npx", "agent-plan", "mcp"]
}
}
}
}- Planner JSON schema:
planner-schema.json - Claude Code setup:
setup-claude-code.md - Codex setup:
setup-codex.md - Core package:
@agent-plan/core - MCP package:
@agent-plan/mcp