Skip to content

VS Code always tries to run docker run ... github-mcp-server and fails, even though Docker is installed and command works manually #898

@nextmindb

Description

@nextmindb

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 into command and args instead of treating the whole docker run ... as a single executable.

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?

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions