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.
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
- Add a few MCP server entries in
~/.codex/config.toml(e.g. supabase, github, filesystem, context7, http). - Open VSCode and let the extension start.
- Measure any delay in initial responsiveness, e.g. when opening a file, autocompletion, or invoking a prompt.
- 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.tomlsnippet:
```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_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗