Skip to content

fix(cli): enable MCP server in OpenCode config + seed $schema#2

Merged
mashware merged 1 commit into
mainfrom
fix/opencode-mcp-enabled-schema
Jun 12, 2026
Merged

fix(cli): enable MCP server in OpenCode config + seed $schema#2
mashware merged 1 commit into
mainfrom
fix/opencode-mcp-enabled-schema

Conversation

@mashware

@mashware mashware commented Jun 12, 2026

Copy link
Copy Markdown
Owner

What

The installer writes an incomplete opencode.json for the domain-memory MCP server.

  • Adds "enabled": true to the local entry. Explicit on purpose: OpenCode's schema documents no default for enabled on local servers, so we pin it rather than rely on one.
  • Seeds "$schema": "https://opencode.ai/config.json" at the root only when absent (never clobbers a user-set value).
  • Stays idempotent: re-running does not duplicate servers nor overwrite other servers/keys (model, etc.).

Tests

packages/cli/src/install/writers.test.ts: the OpenCode case now asserts enabled and $schema; new tests cover "do not overwrite existing $schema/model" and OpenCode idempotency. 22 pass / 0 fail.

@mashware mashware changed the title fix(cli): habilita server MCP en config de OpenCode + $schema fix(cli): enable MCP server in OpenCode config + seed $schema Jun 12, 2026
Set "enabled": true on the OpenCode local MCP entry and seed the root
"$schema" only when absent, without clobbering other keys in the file.
Expand writer tests: enabled + $schema, no-clobber and idempotency.
@mashware
mashware force-pushed the fix/opencode-mcp-enabled-schema branch from 77ea26b to 6c3ad69 Compare June 12, 2026 13:26
@mashware
mashware merged commit 98e1646 into main Jun 12, 2026
1 check passed
@mashware
mashware deleted the fix/opencode-mcp-enabled-schema branch June 12, 2026 13:29
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