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
Stdio handshake timeout with npx local MCPs (env expansion suspect) #12229
Local MCP servers using npx hang/time out in OpenCode. opencode mcp list shows 60s timeouts for local stdio MCPs, while running the same npx commands manually works. Suspect stdio handshake or env expansion issue ("${TOKEN}" passed literally).
Environment
OS: Linux
OpenCode: 1.1.51
Transport: local stdio (npx)
Repro
Configure local MCP servers with command: [\"npx\", \"-y\", \"@modelcontextprotocol/server-filesystem\", \"/home/user\"]
Run opencode mcp list
Observe timeouts for local servers
Observed
filesystem: Operation timed out after 60000ms
memory: Operation timed out after 60000ms
sequential-thinking: Operation timed out after 60000ms
everything: Operation timed out after 60000ms
github: Operation timed out after 10000ms
brave-search: Operation timed out after 10000ms
Remote MCPs (context7) and local python server (neogsd_triad) connect fine.
Expected
Local MCPs should connect and register tools, as they do when run directly with npx.
Notes
npx -y @modelcontextprotocol/server-filesystem /home/user runs fine manually.
Previously, bunx produced Connection closed; npx now times out.
Config includes env var placeholders like ${GITHUB_TOKEN}, possible expansion issue.
Activity
github-actions commentedon Feb 5, 2026
This issue might be a duplicate of existing issues. Please check:
opencodehang. #3273: MCP client failing makes opencode hang (related timeout/hang behavior)Feel free to ignore if none of these address your specific case.
github-actions commentedon Apr 7, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.