I have observed that the more `mcp_servers` I configure in `config.toml`, the slower the VSCode extension becomes at performing initial tasks. It seems that each additional MCP causes the extension to delay, is likely to initialize all of them on startup.

Resolved 💬 1 comment Opened Sep 27, 2025 by Beowulfwar Closed Sep 28, 2025

What version of the VS Code extension are you using?

Version 0.4.15

Which IDE are you using?

cursor

What platform is your computer?

Windows 11 + wsl

What steps can reproduce the bug?

Steps to Reproduce

  1. Add a few MCP server entries in ~/.codex/config.toml (e.g. supabase, github, filesystem, context7, http).
  2. Open VSCode and let the extension start.
  3. Measure any delay in initial responsiveness, e.g. when opening a file, autocompletion, or invoking a prompt.
  4. Remove or comment out some MCP entries and see that startup is faster.

Expected Behavior

The extension should lazily initialize or load only the MCP servers that are needed for a given operation, rather than pre-loading all servers on startup.

Observed Behavior

All configured MCP servers appear to be started or checked upfront, resulting in a noticeable overhead/delay before the extension becomes responsive.

Impact

  • Slower developer experience
  • Scalability issue when many MCPs are used
  • Discourages using many small specialized MCPs due to performance penalty

Suggested Improvements

  • Lazy loading / on-demand initialization of MCP servers
  • Caching of MCP server status across sessions
  • Configurable startup order or priority
  • Ability to disable MCPs per workspace or prompt scope

---

Environment

  • Codex VSCode extension version: [insert version]
  • OS: [ Windows + wsl ubuntu]
  • npx version: [10.9.3]
  • Sample config.toml snippet:

```toml
[mcp_servers.supabase]
command = "npx"
args = ["-y",
"@supabase/mcp-server-supabase@latest",
"--access-token","SUPABASE_KEY"]
env = { "SUPABASE_KEY" = "key" }

[mcp_servers.railway]
command = "npx"
args = ["-y", "@railway/mcp-server"]

[mcp_servers.vercel]
command = "npx"
args = ["mcp-remote", "https://mcp.vercel.com"]

[mcp_servers.github]
command = "docker"
args = [
"run",
"-i",
"--rm",
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
]
env = { "GITHUB_PERSONAL_ACCESS_TOKEN" = "key" }

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

[mcp_servers.http]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-http", "--transport", "stdio"]

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

What is the expected behavior?

<img width="739" height="1013" alt="Image" src="https://github.com/user-attachments/assets/0b9ef37b-5654-46a6-adf8-bc31003c9d06" />

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗