Skip to content

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

Closed
esengine wants to merge 1 commit into
main-v2from
feat/v1-mcp-compat
Closed

feat(config): read v0.x ~/.reasonix/config.json mcpServers#2829
esengine wants to merge 1 commit into
main-v2from
feat/v1-mcp-compat

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. (This is the mcpServers vs mcp[] confusion in the report.)

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 mcpServers parser (extracted specsToEntries).
  • 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.

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
Copy link
Copy Markdown
Owner Author

esengine commented Jun 3, 2026

Landed via #2912 — same change rebased onto current main-v2 (resolved the overlap with the pluginEntryFromMCPSpec refactor that landed meanwhile). Couldn't update this branch in place because force-pushing the PR branch is blocked, so I pushed the rebase as a fresh branch and merged that. Thanks!

@esengine esengine closed this Jun 3, 2026
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