affaan-m/ECC · warning

[ecc-mcp] WARNING

Error message

[ecc-mcp] WARNING: ${msg}

What it means

merge-mcp-config.js prints `[ecc-mcp] WARNING: <msg>` via its warn() helper for non-fatal MCP server configuration conditions found while merging recommended MCP server entries into the Codex config. The merge continues; the message indicates manual attention may be needed.

Solutions

  1. Read the message after 'WARNING:' to see which mcp_servers entry is affected
  2. Re-run with --update-mcp to let the script migrate/refresh the entry to the ECC recommendation
  3. Or manually edit the TOML entry to match the recommended fields in the script's specs
  4. Re-run the merge and confirm the entry now logs `[ok]`

Example fix

// before
$ node scripts/codex/merge-mcp-config.js
[ecc-mcp] WARNING: mcp_servers.context7 differs from ECC recommendation...
// after
$ node scripts/codex/merge-mcp-config.js --update-mcp
[ecc-mcp] [ok] mcp_servers.context7
Defensive patterns

Strategy: validation

Validate before calling

// compare existing entry with recommended spec before merge
const differs = Object.keys(recommended).some(k => JSON.stringify(existing[k]) !== JSON.stringify(recommended[k]));
if (differs) runMergeWithUpdateFlag();

Prevention

When it happens

Trigger: main detects a condition it cannot or will not auto-fix — typically when running in add-only mode (no --update-mcp) and an existing server entry drifts from the ECC recommendation, or a legacy-named entry is present.

Common situations: User manually edited their MCP server config so fields differ from ECC's recommended spec; a server was renamed to a canonical name but the old legacy entry remains; running the merge in default (non-updating) mode.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/0324559ccf07b2e3. Report an issue: GitHub.

Appendix: source

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

const RETIRED_INVALID_URL_SERVERS = {
  exa: 'https://mcp.exa.ai/mcp'
};

// Legacy section names that should be treated as an existing ECC server.
// e.g. older configs shipped [mcp_servers.context7-mcp] instead of
// [mcp_servers.context7]. Empty since the June 2026 default-set reduction.
const LEGACY_ALIASES = {};

// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------

function log(msg) {
  console.log(`[ecc-mcp] ${msg}`);
}

function warn(msg) {
  console.warn(`[ecc-mcp] WARNING: ${msg}`);
}

/** Shallow-compare two objects (one level deep, arrays by JSON). */
function configDiffers(existing, recommended) {
  for (const key of Object.keys(recommended)) {
    const a = existing[key];
    const b = recommended[key];
    if (Array.isArray(b)) {
      if (JSON.stringify(a) !== JSON.stringify(b)) return true;
    } else if (a !== b) {
      return true;
    }
  }
  return false;
}

/**
 * Remove a TOML section and its key-value pairs from raw text.

View on GitHub (pinned to 8321021c54)