Description
When running local MCP servers on Windows using StdioClientTransport, the process often fails to connect or ignores injected environment variables. This happens because Node.js child_process.spawn requires an explicit shell to handle certain commands and environment context on Windows.
Plugins
None / Standard
OpenCode version
1.14.39
Steps to reproduce
1- Open opencode.json on a Windows machine.
2- Add a local MCP server configuration that includes an environment block (e.g., a WordPress MCP server).
3- Use a direct command like node or npx in the command array.
4- Attempt to list or connect to the server using opencode mcp list.
5- Observe that the connection fails or environment variables are ignored because the process is spawned without a native shell context.
Screenshot and/or share link
No response
Operating System
WIndows 11
Terminal
warp
Description
When running local MCP servers on Windows using StdioClientTransport, the process often fails to connect or ignores injected environment variables. This happens because Node.js child_process.spawn requires an explicit shell to handle certain commands and environment context on Windows.
Plugins
None / Standard
OpenCode version
1.14.39
Steps to reproduce
1- Open opencode.json on a Windows machine.
2- Add a local MCP server configuration that includes an environment block (e.g., a WordPress MCP server).
3- Use a direct command like node or npx in the command array.
4- Attempt to list or connect to the server using opencode mcp list.
5- Observe that the connection fails or environment variables are ignored because the process is spawned without a native shell context.
Screenshot and/or share link
No response
Operating System
WIndows 11
Terminal
warp