Claude shows "Could not attach to MCP server fetch"
Closed this issue · 5 comments
Taking the new fetch server for a spin and having some difficulty loading it locally.
My claude_desktop_config.json is below.
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
},
"fetch": {
"command": "/Users/sean/.local/bin/uvx",
"args": ["mcp-server-fetch"]
}
}
}
Needed to provide absolute path to uvx
. Without that, I get a separate "Could not connect to MCP server fetch". I'm assuming that's a function of how I have it installed so not worried about that.
Connecting via the inspector doesn't seem to have any issues:
npx -y @modelcontextprotocol/inspector uvx mcp-server-fetch
Is there any logging in Claude Desktop I can enable to provide more details on the error?
Very odd! Can you try the debugging steps here and see if that reveals any information?
I'm having the same issue, this is what I'm getting:
2024-11-25T21:14:11.495Z [error] Error in MCP connection to server fetch: Error: spawn uvx ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn uvx',
path: 'uvx',
spawnargs: [Array]
}
2024-11-25T21:14:11.495Z [error] Could not start MCP server fetch: Error: spawn uvx ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn uvx',
path: 'uvx',
spawnargs: [Array]
}
@jspahrsummers thanks for the pointer! That showed me the exact problem:
Because the current Python version (3.9.6) does not satisfy Python>=3.10
@davepeckjr - The error you are seeing was the same one I had when I saw the slightly different "Could not connect to MCP server fetch", and I had to put in the absolute path into my config. Are you seeing the error say connect or attach in your error?
I also had the same issue that needed a full path for uvx
, it could be an issue related to how you install uv
. The following works for me,
brew install uv
Make sure,
~$ which upx
/opt/homebrew/bin/upx
~$ which uvx
/opt/homebrew/bin/uvx
~$
Yep, I had to hardcode both my uvx path and my python interpreter path into the config (using which
to figure out both).
{
"mcpServers": {
"fetch": {
"command": "/path/to/uvx",
"args": ["--python", "/path/to/python", "mcp-server-fetch"]
}
}
}