{"record":{"id":"c152ac89b226125a","repo":"affaan-m/ECC","slug":"mcp-servers-name-differs-from-ecc-recommendatio","errorCode":null,"errorMessage":"mcp_servers.${name} differs from ECC recommendation (run with --update-mcp to refresh)","messagePattern":"mcp_servers\\.(.+?) differs from ECC recommendation \\(run with --update-mcp to refresh\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/codex/merge-mcp-config.js","lineNumber":302,"sourceCode":"    if (finalEntry) {\n      if (updateMcp) {\n        // --update-mcp: remove existing section (and legacy alias), will re-add below\n        toRemoveLog.push(`mcp_servers.${resolvedLabel}`);\n        raw = removeServerFromText(raw, resolvedLabel, existing);\n        if (resolvedLabel !== name) {\n          raw = removeServerFromText(raw, name, existing);\n        }\n        if (legacyName && hasCanonical) {\n          toRemoveLog.push(`mcp_servers.${legacyName}`);\n          raw = removeServerFromText(raw, legacyName, existing);\n        }\n        toAppend.push(spec.toml);\n      } else {\n        // Add-only mode: skip, but warn about drift\n        if (legacyName && !hasCanonical) {\n          warn(`mcp_servers.${legacyName} is a legacy name for ${name} (run with --update-mcp to migrate)`);\n        } else if (configDiffers(finalEntry, spec.fields)) {\n          warn(`mcp_servers.${name} differs from ECC recommendation (run with --update-mcp to refresh)`);\n        } else {\n          log(`  [ok] mcp_servers.${name}`);\n        }\n      }\n    } else {\n      log(`  [add] mcp_servers.${name}`);\n      toAppend.push(spec.toml);\n    }\n  }\n\n  const hasRemovals = toRemoveLog.length > 0;\n\n  if (toAppend.length === 0 && !hasRemovals) {\n    log('All ECC MCP servers already present. Nothing to do.');\n    return;\n  }\n\n  const appendText = '\\n' + toAppend.join('\\n\\n') + '\\n';","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/codex/merge-mcp-config.js#L284-L320","documentation":"Advisory message from merge-mcp-config: an existing mcp_servers.<name> section differs from what ECC recommends (different command/args/env). Without --update-mcp the script preserves the user's version; re-run with --update-mcp to overwrite it with the recommended spec.","triggerScenarios":"Thrown at scripts/codex/merge-mcp-config.js:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run with --update-mcp to refresh the entry to the ECC-recommended configuration.","Diff the entry against the recommendation to decide whether to keep the local override."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}