Skip to content

When using through Docker container, can't connect from another machine using IP #788

@MekayelAnik

Description

@MekayelAnik

Describe the bug
When using through the Docker container, can't connect from another machine using IP

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the inspector using this Docker compose file:
services:
  mcp-inspector:
    image: ghcr.io/modelcontextprotocol/inspector:latest
    container_name: mcp-inspector
    ports:
      - "6274:6274"
      - "6277:6277"
    environment:
      - CLIENT_PORT=6274
      - SERVER_PORT=6277
      - MCP_PROXY_FULL_ADDRESS=http://10.7.7.211:6274
      - MCP_AUTO_OPEN_ENABLED=false
      - DANGEROUSLY_OMIT_AUTH=true
    hostname: mcp-inspector
    domainname: local
    restart: unless-stopped
    network_mode: host
  1. Try to acces the Inspector from browser using : http://10.7.7.211:6274 (FAILED)
  2. Curl: curl http://10.7.7.211:6274 RESULT: curl: (7) Failed to connect to 10.7.7.211 port 6274 after 0 ms: Could not connect to server
  3. Curl: curl http://localhost:6274 RESULT: returns html.

NOTE: The docker host is headless

Expected behavior
The WebUI should be accessible from any machine on local network

Logs

> @modelcontextprotocol/inspector@0.16.6 start

> node client/bin/start.js

Starting MCP inspector...

⚙️ Proxy server listening on localhost:6277

⚠️  WARNING: Authentication is disabled. This is not recommended.

🚀 MCP Inspector is up and running at:

   http://localhost:6274

Please help me if I need to change anything to make it work.

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