Skip to content

MCP Inspector Connection Error with FastMCP on Windows 11 #831

@1abhi6

Description

@1abhi6

Hi team,

I am testing FastMCP with MCP Inspector and facing a connection issue.
Here are my setup details:

  • OS: Windows 11

  • Python: >=3.13

  • Dependencies:

    requires-python = ">=3.13"
    dependencies = [
        "fastmcp>=2.12.4",
    ]
  • Node.js: v22.20.0

  • NPM: 10.9.3

  • uv: 0.8.22

  • MCP Transport: stdio

Steps I tried

  1. Ran:

    uv run fastmcp dev main.py
  2. MCP Inspector opened at: http://localhost:6274/

  3. When I click the Connect button in Inspector, I get:

    Connection Error - Check if your MCP server is running and proxy token is correct
    

I also checked a similar issue here: [modelcontextprotocol/inspector#724](#724), but the suggestions didn’t solve the problem.

My code:

from fastmcp import FastMCP
import random

# Create MCP server instance
mcp = FastMCP("Testing MCP Inspector")


# Roll a dice tool
@mcp.tool
def roll(n_dice: int = 1) -> list[int]:
    """Roll n_dice 6 sided dice and return the result"""
    return [random.randint(1, 6) for _ in range(n_dice)]


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


if __name__ == "__main__":
    mcp.run()

MCP Inspector Snapshot:

Image

Expected Behavior

Inspector should connect successfully to the FastMCP server.

Actual Behavior

Inspector shows a Connection Error even though the server starts.

Question

Is this a bug with FastMCP on Windows 11, or am I missing any extra configuration for Inspector to connect properly?

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