Skip to content

Bonjour resolution fails when Docker bridge interfaces exist (OrbStack/Docker Desktop) #142

@jake8302

Description

@jake8302

Problem

When Docker-related bridge network interfaces exist on macOS (e.g., bridge100, bridge101, bridge103 created by OrbStack or Docker Desktop), imcp-server fails to connect to the iMCP app. Bonjour resolves the service to a bridge interface instead of loopback, and the connection fails.

Error

From system logs (log show):

nw_socket_connect [C1.1.1.1:1] connectx(5 (guarded), [srcif=26, srcaddr=<private>, dstaddr=<private>], ...) failed: [49: Can't assign requested address]
nw_endpoint_flow_failed_with_error [C1.1.1.1 IPv4#c0e80937:61274 in_progress socket-flow (satisfied (Path is satisfied), interface: bridge101, scoped, ipv4)] already failing, returning

The key detail: interface: bridge101 — Bonjour is resolving the iMCP service to a Docker bridge interface instead of loopback/localhost.

Steps to Reproduce

  1. Install OrbStack (or Docker Desktop) — any tool that creates macOS bridge interfaces
  2. Start Docker containers (this creates bridge100+ interfaces)
  3. Launch iMCP
  4. Try to connect via imcp-server — no response, hangs indefinitely

Expected Behavior

imcp-server should connect to the iMCP app via loopback (127.0.0.1 / lo0), not through Docker bridge interfaces. Since both the app and CLI run on the same machine, Bonjour resolution should prefer loopback over bridge interfaces.

Workaround

If iMCP is started before Docker creates bridge interfaces, it sometimes works. But restarting iMCP while bridges exist always fails.

The only reliable workaround is stopping all Docker containers, restarting iMCP, then starting containers again — which isn't practical.

Related

This is likely related to #103 (Bonjour binding to all interfaces instead of localhost). Binding to 127.0.0.1 only would fix both the security concern in #103 and this connectivity issue.

Environment

  • macOS 26.3 (25D125)
  • iMCP 1.4.0
  • OrbStack (creates bridge100-102 interfaces)
  • Docker containers using bridge networking

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions