feat(config): read v0.x ~/.reasonix/config.json mcpServers#2912
Merged
Conversation
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
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.
Part of #2795 — MCP servers vanished when upgrading from the v0.x (TypeScript) line.
Why: v0.x stored MCP servers as
mcpServersin~/.reasonix/config.json. v2 reads[[plugins]]inreasonix.toml(+ userconfig.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 itsmcpDisabledlist) 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.jsonstill wins on a name collision. A stale/malformed legacy file yieldsniland never blocks startup.specsToEntriesnow sharespluginEntryFromMCPSpec).mcpDisabledskip, absent/malformed/empty → nil.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 thespecsToEntries/pluginEntryFromMCPSpecoverlap). Replaces #2829.Verification:
go build ./...,go vet ./internal/config/...,go test ./internal/config/...— pass.