Skip to content

Claude Desktop invokes MCP server docker image twice on startup #812

Description

@tianzhou

claude_desktop_config.json

{
  "mcpServers": {
    "dbhub": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "bytebase/dbhub",
        "--transport",
        "stdio",
        "--dsn",
        "postgresql://postgres:[email protected]:5432/postgres?sslmode=disable"
      ]
    }
  }
}

When Claude Desktop starts, it starts the docker image twice:

CONTAINER ID   IMAGE            COMMAND                  CREATED              STATUS              PORTS                                       NAMES
460f37945bcc   bytebase/dbhub   "node dist/index.js …"   About a minute ago   Up About a minute   8080/tcp                                    charming_brown
1426b40ffdb6   bytebase/dbhub   "node dist/index.js …"   About a minute ago   Up About a minute   8080/tcp                                    goofy_chaplygin
271a297fe72a   postgres:15      "docker-entrypoint.s…"   26 hours ago         Up 26 hours         0.0.0.0:5432->5432/tcp, :::5432->5432/tcp   Stackbricks-PG-15-Local-Test-7960b0

This means if I specify the --name dbhub in docker run, the 2nd invocation will fail due to image name conflict.

I know it may not be the best place to report this bug as it seems to be a Claude Desktop bug. But it's on the CUJ when building the MCP server. I did file the bug via the Claude Desktop support link. But the format doesn't allow me to provide detailed info. So I submit here as well.

The repo: https://github.com/bytebase/dbhub/

Activity

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

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