The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
fix: normalize Codex Context7 naming
Sean Cheick Baradji6a7a115e187d
diff --git a/.codex/AGENTS.md b/.codex/AGENTS.mdindex ac93fb497..523016621 100644--- a/.codex/AGENTS.md+++ b/.codex/AGENTS.md@@ -46,12 +46,15 @@ Available skills:Treat the project-local `.codex/config.toml` as the default Codex baseline for ECC. The current ECC baseline enables GitHub, Context7, Exa, Memory, Playwright, and Sequential Thinking; add heavier extras in `~/.codex/config.toml` only when a task actually needs them.+ECC's canonical Codex section name is `[mcp_servers.context7]`. The launcher package remains `@upstash/context7-mcp`; only the TOML section name is normalized for consistency with `codex mcp list` and the reference config.+### Automatic config.toml mergingThe sync script (`scripts/sync-ecc-to-codex.sh`) uses a Node-based TOML parser to safely merge ECC MCP servers into `~/.codex/config.toml`:- **Add-only by default** — missing ECC servers are appended; existing servers are never modified or removed.- **7 managed servers** — Supabase, Playwright, Context7, Exa, GitHub, Memory, Sequential Thinking.+- **Canonical naming** — ECC manages Context7 as `[mcp_servers.context7]`; legacy `[mcp_servers.context7-mcp]` entries are treated as aliases during updates.- **Package-manager aware** — uses the project's configured package manager (npm/pnpm/yarn/bun) instead of hardcoding `pnpm`.- **Drift warnings** — if an existing server's config differs from the ECC recommendation, the script logs a warning.- **`--update-mcp`** — explicitly replaces all ECC-managed servers with the latest recommended config (safely removes subtables like `[mcp_servers.supabase.env]`).diff --git a/.codex/config.toml b/.codex/config.tomlindex 410fb6ac1..069fe0762 100644--- a/.codex/config.toml+++ b/.codex/config.toml@@ -45,6 +45,8 @@ startup_timeout_sec = 30[mcp_servers.context7]command = "npx"+# Canonical Codex section name is `context7`; the package itself remains+# `@upstash/context7-mcp`.args = ["-y", "@upstash/context7-mcp@latest"]startup_timeout_sec = 30diff --git a/README.md b/README.mdindex 9289e45ca..06ef9adc0 100644--- a/README.md+++ b/README.md@@ -1023,6 +1023,8 @@ cp .codex/config.toml ~/.codex/config.tomlThe sync script safely merges ECC MCP servers into your existing `~/.codex/config.toml` using an **add-only** strategy — it never removes or modifies your existing servers. Run with `--dry-run` to preview changes, or `--update-mcp` to force-refresh ECC servers to the latest recommended config.+For Context7, ECC uses the canonical Codex section name `[mcp_servers.context7]` while still launching the `@upstash/context7-mcp` package. If you already have a legacy `[mcp_servers.context7-mcp]` entry, `--update-mcp` migrates it to the canonical section name.+Codex macOS app:- Open this repository as your workspace.- The root `AGENTS.md` is auto-detected.diff --git a/scripts/codex/check-codex-global-state.sh b/scripts/codex/check-codex-global-state.shindex 147e9fb34..188443b9c 100755--- a/scripts/codex/check-codex-global-state.sh+++ b/scripts/codex/check-codex-global-state.sh@@ -103,7 +103,7 @@ if [[ -f "$CONFIG_FILE" ]]; then'mcp_servers.github' \'mcp_servers.memory' \'mcp_servers.sequential-thinking' \- 'mcp_servers.context7-mcp'+ 'mcp_servers.context7'doif rg -n "^\[$section\]" "$CONFIG_FILE" >/dev/null 2>&1; thenok "MCP section [$section] exists"@@ -112,10 +112,10 @@ if [[ -f "$CONFIG_FILE" ]]; thenfidone- if rg -n '^\[mcp_servers\.context7\]' "$CONFIG_FILE" >/dev/null 2>&1; then- warn "Duplicate [mcp_servers.context7] exists (context7-mcp is preferred)"+ if rg -n '^\[mcp_servers\.context7-mcp\]' "$CONFIG_FILE" >/dev/null 2>&1; then+ warn "Legacy [mcp_servers.context7-mcp] exists (context7 is preferred)"else- ok "No duplicate [mcp_servers.context7] section"+ ok "No legacy [mcp_servers.context7-mcp] section"fifidiff --git a/scripts/codex/merge-mcp-config.js b/scripts/codex/merge-mcp-config.jsindex 917e29484..48973934e 100644--- a/scripts/codex/merge-mcp-config.js+++ b/scripts/codex/merge-mcp-config.js@@ -89,7 +89,7 @@ const DEFAULT_MCP_STARTUP_TIMEOUT_TOML = `startup_timeout_sec = ${DEFAULT_MCP_STconst ECC_SERVERS = {supabase: dlxServer('supabase', '@supabase/mcp-server-supabase@latest', { startup_timeout_sec: 20.0, tool_timeout_sec: 120.0 }, 'startup_timeout_sec = 20.0\ntool_timeout_sec = 120.0'),playwright: dlxServer('playwright', '@playwright/mcp@latest', { startup_timeout_sec: DEFAULT_MCP_STARTUP_TIMEOUT_SEC }, DEFAULT_MCP_STARTUP_TIMEOUT_TOML),- 'context7-mcp': dlxServer('context7-mcp', '@upstash/context7-mcp@latest', { startup_timeout_sec: DEFAULT_MCP_STARTUP_TIMEOUT_SEC }, DEFAULT_MCP_STARTUP_TIMEOUT_TOML),+ context7: dlxServer('context7', '@upstash/context7-mcp@latest', { startup_timeout_sec: DEFAULT_MCP_STARTUP_TIMEOUT_SEC }, DEFAULT_MCP_STARTUP_TIMEOUT_TOML),exa: {fields: { url: 'https://mcp.exa.ai/mcp' },toml: `[mcp_servers.exa]\nurl = "https://mcp.exa.ai/mcp"`@@ -107,9 +107,9 @@ ECC_SERVERS.supabase.fields.args.push('--features=account,docs,database,debugginECC_SERVERS.supabase.toml = ECC_SERVERS.supabase.toml.replace(/^(args = \[.*)\]$/m, '$1, "--features=account,docs,database,debugging,development,functions,storage,branching"]');// Legacy section names that should be treated as an existing ECC server.-// e.g. old configs shipped [mcp_servers.context7] instead of [mcp_servers.context7-mcp].+// e.g. older configs shipped [mcp_servers.context7-mcp] instead of [mcp_servers.context7].const LEGACY_ALIASES = {- 'context7-mcp': ['context7']+ context7: ['context7-mcp']};// ---------------------------------------------------------------------------