Skip to content

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

Closed as not planned

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

Activity

  1. github-actions commented on May 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these, please add details clarifying what's different.

  2. github-actions commented on Jul 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions