servers icon indicating copy to clipboard operation
servers copied to clipboard

Timeout in client while connecting to MCP server on Windows

Open michaelfromyeg opened this issue 2 years ago • 5 comments

I see

693-110d9774cbce8f0f.js:18 Could not attach to MCP server sqlite: eE: MCP error -2: Request timed out
693-110d9774cbce8f0f.js:18 Could not attach to MCP server filesystem: eE: MCP error -2: Request timed out

Despite MCP logs with

2024-11-27T07:00:20.484Z [info] Attempting to connect to MCP server sqlite...
2024-11-27T07:00:20.487Z [info] Attempting to connect to MCP server filesystem...
2024-11-27T07:00:20.507Z [info] Connected to MCP server sqlite!
2024-11-27T07:00:20.514Z [info] Connected to MCP server filesystem!

I ran the inspector fine but that didn't really add much clarity. Seems like a client issue? Posting for visibility in case other folks are seeing the same thing.

michaelfromyeg avatar Nov 27 '24 07:11 michaelfromyeg

I can successfully call "list tools" from the inspector so everything seems OK on the server end! Here's my setup for the sqlite tool

Here's my config. At C:\Users\username\AppData\Roaming\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "sqlite": {
      "command": "C:\\ProgramData\\chocolatey\\bin\\uvx.exe",
      "args": [
        "mcp-server-sqlite",
        "--db-path",
        "C:\\Users\\username\\test.db"
      ]
    },
    "filesystem": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": [
        "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "~"
      ]
    }
  }
}

The servers show up in the app fine.

michaelfromyeg avatar Nov 27 '24 07:11 michaelfromyeg

+1, able to replicate here as well for any servers in windows that rely on node.

gardener-chase avatar Nov 29 '24 20:11 gardener-chase

windows?? double“\” change to single“/” ,try it! I fix it by this way

jaydealo7 avatar Dec 01 '24 15:12 jaydealo7

Does this issue still occur for you with Claude Desktop v0.7.5?

jspahrsummers avatar Dec 03 '24 13:12 jspahrsummers

Hi @jspahrsummers, I think this is fixed! I'm using this config on Claude Desktop (latest? can't figure out how to see the version...) and it's working just fine. Note the servers are running on Windows, but I do most of my work on WSL (hence the weird file path).

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "\\\\wsl.localhost\\Ubuntu\\home"
            ]
        },
        "memory": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-memory"
            ]
        },
        "brave-search": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-brave-search"
            ],
            "env": {
                "BRAVE_API_KEY": ""
            }
        }
    }
}

michaelfromyeg avatar Jan 02 '25 19:01 michaelfromyeg