Skip to content

fix: local MCP servers fail on Windows without native shell context #25904

@ajpintos

Description

@ajpintos

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions