Skip to content

Error Connecting to MCP Inspector Proxy - Check Console logs #484

Closed

Description

@Vineetttt30

Image

Its just a simple MCP Server.
main.py

# server.py
from mcp.server.fastmcp import FastMCP

# Create an MCP server
mcp = FastMCP("Demo")


# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
    """Add two numbers"""
    return a + b


# Add a dynamic greeting resource
@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
    """Get a personalized greeting"""
    return f"Hello, {name}!"

Startup commands tried:

npx @modelcontextprotocol/inspector uv run main.py
mcp dev server.py

Console has no errors:

Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀

How to resolve this ?

Activity

  1. Vineetttt30 commented on Jun 4, 2025

    @Vineetttt30
    Author

    How to resolve this ? Any alternate approach ?

  2. vitaliy-sharandin commented on Jun 9, 2025

    @vitaliy-sharandin

    I did not have proxy error, yet still couldn't connect to mcp server. Try switching browser to DuckDuckGo or VSCode Simple Browser. Created and issue for this problem. #499

  3. Codecaver commented on Jun 13, 2025

    @Codecaver

    How to resolve this ? Any alternate approach ?

    I don't know how you run the inspector.
    I deployed the inspector in k8s for the first time, and then used the nodeport type service to access port 6274. This error was also reported:
    Error Connecting to MCP Inspector Proxy - Check Console logs

    I found that the inspector would call port 6277. It cannot be called normally using the nodeport type. So I modified my deployment without service:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: inspector
      labels:
        app: inspector
    spec:
      replicas: 1  
      selector:
        matchLabels:
          app: inspector
      template:
        metadata:
          labels:
            app: inspector
        spec:
          hostNetwork: true
          containers:
          - name: inspector
            image: ghcr.io/aaronpowell/inspector:latest
            ports:
            - containerPort: 6274
              name: port-6274
            - containerPort: 6277
              name: port-6277
    

    This method is normal. Similarly, you can also use docker to deploy inspector:
    docker run --rm --network host -p 6274:6274 -p 6277:6277 ghcr.io/aaronpowell/inspector:latest

    The key to the problem is that the inspector needs to call port 6277. I use the host network and it's normal

  4. hesreallyhim commented on Jun 25, 2025

    @hesreallyhim

    I am running into this problem, as far as I know since the protocol update - I can't connect to anything without DANGEROUSLY_OMIT_AUTH - the first thing it does it sends a message to /health, which responds with an HTML response (200 OK), and then it breaks because it can't parse that as a message.

  5. cromulus commented on Jun 27, 2025

    @cromulus

    Same issue, even omitting auth doesn't help. the /health and /config endpoints for the inspector fail.

  6. sebastus commented on Jul 7, 2025

    @sebastus

    Same. Here are some additional details from my console logs:

    Failed to connect to MCP Server via the MCP Inspector Proxy: http://localhost:6277/mcp?url={my server host}/mcp&transportType=streamable-http: McpError: MCP error -32001: Error POST'ing to endpoint (HTTP 503): upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: 111

    and

    McpError: MCP error -32001: Error POSTing to endpoint (HTTP 503): upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: 111

    The network trace shows two calls to the /health endpoint and two to Initialize.

    I have a container image that actually works correctly. It's from a couple of weeks ago. It has mcp/python-sdk v1.9.5.dev in it. I just tried 1.9.4 - but it doesn't work either.

  7. GoodGuyGregory commented on Aug 27, 2025

    @GoodGuyGregory

    any updates on this?

  8. hesreallyhim commented on Aug 27, 2025

    @hesreallyhim

    this was resolved for me a few releases ago i think @GoodGuyGregory you are still having this problem with inspector@latest? i closed out the issue i opened (ok well i indicated it was fixed, i just closed it out a minute ago #561 )

  9. GoodGuyGregory commented on Aug 27, 2025

    @GoodGuyGregory

    I was able to resolve the issue by just changing the versions of fastmcp and mcp[cli]

    [project]
    name = "mcp-core-primitives"
    version = "0.1.0"
    description = "Add your description here"
    readme = "README.md"
    requires-python = ">=3.13"
    dependencies = [
        "fastmcp==2.10.1",
        "mcp[cli]==1.10.1",
    ]
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions