🧠 opencode
Query any opencode-supported model for a second opinion, or delegate a task on a public repo to a private headless opencode instance — all from inside Claude.
The opencode plugin wraps the
@kud/mcp-opencode MCP server
so you can query any opencode-supported model and see its answer inline, clearly
attributed, or hand a coding task on a public repository to a private headless
opencode instance and get the reviewed result back.
🧰 What it bundles
| Skill | Trigger | What it does |
|---|---|---|
/ask-opencode | /ask-opencode <prompt> | Send a one-off prompt to any opencode model and see the response |
/ask-opencode | --session [id], "talk to my opencode", "ask the opencode I have open", "tell opencode …" | Message a session on your running opencode and see its reply |
Session mode needs opencode v2 (and @kud/mcp-opencode 2.0.0 or later) with at
least one message already sent — that is what creates the session. opencode v2
runs a shared background service that the MCP finds automatically, so a plain
opencode is visible with nothing extra to start. list_sessions shows the
sessions of the service and of any other servers, and send/read route to the
server that owns the session unless you pass a port, which selects a server
rather than a window. A model or agent passed to send switches the session for
its later turns too, as opencode v2 has no per-message agent or model.
🤖 Delegated tasks: opencode-runner
The plugin also ships an opencode-runner agent for work on public
repositories. Claude spawns one per task; it drives the MCP's headless
instance tools and never touches an opencode window you have open.
| Agent | When Claude uses it | What it does |
|---|---|---|
opencode-runner | A coding task on a public repo that should be routed via opencode | Works in a fresh git worktree, runs the task on its own headless instance, reviews the diff and the repo's gate |
What it does, in order:
- Refuses unless
gh repo viewreports the repository asPUBLIC. - Creates a fresh
git worktreeon a new branch (or uses a worktree you pass it), so your checkout is never touched. - Starts a headless instance on the worktree, writes a self-contained brief and starts the task. You get an
OPENCODE_PASSWORD=… opencode --server <url> --session <id>line to watch it live. - Waits (at most six rounds), reviews the diff against the brief, runs the repo's test, typecheck and build scripts itself, and sends at most one follow-up.
- Always stops the instance, then reports the worktree path and branch, the diff stat, the gate results and a verdict (accept, needs follow-up or reject).
It never commits, pushes or opens a PR: you land the work. The instances run
with no git credentials, no GH_TOKEN, a pinned model and a permission set that
denies git push, git remote and git reset --hard in any form, gh,
npm publish, web search and anything outside the worktree. See the MCP's
tools reference for the
headless instance tools.
👀 Jobs pane (shelved)
The jobs pane is shelved for a revamp; the work lives on the draft/opencode-jobs-pane branch.
📦 Install
/plugin install opencode@kud --scope user🔧 Configuration
The plugin ships sensible defaults — by default it allows github-copilot/*
models. Override the allow/block lists with environment variables if you want a
different selection:
MCP_OPENCODE_MODEL_ALLOW=github-copilot/*
MCP_OPENCODE_MODEL_BLOCK=🔗 Links
- npm:
@kud/mcp-opencode - GitHub: kud/mcp-opencode
👋 Introduction
A curated collection of Claude Code plugins for kud's MCP servers — each bundles an MCP server with ready-to-use skills, one /plugin install away.
🤖 github-copilot
Query GitHub Copilot models programmatically via the official SDK — no token setup, uses your logged-in Copilot CLI credentials.