Skip to content

bug: [Windows] empty console windows pop up for every stdio MCP server spawned #3856

Description

@realBikto

Checks

Operating system

Windows 11 Pro, build 26200

Expected behaviour

When an agent (or subagent) initializes its stdio MCP servers on Windows, the server processes should start silently in the background. No visible console windows should appear.

Actual behaviour

On Windows, every stdio MCP server that is launched opens an empty console
window that stays open for the whole lifetime of the server process. The
windows are always blank because the child process's stdin/stdout are piped to
the CLI, so nothing is ever rendered.

One blank window opens per server. When an agent defines multiple MCP servers,
one window opens for each. For example, an agent that defines 9 database MCP
servers produces up to 9 blank windows on a single launch, and subagent
workflows multiply this because several agents each spin up their own servers.

The MCP launcher here is uv/uvx 0.11.23, a native x86_64-pc-windows-msvc .exe
(NOT a .cmd/.bat shim), so the windows are not caused by cmd.exe running a batch
wrapper. They appear even with a native console executable, which points at the
process creation flags used by the CLI when spawning MCP children: they seem to
be spawned without the Win32 CREATE_NO_WINDOW (0x08000000) flag.

Suggested fix: when spawning stdio MCP server child processes on Windows, pass
the CREATE_NO_WINDOW creation flag. In Rust:

    #[cfg(windows)]
    {
        use std::os::windows::process::CommandExt;
        const CREATE_NO_WINDOW: u32 = 0x0800_0000;
        command.creation_flags(CREATE_NO_WINDOW);
    }
Recording_2026-07-01.mp4

Steps to reproduce

1. On Windows, configure an agent with one or more stdio MCP servers, e.g.:

   {
     "name": "repro",
     "mcpServers": {
       "db1": { "command": "uvx", "args": ["postgres-mcp"], "env": { "DATABASE_URI": "postgresql://..." } },
       "db2": { "command": "uvx", "args": ["postgres-mcp"], "env": { "DATABASE_URI": "postgresql://..." } }
     },
     "tools": ["@builtin", "@db1", "@db2"]
   }

2. Start a chat with that agent (or trigger a subagent that uses it).
3. Watch the MCP servers initialize.

Result: one empty console window pops up per MCP server and stays open until the
server shuts down.

Environment

[q-details]
version = "2.10.0"
hash = "4a65c7cfb5e508a487638f1dccd5675b442e57f3"
date = "2026-06-25T19:15:58Z"

[system-info]
os = "Windows 11 Pro - build 26200"
chip = "13th Gen Intel(R) Core(TM) i7-13700H"
total-cores = 14
memory = "63.68 GB"

[environment]
cli-path = 'C:\Users\...\AppData\Local\Kiro-Cli\kiro-cli.exe'

[mcp-launcher]
uv = "0.11.23 (x86_64-pc-windows-msvc)"
transport = "stdio"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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