Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claude shows "Could not attach to MCP server fetch" #37

Closed
sean-lynch opened this issue Nov 25, 2024 · 5 comments
Closed

Claude shows "Could not attach to MCP server fetch" #37

sean-lynch opened this issue Nov 25, 2024 · 5 comments

Comments

@sean-lynch
Copy link
Contributor

sean-lynch commented Nov 25, 2024

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?

@jspahrsummers
Copy link
Member

Very odd! Can you try the debugging steps here and see if that reveals any information?

@davepeckjr
Copy link

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]
}

@sean-lynch
Copy link
Contributor Author

@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?

@zhaolongzhong
Copy link

zhaolongzhong commented Nov 25, 2024

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
~$ 

@sean-lynch
Copy link
Contributor Author

sean-lynch commented Nov 25, 2024

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"]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants