Skip to content

Add OpenCode support to install/uninstall command#36

Open
zeval wants to merge 1 commit intoDeusData:mainfrom
zeval:add-opencode-install-support
Open

Add OpenCode support to install/uninstall command#36
zeval wants to merge 1 commit intoDeusData:mainfrom
zeval:add-opencode-install-support

Conversation

@zeval
Copy link

@zeval zeval commented Mar 10, 2026

Summary

  • Register MCP server in OpenCode's global config (~/.config/opencode/opencode.json) during install
  • Remove MCP server entry during uninstall
  • Uses OpenCode's native config format: "mcp" key with "type": "local" and command array

Changes

  • install.go: Add opencodeConfigPath(), installOpenCodeMCP(), removeOpenCodeMCP() following the Zed/VS Code custom handler pattern
  • install_test.go: Add 4 tests — config path, install, settings preservation, uninstall

Test plan

  • TestOpenCodeConfigPath — verifies path generation
  • TestOpenCodeMCPInstall — creates config from scratch, verifies mcp key, type=local, command=[path]
  • TestOpenCodeMCPPreservesSettings — pre-existing settings survive install
  • TestOpenCodeMCPUninstall — entry removed cleanly after install
  • All existing tests pass (go test ./cmd/codebase-memory-mcp/ -count=1)
  • go vet clean

Register the MCP server in OpenCode's global config
(~/.config/opencode/opencode.json) using its native format:
"mcp" key with type "local" and command array.
@zeval zeval marked this pull request as ready for review March 10, 2026 15:49
@zeval
Copy link
Author

zeval commented Mar 10, 2026

Hey @DeusData! Nice tool, in order to expand this to OpenCode users I went ahead and added support based on your existing patterns, let me know if there's something you'd like to see changed.

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