Skip to content

Server disconnected error #16

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

Open
ibagur opened this issue Mar 22, 2025 · 5 comments
Open

Server disconnected error #16

ibagur opened this issue Mar 22, 2025 · 5 comments

Comments

@ibagur
Copy link

ibagur commented Mar 22, 2025

My configuration is as follows:

System: macOS 15.3.2
Claude Desktop 0.8.1 (mac version)

I got other MCP servers running fine: 'brave-search', 'filesystem', etc.

I have followed the 'npx' installation instructions:

npx -y @smithery/cli install arxiv-mcp-server --client claude

This automatically creates this entry in the claude_desktop_config.json file, similar to other MCP servers I use through npx:

    "arxiv-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "run",
        "arxiv-mcp-server",
        "--config",
        "\"{\\\"storagePath\\\":\\\"'/Users/inigo/Documents/cursos/Data Science/master_viu/articulos'\\\"}\""
      ]
    }

When restarting Claude Desktop I get error:

MCP arxiv-mcp-server: Server disconnected

The contents of the log are as follows:

2025-03-22T19:39:18.787Z [arxiv-mcp-server] [info] Initializing server...
2025-03-22T19:39:18.804Z [arxiv-mcp-server] [info] Server started and connected successfully
2025-03-22T19:39:18.804Z [arxiv-mcp-server] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-03-22T19:39:19.374Z [arxiv-mcp-server] [info] Initializing server...
2025-03-22T19:39:19.381Z [arxiv-mcp-server] [info] Server started and connected successfully
2025-03-22T19:39:19.399Z [arxiv-mcp-server] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
[Runner] Connecting to server: { id: 'arxiv-mcp-server', connectionTypes: [ 'stdio' ] }
[Runner] Starting child process setup...
[Runner] Executing: {
  command: 'uv',
  args: [
    'run',
    'arxiv-mcp-server',
    '--storage-path',
    "'/Users/inigo/Documents/cursos/Data Science/master_viu/articulos'"
  ]
}
[Runner] Child process error: spawn uv ENOENT
[Runner] Failed to spawn child process - check if the command exists and is executable
[Runner] Final cleanup on exit
2025-03-22T19:39:19.968Z [arxiv-mcp-server] [info] Server transport closed
2025-03-22T19:39:19.968Z [arxiv-mcp-server] [info] Client transport closed
2025-03-22T19:39:19.969Z [arxiv-mcp-server] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log.
2025-03-22T19:39:19.969Z [arxiv-mcp-server] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) {"context":"connection"}
2025-03-22T19:39:19.969Z [arxiv-mcp-server] [info] Client transport closed
[Runner] Connecting to server: { id: 'arxiv-mcp-server', connectionTypes: [ 'stdio' ] }
[Runner] Starting child process setup...
[Runner] Executing: {
  command: 'uv',
  args: [
    'run',
    'arxiv-mcp-server',
    '--storage-path',
    "'/Users/inigo/Documents/cursos/Data Science/master_viu/articulos'"
  ]
}
[Runner] Child process error: spawn uv ENOENT
[Runner] Failed to spawn child process - check if the command exists and is executable
[Runner] Final cleanup on exit
2025-03-22T19:39:20.739Z [arxiv-mcp-server] [info] Server transport closed
2025-03-22T19:39:20.739Z [arxiv-mcp-server] [info] Client transport closed
2025-03-22T19:39:20.739Z [arxiv-mcp-server] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log.
2025-03-22T19:39:20.739Z [arxiv-mcp-server] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) {"context":"connection"}
2025-03-22T19:39:20.739Z [arxiv-mcp-server] [info] Client transport closed

Any idea on how to fix this issue? Thanks

@harshilvelotio
Copy link

I am also facing this exact issue

@ibagur
Copy link
Author

ibagur commented Mar 23, 2025

I managed to fix it as follows:

I followed the local installation with uv: uv tool install arxiv-mcp-server

uv and uvx were installed in my system using pipx. Normally, I can access them globally from Terminal but for some reason, the Claude Desktop configuration file was not able to run uv directly, so I had to specify the absolute path to uv (in fact it is actually a symlink that points to the pipx environment /Users/inigo/.local/bin/uv -> /Users/inigo/.local/pipx/venvs/uv/bin/uv, but the config file seems happy with the symlink as far it is an absolute path)

{
  "mcpServers": {
    "arxiv-mcp-server": {
      "command": "/Users/inigo/.local/bin/uv",
      "args": [
          "tool",
          "run",
          "arxiv-mcp-server",
          "--storage-path", "/Users/inigo/Documents/papers"
      ]
    }
  }
}

I guess if uv is installed globally in a direct way, it might not be needed to put the absolute path..but this is the way I had it originally in my system.

Hope it helps

UPDATE: I edited the comment as I mistakenly put the configuration for another MCP tool (the 'mcp fetch' tool) instead of the 'arxiv MCP'

@shizhediao
Copy link

I am also using Claude and I find this one works for me:

"arxiv-mcp-server": {
    "command": "/Users/sdiao/.local/bin/uv",
    "args": [
        "--directory",
        "/Users/sdiao/Downloads/arxiv-mcp-server",
        "run",
        "arxiv-mcp-server",
        "--storage-path", "/Users/sdiao/Downloads/papers"
    ]
}

@arjunkmrm
Copy link

@ibagur smithery dev here, we noticed the configuration was wrong - just pushed a fix and it works now.

@ibagur
Copy link
Author

ibagur commented Apr 12, 2025

Hi @arjunkmrm , FYI the npx smithery works fine for the MCP tool when used from Roo Code extension. But it still fails with Claude Desktop for some reason. For the moment I managed to use it with Claude following the 'uv' installation instead (I updated my previous comment).

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