-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Open
Labels
Description
Description
When configuring a local MCP server using bun x or bun run on Windows, OpenCode fails with MCP error -32000: Connection closed.
"mcp": {
"exa_search": {
"type": "local",
"enabled": true,
"command": [
"bun",
"x",
"-y",
"exa-mcp-server"
],
"env": {
"EXA_API_KEY": "####"
}
}
}
This is what is output in debug logs:
ERROR 2026-01-05T19:30:57 +75ms service=mcp key=exa_search command=["bun","x","-y","exa-mcp-server"] cwd=C:\Users####\OpenCode error=MCP error -32000: Connection closed local mcp startup failed
Note: bun will install when run outside of OpenCode .
Installing Node.js and using ["npx", "-y", "exa-mcp-server"] resolves the issue because Node does not pollute the stdout pipe with startup logs.
Plugins
No response
OpenCode version
1.1.3
Steps to reproduce
- Install exa-mcp-server via Bun.
- Configure opencode.jsonc using ["bun", "x", "exa-mcp-server"]
- Run opencode run --print-logs --log-level=DEBUG "hi"
- Observe the -32000 error in debug logs.
Screenshot and/or share link
Operating System
Windows 11
Terminal
Windows Terminal
Reactions are currently unavailable