Skip to content

fix(sync): bring in OpenCode 2 MCP servers and plugins - #4

Merged
Fenish merged 2 commits into
mainfrom
fix/opencode-v2-mcp-plugins
Oct 12, 2026
Merged

Fenish merged 2 commits into
mainfrom
fix/opencode-v2-mcp-plugins

Conversation

@Fenish

@Fenish Fenish commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

OpenCode 2 keeps MCP servers under mcp.servers and plugins under plugins. Setup already found the servers, but sync looked only at the flat mcp map and the old plugin list, so nothing from an OpenCode 2 config reached the pouch or the dashboard.

  • MCP servers are read from mcp.servers and the flat OpenCode 1 layout. OpenCode 2 configs are written to mcp.servers without OpenCode 1's enabled field.
  • Plugins are read from plugins and plugin, including entries with options ({"package", "options"} and ["pkg", {…}]). Writing no longer drops entries that have options.
  • crates/sp-sync/tests/harnesses.rs runs a fake home with all 11 assistants through the steps a sync uses: what each one lists, every MCP config style, hooks and plugins.

Checked against a real OpenCode 2 config: 3 MCP servers and 3 plugins now come in, where none did before.

OpenCode 2 keeps MCP servers under `mcp.servers` and plugins under
`plugins`. The setup screen listed the servers, but the sync read `mcp`
as a flat map and only the `plugin` list, so none of them reached the
pouch or the dashboard.

Servers are now read from `mcp.servers` and beside it, and written there
without OpenCode 1's `enabled` when the config (or the installed OpenCode)
is version 2. Plugins are read from `plugins` and `plugin`, including
`{package, options}` objects and `[package, options]` pairs, and entries
with options are kept as written when the list changes.
A home with all eleven assistants set up as their documentation shows: what each one lists, the server.json every MCP dialect becomes, and the hooks and plugins brought in from each config, OpenCode 1 and 2 included.
@Fenish
Fenish merged commit 5110bbe into main Oct 12, 2026
5 checks passed
@Fenish
Fenish deleted the fix/opencode-v2-mcp-plugins branch October 12, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant