You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3936057
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: strip MCP server, use agent activation instead
- Delete src/index.ts (MCP server with 6 tools) and .mcp.json
- Remove @modelcontextprotocol/sdk and zod from dependencies
- Remove dist/ from .gitignore (no more bundler output)
- Rewrite README/AGENTS: no MCP, no build step, no dist/
- Rewrite SKILL.md and opencode-worker.md to use slash command
and subagent activation instead of MCP tools
- Update hooks to skip non-code docs (no ts files in src/ anymore)
- net: -397 +77 = -320 lines (-50%)
-[OpenCode](https://opencode.ai) v2+ with at least one provider set up. Check that`opencode models` lists something.
44
+
-[OpenCode](https://opencode.ai) v2+ with at least one provider set up. Check that
45
+
`opencode models` lists something.
39
46
40
47
## Install
41
48
@@ -46,38 +53,8 @@ MCP servers, and permission rules. It does not use a separate API.
|`OPENCODE_BIN`| auto-detected | Path to the `opencode` executable. |
146
-
|`OPENCODE_DELEGATE_DEFAULT_MODEL`|`opencode-go/muse-spark-1.3-contributor`| Model used when `model` is omitted. Set it to `""` to use opencode's own default. |
147
-
|`OPENCODE_DELEGATE_READ_MODEL`|`opencode/muse-spark-1.3-contributor-free`| Model used when `model` is omitted and `auto` is false (reading files, reviews, questions). Free by default. |
148
-
|`OPENCODE_DELEGATE_AUTO`|`true`| Default for `auto`. |
149
-
|`OPENCODE_DELEGATE_TIMEOUT`|`1800`| Seconds before a run is killed. |
150
-
|`OPENCODE_DELEGATE_MAX_OUTPUT`|`40000`| Maximum number of response characters returned to Claude. |
151
-
|`OPENCODE_DELEGATE_CWD`| the server's cwd | Base directory for `cwd`. |
152
-
|`OPENCODE_DELEGATE_PREFERRED_PROVIDERS`|_(none)_| Comma-separated provider order used when a model is offered by several providers, e.g. `xai,opencode-go`. Without it, the model maker's own provider beats resellers. |
|`OPENCODE_BIN`| auto-detected | Path to the `opencode` executable. |
114
+
|`OPENCODE_DELEGATE_DEFAULT_MODEL`|`opencode-go/muse-spark-1.3-contributor`| Model used when `model` is omitted. Set it to `""` to use opencode's own default. |
115
+
|`OPENCODE_DELEGATE_READ_MODEL`|`opencode/muse-spark-1.3-contributor-free`| Model used when `model` is omitted and `auto` is false (reading files, reviews, questions). Free by default. |
116
+
|`OPENCODE_DELEGATE_AUTO`|`true`| Default for `auto`. |
117
+
|`OPENCODE_DELEGATE_TIMEOUT`|`1800`| Seconds before a run is killed. |
118
+
|`OPENCODE_DELEGATE_MAX_OUTPUT`|`40000`| Maximum number of response characters returned to Claude. |
119
+
|`OPENCODE_DELEGATE_CWD`| the server's cwd | Base directory for `cwd`. |
120
+
|`OPENCODE_DELEGATE_PREFERRED_PROVIDERS`|_(none)_| Comma-separated provider order used when a model is offered by several providers, e.g. `xai,opencode-go`. |
121
+
|`OPENCODE_DELEGATE_THINKING`|`true`| Include `--thinking` so reasoning/thinking blocks appear in output. |
153
122
154
123
## Development
155
124
156
125
```bash
157
126
bun install
158
127
bun test# unit tests (fixtures captured from real `opencode run --format json`)
159
128
bun run typecheck
160
-
bun run build # bundles to dist/index.js, which is committed so installs need no build step
161
-
bun run start # run the server from source
129
+
bun run lint
130
+
bun run fmt
162
131
```
163
132
164
-
To debug interactively, use `bunx @modelcontextprotocol/inspector bun dist/index.js`.
Copy file name to clipboardExpand all lines: agents/opencode-worker.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,7 @@ delegated model fails twice.
15
15
test/build commands.
16
16
3.**Write a self-contained brief**: goal, context and paths, constraints, acceptance criteria, and a
17
17
short report of the changes at the end. The model cannot see your conversation.
18
-
4.**Delegate** with the opencode MCP `delegate` tool (named `mcp__plugin_opencode-delegate_opencode__delegate`
19
-
or `mcp__opencode__delegate`). If the result is an ambiguous-model error, pick the best candidate
20
-
that fits the instructions. If the instructions name a provider, choose that provider.
18
+
4.**Delegate** by spawning a subagent with the opencode `delegate` logic — use the model name and brief as the subagent prompt. If the result is an ambiguous-model error, pick the best candidate that fits the instructions. If the instructions name a provider, choose that provider.
21
19
5.**Verify**: read the git changes it reports and run the tests or build.
22
20
6.**Iterate** at most twice. Call `delegate` again with the same `session_id` and give concrete
Copy file name to clipboardExpand all lines: package.json
+6-13Lines changed: 6 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "claude-opencode-delegate",
3
3
"version": "0.1.0",
4
-
"description": "MCP server + Claude Code plugin that lets Claude delegate tasks to any OpenCode model (Grok, Kimi, GLM, Qwen, DeepSeek…) while staying the orchestrator.",
4
+
"description": "Claude Code plugin — delegate tasks to any OpenCode model (Grok, Kimi, GLM, Qwen, DeepSeek…) via agent activation, while Claude stays the orchestrator.",
0 commit comments