-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Description
When starting VS Code with MCP enabled, it always tries to run the following command:
docker run -i –rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
and shows the error:
The command “docker run -i –rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server” needed to run GitHub was not found.
What I tried
- Docker is installed and works fine (
docker --version
→ 28.3.0). - Running the exact same
docker run ...
command manually in the terminal works correctly. - I already set
GITHUB_PERSONAL_ACCESS_TOKEN
in my shell (~/.zshrc
), and verified it is available in the terminal. - I checked both
settings.json
and.vscode/mcp.json
in my workspace, but I cannot find where this default command is being set. - I even tried rewriting my
mcp.json
with"command": "docker"
and"args": [...]
, but the error persists.
Problem
It seems VS Code (or the Copilot MCP integration) is hardcoding docker run ...
as a single command string, instead of command: "docker"
+ args: [...]
.
Because of this, it cannot find the command, even though Docker is correctly installed.
Expected behavior
- VS Code should either:
- Use the configuration from
mcp.json
without overriding it, OR - Correctly split
docker
intocommand
andargs
instead of treating the wholedocker run ...
as a single executable.
- Use the configuration from
Environment
- macOS (Apple Silicon)
- Docker Desktop 28.3.0
- VS Code latest (with Copilot + MCP enabled)
- github-mcp-server v0.12.1
Question
How can I stop VS Code from auto-injecting this broken "docker run ..."
command, and instead use the correct configuration from my mcp.json
?
Is this a bug in the current github-mcp-server integration?

