Skip to content

Claude Code to MCP Toolkit is timing out. #336

@jsonlehman

Description

@jsonlehman

I have been trying to connect claude code v2.1.5 on a Mac. It shows up in the list of mcps, tries to connect but then responds with red x. When I look in ~/.claude/debug/latest I see 'MCP server "MCP_DOCKER" Connection failed: Connection to MCP server "MCP_DOCKER" timed out after 30000ms'.

But if I run docker mcp gateway run on the command line no issues.

When I ask Claude Code what is going on it runs the command docker mcp gateway run and says that Docker is responding in a format that Claude Desktop can handle but Claude Code expects JSON-RPC 2.0 protocol.

I used the button in docker desktop to connect to claude code and I see that it adds the following to my ~/.claude.json

  "mcpServers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": [
        "mcp",
        "gateway",
        "run"
      ]
    }
  }

I even tried it this way but didn't make a difference.

  "mcpServers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": [
        "mcp",
        "gateway",
        "run"
      ],
      "type": "stdio"
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions