Skip to content

Docker MCP not working #6284

Closed as not planned
Closed as not planned

Description

@Patrick-Erichsen

Before submitting your bug report

Relevant environment info

macOS: Sequoia 15.4.1
VSCode version: 1.101.1
Continue extension version: 1.0.14


name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: Ollama
    provider: ollama
    model: AUTODETECT
    apiBase: http://localhost:11434
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase
mcpServers:
  - name: MCP_DOCKER
    command: docker
    args:
      - mcp
      - gateway
      - run

Description

https://discord.com/channels/1108621136150929458/1385559180685086780

Hi,
today I wanted to test Docker Desktop's MCP Toolkit in combination with Continue. I connected Continue in my VSCode with Docker and installed two sample MCP servers.
Continue recognizes the new MCP server in the config.yaml as MCP_DOCKER. But in the MCP tab, it shows the error:

Failed to connect to "MCP_DOCKER" Error: MCP error -32000:
Connection closed Process output: STDERR: reading registry: reading registry.yaml: SHOME is not defined

I don't know where to fix that. The sample MCP servers I took (DuckDuckGo and Fetch (Reference)) have no configuration options in Docker.
When I tested this setup, but with Claude instead of Continue, it instantly worked, so my guess is that I missed some configuration in Continue, but what?

Thanks for the help!

To reproduce

No response

Log output

Activity

  1. added
    area:mcp
    ide:vscode
    kind:bug
    os:mac
    on Jun 24, 2025
  2. Lucidpaper commented on Jun 26, 2025

    @Lucidpaper

    mcpServers:

    • name: MCP_DOCKER
      command: docker
      args:
      • run
      • -i
      • --rm
      • alpine/socat
      • STDIO
      • TCP:host.docker.internal:8811

    worked for me instead of

    mcpServers:

    • name: MCP_DOCKER
      command: docker
      args:
      • mcp
      • gateway
      • run
  3. abbrechen commented on Jun 26, 2025

    @abbrechen

    @Lucidpaper Thanks for your alternative. It solved the undefined $HOME error.
    I was wondering why you have used port 8811 instead of the 11434. I tried both and with the default port, on which my ollama is running on, the number of errors has been reduced to one: Failed to connect to "MCP_DOCKER" Error: MCP error -32000. Google says that this error is known for a wrong protocol when connecting a MCP client to a server. Turns out, my ollama just has a REST API, but no special one for MCP servers.

    In the next days, I will try to find a way of running an ollama-mcp server in Docker. One option could be this npm package: https://github.com/rawveg/ollama-mcp

    But overall, seems to be an ollama problem, but a Continue.dev problem.

  4. mkschl commented on Jun 26, 2025

    @mkschl

    I just added this to the default config:

    env: {
          HOME: "/Users/<your user folder>"
    }

    It works for Docker MCP servers that do not have a configuration like connection string or access tokens

  5. HankLeo commented on Jun 27, 2025

    @HankLeo

    Thanks @mkschl , it works to me by adding ENV $HOME in the ~/.continue/config.yaml

    mcpServers:
      - name: Docker MCP
        command: docker
        args:
          - "mcp"
          - "gateway"
          - "run"
        env: {
          HOME: "/Users/xxx" # Replace with your home directory
        }
  6. abbrechen commented on Jun 27, 2025

    @abbrechen

    @mkschl Thanks! Defining HOME solved all the problems. All MCP server could be founded.

    Image

    My config looks like the one from @HankLeo - the standard MCP server config that has been added by Docker Desktop + the environment adjustment.
    But why is it solving it? What happens under the hood that the user path is crucial? And if that config snippet is needed, Docker Desktop should add it automatically.

  7. mkschl commented on Jun 27, 2025

    @mkschl

    The issue is continue starts a subprocess and the environment variables from the parent process seem not be shared to it. This issue has nothing to do with Docker Desktop:). But the docker command needs to have access to its ~/.docker/mcp/ folder, where all the configuration are stored

  8. Patrick-Erichsen commented on Jun 30, 2025

    @Patrick-Erichsen
    ContributorAuthor

    @mkschl I think that was resolved with #6157

    This is still an issue for folks on latest release?

  9. ramkumarar commented on Jul 6, 2025

    @ramkumarar

    Tried this in windows (with WSL running dockers) with both intellij and vscode. Faced following error. I can run docker run mcp from windows command line and it works fine but plugin gives the error

    Failed to connect to "MCP_DOCKER" Error: MCP error -32000: Connection closed Process
    output: STDERR: docker: unknown command: docker mcp Run 'docker --help' for more
    information

    My configuration:

    mcpServers:
      - name: MCP_DOCKER
        command: docker
        args:
          - mcp
          - gateway
          - run
        env:
          HOME: "C:\\Users\\<username>"
  10. thepirateclub commented on Jul 19, 2025

    @thepirateclub

    @ramkumarar

    Tried this in windows (with WSL running dockers) with both intellij and vscode. Faced following error. I can run docker run mcp from windows command line and it works fine but plugin gives the error

    Failed to connect to "MCP_DOCKER" Error: MCP error -32000: Connection closed Process
    output: STDERR: docker: unknown command: docker mcp Run 'docker --help' for more
    information

    (for windows)

    I'm found a solution to this problem. The problem was linked to docker-cli and its environment variables. - docker/cli#6145.

    This problem was solved by adding these lines to the env section:

    env: {
          "HOME": "C:\\Users\\<your user>",
          "PROGRAMFILES": "C:\\Program Files",
          "ProgramData": "C:\\Program Files",
        }
  11. jtabox commented on Aug 6, 2025

    @jtabox

    env: {
    "HOME": "C:\Users\",
    "PROGRAMFILES": "C:\Program Files",
    "ProgramData": "C:\Program Files",
    }

    Shouldn't the ProgramData key actually have ProgramData (C:\\ProgramData) as value?

  12. TyroneNel commented on Nov 4, 2025

    @TyroneNel

    This worked for me on vs code continue win 10

    name: MCP_DOCKER
    version: 0.0.1
    schema: v1
    mcpServers:
      - name: MCP_DOCKER
        command: docker
        args:
          - mcp
          - gateway
          - run
        env:
          HOME: "C:\\Users\\XXX"
          PROGRAMFILES: "C:\\Program Files"
          ProgramData: "C:\\Program Files"
  13. github-actions commented on Feb 3, 2026

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  14. github-actions commented on Feb 13, 2026

    @github-actions
    Contributor

    This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

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

Metadata

Metadata

Assignees

Labels

area:mcpide:vscodekind:bugos:macstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions