Skip to content

fix(config): read the pre-mcpServers mcp string list from v0.x config.json#3960

Merged
esengine merged 1 commit into
main-v2from
fix/legacy-mcp-string-specs
Jun 11, 2026
Merged

fix(config): read the pre-mcpServers mcp string list from v0.x config.json#3960
esengine merged 1 commit into
main-v2from
fix/legacy-mcp-string-specs

Conversation

@esengine

Copy link
Copy Markdown
Owner

v0.x stored MCP servers in two shapes: the canonical mcpServers map and the older mcp list of --mcp-format strings (name=cmd args, name=https://url for SSE, name=streamable+https://url for streamable HTTP), with mcpEnv / mcpDisabled keyed by server name. The Go line only read mcpServers — in both the one-time migration and the live lowest-priority legacy source — so servers configured the old way (including the default memory server the v0.x setup writes) silently vanished on upgrade.

  • parseLegacyMCPSpec parses one --mcp string into a PluginEntry (same transport inference as v0.x: streamable+ prefix → http, plain http(s):// → SSE, otherwise stdio via the existing command-line splitter).
  • MigrateLegacyIfNeeded now imports the mcp list, applying mcpEnv to named stdio specs and migrating mcpDisabled entries with auto_start = false; mcpServers wins a name collision, matching the v0.x merge order.
  • loadLegacyMCP (the every-boot legacy source for users whose v2 config already exists) reads the list the same way, skipping disabled names.
  • Anonymous specs (no name= prefix) get a synthesized mcp-N name, since v1+ plugins require one.

Verified the string format against the v0.x source (src/mcp/spec.ts parseMcpSpec / normalizeMcpConfig on the v1 branch) rather than guessing.

Closes #3949

…ig.json

v0.x stored MCP servers in two shapes: the canonical mcpServers map and
the older `mcp` list of --mcp-format strings (name=cmd args, name=URL
for SSE, name=streamable+URL), with mcpEnv/mcpDisabled keyed by name.
Both the one-time migration and the live lowest-priority legacy source
only read mcpServers, so servers configured the old way -- including the
default memory server -- silently vanished on upgrade.

Parse the string list in both paths; mcpServers wins a name collision,
matching the v0.x merge order. Anonymous specs get a synthesized name
since v1+ plugins require one.

Closes #3949
@esengine esengine requested a review from SivanCola as a code owner June 11, 2026 05:47
@github-actions github-actions Bot added config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 11, 2026
@esengine esengine merged commit 7fe7167 into main-v2 Jun 11, 2026
14 checks passed
@esengine esengine deleted the fix/legacy-mcp-string-specs branch June 11, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: mcp in legacy config.json is not migrated

1 participant