Skip to content

Docker MCP gateway connects but LLM cannot recognize/invoke the MCP server on macOS #26357

Closed as not planned

Description

@bin-r00t

Bug description

When configuring a Docker MCP gateway server in opencode.json, the connection to the Docker MCP gateway is established successfully (no ENOENT or connection errors), but the LLM in opencode-desktop cannot see or invoke the MCP tools/resources provided by the gateway. The configured tools never appear in the LLM's tool-call context, effectively making the MCP server invisible to the model.

Steps to reproduce

  1. Install opencode-desktop on macOS (Apple Silicon M2)
  2. Configure a Docker-based MCP gateway in opencode.json:
    {
      "mcp": {
        "docker-gateway": {
          "type": "local",
          "command": [
            "/usr/local/bin/docker",
            "mcp",
            "gateway",
            "run"
          ],
          "enabled": true
        }
      }
    }
  3. Launch opencode-desktop
  4. The log/status shows the MCP gateway as connected — no startup errors
  5. Ask the LLM to use a tool that should be provided by this MCP server
  6. Observe that the LLM has no knowledge of the MCP tools — it responds as if the MCP server doesn't exist

Expected behavior

Once the Docker MCP gateway connects successfully, the LLM should be able to discover and invoke the tools/resources exposed by that MCP server, just as it can with non-Docker local MCP servers.

Actual behavior

  • The MCP gateway appears to connect (no errors in logs)
  • But the LLM never receives the tool/resource definitions from this MCP server
  • The LLM has no awareness of the MCP-provided capabilities
  • Other (non-Docker) MCP servers in the same config work correctly

Environment

  • OS: macOS (Apple Silicon M2)
  • OpenCode Desktop: latest version on macOS
  • Docker: Docker Desktop for macOS
  • opencode.json config:
    {
      "mcp": {
        "docker-gateway": {
          "type": "local",
          "command": [
            "/usr/local/bin/docker",
            "mcp",
            "gateway",
            "run"
          ],
          "enabled": true
        }
      }
    }

Additional context

The issue seems specific to Docker-based MCP gateways on macOS. The connection handshake succeeds (transport-level), but the tool/resource discovery phase (typically via tools/list or similar) doesn't seem to propagate to the LLM context. This may be related to how the Desktop app on macOS handles stdio communication with processes that themselves act as gateways/proxies to other MCP servers (nested MCP architecture).

The same Docker MCP gateway works when tested directly from the terminal (via docker mcp gateway run), confirming it's not a Docker setup issue.

Activity

  1. bin-r00t commented on May 8, 2026

    @bin-r00t
    Author

    opencode-desktop (1.14.41)
    opencode tui (1.14.41)

  2. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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