affaan-m/ECC · error

mcp_servers.${legacyName} is a legacy name for ${name} (run

Error message

mcp_servers.${legacyName} is a legacy name for ${name} (run with --update-mcp to migrate)

What it means

Advisory message from merge-mcp-config: the user's config contains an MCP server section under a legacy alias name instead of the canonical name. Without --update-mcp the script will not rewrite it; re-run with --update-mcp to migrate the section to the current name.

Source

Thrown at scripts/codex/merge-mcp-config.js:300

    }

    if (finalEntry) {
      if (updateMcp) {
        // --update-mcp: remove existing section (and legacy alias), will re-add below
        toRemoveLog.push(`mcp_servers.${resolvedLabel}`);
        raw = removeServerFromText(raw, resolvedLabel, existing);
        if (resolvedLabel !== name) {
          raw = removeServerFromText(raw, name, existing);
        }
        if (legacyName && hasCanonical) {
          toRemoveLog.push(`mcp_servers.${legacyName}`);
          raw = removeServerFromText(raw, legacyName, existing);
        }
        toAppend.push(spec.toml);
      } else {
        // Add-only mode: skip, but warn about drift
        if (legacyName && !hasCanonical) {
          warn(`mcp_servers.${legacyName} is a legacy name for ${name} (run with --update-mcp to migrate)`);
        } else if (configDiffers(finalEntry, spec.fields)) {
          warn(`mcp_servers.${name} differs from ECC recommendation (run with --update-mcp to refresh)`);
        } else {
          log(`  [ok] mcp_servers.${name}`);
        }
      }
    } else {
      log(`  [add] mcp_servers.${name}`);
      toAppend.push(spec.toml);
    }
  }

  const hasRemovals = toRemoveLog.length > 0;

  if (toAppend.length === 0 && !hasRemovals) {
    log('All ECC MCP servers already present. Nothing to do.');
    return;
  }

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Re-run the merge with --update-mcp to rename the legacy mcp_servers entry to the new name.
  2. Manually rename the key in the config if a one-off fix is preferred.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at scripts/codex/merge-mcp-config.js:300 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/765be05f744c9c5b. Report an issue: GitHub.