Skip to content

feat(config): read v0.x ~/.reasonix/config.json mcpServers#2912

Merged
esengine merged 1 commit into
main-v2from
feat/v1-mcp-compat-rebase
Jun 3, 2026
Merged

feat(config): read v0.x ~/.reasonix/config.json mcpServers#2912
esengine merged 1 commit into
main-v2from
feat/v1-mcp-compat-rebase

Conversation

@esengine
Copy link
Copy Markdown
Owner

@esengine esengine commented Jun 3, 2026

Part of #2795 — MCP servers vanished when upgrading from the v0.x (TypeScript) line.

Why: v0.x stored MCP servers as mcpServers in ~/.reasonix/config.json. v2 reads [[plugins]] in reasonix.toml (+ user config.toml) plus a project .mcp.json, and never looked at the old file — so an upgrader's servers silently disappeared.

Fix: read the legacy config's mcpServers (honouring its mcpDisabled list) as a lowest-priority source merged into [[plugins]]. A v0.x user's servers keep working with zero edits; anything in the v2 config or .mcp.json still wins on a name collision. A stale/malformed legacy file yields nil and never blocks startup.

  • Reuses the existing spec→entry mapping (specsToEntries now shares pluginEntryFromMCPSpec).
  • Unit-tested: mapping, mcpDisabled skip, absent/malformed/empty → nil.
  • README (EN + zh) note the v0.x compat.

Both the CLI and desktop go through config.Load(), so this also helps the desktop↔CLI MCP sync part of #2795 for upgraders who still have servers only in the old file.

Rebased onto current main-v2 (resolved the specsToEntries / pluginEntryFromMCPSpec overlap). Replaces #2829.

Verification: go build ./..., go vet ./internal/config/..., go test ./internal/config/... — pass.

Upgrading from the v0.x (TypeScript) line silently dropped MCP servers: v0.x
stored them as mcpServers in ~/.reasonix/config.json, while v2 reads [[plugins]]
in reasonix.toml plus a project .mcp.json, and never looked at the old file.

Read the legacy config's mcpServers (honouring its mcpDisabled list) as a
lowest-priority source merged into [[plugins]], so a v0.x user's servers keep
working with no edits — anything in the v2 config or .mcp.json still wins on a
name collision. A stale/malformed legacy file yields nil, never blocking startup.

Refs #2795
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 3, 2026
@esengine esengine merged commit f015e9c into main-v2 Jun 3, 2026
6 checks passed
@esengine esengine deleted the feat/v1-mcp-compat-rebase branch June 3, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant