You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Load MCP servers asynchronously to not block startup #20755
MCP clients (especially remote ones like exa, grep_app, context7) are loaded synchronously during OpenCode startup, blocking the UI from appearing. Users wait 2-3+ seconds before seeing anything.
Solution
Load MCP clients asynchronously after the main UI is ready, rather than blocking startup. If an MCP client is not yet connected when a tool is used, it should either:
Connect lazily when first needed, OR
Show a "connecting..." status and not block the UI
Startup delay data (from logs)
exa (remote): ~2s (OAuth discovery + connection)
grep_app (remote): ~624ms
context7 (remote): ~471ms
Workaround
Users can disable remote MCP clients in config, but this defeats the purpose of having them installed.
No issue template was used. Please resubmit using one of the three required templates: Bug Report, Feature Request (title must start with [FEATURE]:), or Question. This issue appears to be either a bug report or a feature request — please pick the appropriate template and fill in the required fields.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
changed the title [-]MCP servers block startup - should load asynchronously[/-][+][FEATURE]: Load MCP servers asynchronously to not block startup[/+]on Apr 2, 2026
Thanks for updating the issue! It now meets our contributing guidelines — great write-up with the specific timing data. The feature request is clear and well-structured.
One concern is that async / lazy load might affect stability and cache rates as MCP servers injects instructions and tool definitions to the agent. It is the best to start a session with all MCPs loaded. I think lately they made a partial fix by showing a spinner at start up. At least the UX is better.
Activity
github-actions commentedon Apr 2, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:), or Question. This issue appears to be either a bug report or a feature request — please pick the appropriate template and fill in the required fields.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
ccfontes commentedon Apr 2, 2026
opencode created this issue on its own initiative ^^' but i guess it's fine..
[-]MCP servers block startup - should load asynchronously[/-][+][FEATURE]: Load MCP servers asynchronously to not block startup[/+]github-actions commentedon Apr 2, 2026
Thanks for updating the issue! It now meets our contributing guidelines — great write-up with the specific timing data. The feature request is clear and well-structured.
Arcadi4 commentedon May 27, 2026
One concern is that async / lazy load might affect stability and cache rates as MCP servers injects instructions and tool definitions to the agent. It is the best to start a session with all MCPs loaded. I think lately they made a partial fix by showing a spinner at start up. At least the UX is better.
Fix #110: probe-gate OPENCODE_ENABLE_EXA on --net + drop training-pat…
github-actions commentedon Jul 27, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
devinder-augur commentedon Sep 27, 2026
Hi is there a workaround for this? It takes 18s of coldstart sometimes