-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Description
Copilot CLI ignores an explicitly configured MCP command and args in mcp.json and rewrites a Python stdio MCP server into a pipx run invocation.
Even though the configuration clearly specifies that the MCP server should be started using python -m <module>, Copilot CLI still detects the dotted module name and applies a heuristic that treats it as a pipx-installable CLI. As a result, the CLI overrides the user’s configuration and attempts to run the MCP server using pipx run, which breaks local, in-repo MCP servers that are not published as pipx packages.
MCP Configuration
{
"mcpServers": {
"example-mcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "example_mcp_server"],
"tools": ["*"]
}
}
}Copilot Logs
2026-02-10T13:32:04.318Z [ERROR] Converting Python module: example_mcp.server to pipx command
2026-02-10T13:32:04.319Z [ERROR] Starting MCP client for example_mcp with
command: pipx
args: run example_mcp.server
cwd: undefined
2026-02-10T13:32:04.319Z [ERROR] Starting MCP client for example_mcp with command: pipx and args: run example_mcp.server
2026-02-10T13:32:04.319Z [ERROR] Creating MCP client for example_mcp...
2026-02-10T13:32:04.322Z [ERROR] Connecting MCP client for example_mcp...
2026-02-10T13:32:04.344Z [INFO] No update needed, current version is 0.0.406, fetched latest release is v0.0.406
2026-02-10T13:32:04.363Z [ERROR] [mcp server example_mcp stderr] 'pipx' is not recognized as an internal or external command,
operable program or batch file.
2026-02-10T13:32:04.366Z [ERROR] MCP transport for example_mcp closed
2026-02-10T13:32:04.367Z [ERROR] Failed to start MCP client for example_mcp: McpError: MCP error -32000: Connection closed
Workaround
"command": "C:\\Python314\\python.exe"
I have to mention the full path to python.exe
Reactions are currently unavailable