Repository navigation
fix(sync): bring in OpenCode 2 MCP servers and plugins - #4
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode 2 keeps MCP servers under
mcp.serversand plugins underplugins. Setup already found the servers, but sync looked only at the flatmcpmap and the oldpluginlist, so nothing from an OpenCode 2 config reached the pouch or the dashboard.mcp.serversand the flat OpenCode 1 layout. OpenCode 2 configs are written tomcp.serverswithout OpenCode 1'senabledfield.pluginsandplugin, including entries with options ({"package", "options"}and["pkg", {…}]). Writing no longer drops entries that have options.crates/sp-sync/tests/harnesses.rsruns 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.