Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,30 @@ notify = [
[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
startup_timeout_sec = 30

[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp@latest"]
startup_timeout_sec = 30

[mcp_servers.exa]
url = "https://mcp.exa.ai/mcp"

[mcp_servers.memory]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-memory"]
startup_timeout_sec = 30

[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest", "--extension"]
startup_timeout_sec = 30

[mcp_servers.sequential-thinking]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]
startup_timeout_sec = 30
Comment on lines 38 to +64
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 startup_timeout_sec not added to merge-mcp-config.js — fix will be reverted on next update

The companion script scripts/codex/merge-mcp-config.js maintains its own ECC_SERVERS definitions (lines 86–100) that are used to add or update MCP server configs. None of the dlxServer(...) calls for playwright, context7-mcp, memory, sequential-thinking, or github include startup_timeout_sec:

playwright: dlxServer('playwright', '@playwright/mcp@latest'),
'context7-mcp': dlxServer('context7-mcp', '@upstash/context7-mcp'),
memory: dlxServer('memory', '@modelcontextprotocol/server-memory'),
'sequential-thinking': dlxServer('sequential-thinking', ...),
github: { fields: { command: 'bash', ... }, toml: ... }

This creates two problems:

  1. --update-mcp reverts the fix: When users run node merge-mcp-config.js <config.toml> --update-mcp, removeServerFromText strips each section and re-appends it from ECC_SERVERS, which has no startup_timeout_sec. The timeout fix is silently lost.

  2. Add-only mode emits drift warnings: configDiffers() compares the user's existing config against spec.fields. Because startup_timeout_sec is now in config.toml but not in spec.fields, every affected server will trigger a WARNING: mcp_servers.<name> differs from ECC recommendation message, even though the user's config is intentionally better.

merge-mcp-config.js should be updated to include startup_timeout_sec in each relevant server's extraFields and extraToml, similar to how supabase already does it (line 87):

startup_timeout_sec: 30,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 1e44475 — synced startup_timeout_sec into merge-mcp-config.js ECC_SERVERS for all five command-based servers. Additionally, extracted a shared constant DEFAULT_MCP_STARTUP_TIMEOUT_SEC in commit 78c98dd to prevent future divergence.


# Additional MCP servers (uncomment as needed):
# [mcp_servers.supabase]
Expand Down
12 changes: 6 additions & 6 deletions scripts/codex/merge-mcp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ function dlxServer(name, pkg, extraFields, extraToml) {
/** Each entry: key = section name under mcp_servers, value = { toml, fields } */
const 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'),
'context7-mcp': dlxServer('context7-mcp', '@upstash/context7-mcp'),
playwright: dlxServer('playwright', '@playwright/mcp@latest', { startup_timeout_sec: 30 }, 'startup_timeout_sec = 30'),
'context7-mcp': dlxServer('context7-mcp', '@upstash/context7-mcp', { startup_timeout_sec: 30 }, 'startup_timeout_sec = 30'),
exa: {
fields: { url: 'https://mcp.exa.ai/mcp' },
toml: `[mcp_servers.exa]\nurl = "https://mcp.exa.ai/mcp"`
},
github: {
fields: { command: 'bash', args: ['-lc', GH_BOOTSTRAP] },
toml: `[mcp_servers.github]\ncommand = "bash"\nargs = ["-lc", ${JSON.stringify(GH_BOOTSTRAP)}]`
fields: { command: 'bash', args: ['-lc', GH_BOOTSTRAP], startup_timeout_sec: 30 },
toml: `[mcp_servers.github]\ncommand = "bash"\nargs = ["-lc", ${JSON.stringify(GH_BOOTSTRAP)}]\nstartup_timeout_sec = 30`
},
memory: dlxServer('memory', '@modelcontextprotocol/server-memory'),
'sequential-thinking': dlxServer('sequential-thinking', '@modelcontextprotocol/server-sequential-thinking')
memory: dlxServer('memory', '@modelcontextprotocol/server-memory', { startup_timeout_sec: 30 }, 'startup_timeout_sec = 30'),
'sequential-thinking': dlxServer('sequential-thinking', '@modelcontextprotocol/server-sequential-thinking', { startup_timeout_sec: 30 }, 'startup_timeout_sec = 30')
};

// Append --features arg for supabase after dlxServer builds the base
Expand Down