Skip to content

Unable to connect to MCP Server, tested using multiple AI Agent: VSCode, OpenCode, Claude Code #244

Description

@Entropt

My setup:

Tried on multiple AI Agent, even Claude Desktop, the error code seems to be the same so I will list out only the error on Claude Desktop:

2026-02-03T02:10:04.104Z [ida-pro-mcp] [info] Using MCP server command: C:\Users\tuandm4\mcp_env\Scripts\python.exe with args and path: {
  metadata: {
    args: [
      'C:\\Users\\tuandm4\\mcp_env\\Lib\\site-packages\\ida_pro_mcp\\server.py',
      '--ida-rpc',
      'http://127.0.0.1:13337',
      [length]: 3
    ],
    paths: [
      'C:\\Program Files\\Python311',
      'C:\\Python311',
      'C:\\Program Files\\Git\\cmd',
      'C:\\Program Files\\Git\\mingw64\\bin',
      'C:\\Python311\\Scripts\\',
      'C:\\Python311\\',
      'C:\\Program Files\\Common Files\\Oracle\\Java\\javapath',
      'C:\\Windows\\system32',
      'C:\\Windows',
      'C:\\Windows\\System32\\Wbem',
      'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\',
      'C:\\Windows\\System32\\OpenSSH\\',
      'C:\\Program Files\\NVIDIA Corporation\\NVIDIA App\\NvDLISR',
      'C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common',
      'C:\\Program Files\\dotnet\\',
      'C:\\Program Files\\Go\\bin',
      'C:\\Program Files\\Docker\\Docker\\resources\\bin',
      'C:\\Users\\tuandm4\\AppData\\Local\\nvm',
      'C:\\nvm4w\\nodejs',
      'C:\\Users\\tuandm4\\AppData\\Local\\Microsoft\\WindowsApps',
      'C:\\Users\\tuandm4\\AppData\\Local\\Programs\\Microsoft VS Code\\bin',
      'C:\\Users\\tuandm4\\go\\bin',
      'C:\\Users\\tuandm4\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python313\\Scripts',
      'C:\\Users\\tuandm4\\platform-tools',
      'C:\\Users\\tuandm4\\.local\\bin',
      'C:\\Users\\tuandm4\\AppData\\Roaming\\Hex-Rays\\IDA Pro\\plugins',
      '',
      [length]: 27
    ]
  }
} %o
2026-02-03T02:10:04.401Z [ida-pro-mcp] [info] Server started and connected successfully { metadata: undefined }
2026-02-03T02:10:04.426Z [ida-pro-mcp] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0} { metadata: undefined }
2026-02-03T02:10:04.764Z [ida-pro-mcp] [info] Message from server: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{},"resources":{"subscribe":false,"listChanged":false},"prompts":{}},"serverInfo":{"name":"ida-pro-mcp","version":"1.0.0"}}} { metadata: undefined }
2026-02-03T02:10:04.912Z [ida-pro-mcp] [info] Message from client: {"method":"notifications/initialized","jsonrpc":"2.0"} { metadata: undefined }
2026-02-03T02:10:04.913Z [ida-pro-mcp] [info] Message from client: {"method":"tools/list","params":{},"jsonrpc":"2.0","id":1} { metadata: undefined }
2026-02-03T02:10:04.914Z [ida-pro-mcp] [info] Message from client: {"method":"prompts/list","params":{},"jsonrpc":"2.0","id":2} { metadata: undefined }
2026-02-03T02:10:04.914Z [ida-pro-mcp] [info] Message from client: {"method":"resources/list","params":{},"jsonrpc":"2.0","id":3} { metadata: undefined }
2026-02-03T02:10:04.933Z [ida-pro-mcp] [info] Message from server: {"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Failed to connect to IDA Pro! Did you run Edit -> Plugins -> MCP (Ctrl+Alt+M) to start the server?\nTraceback (most recent call last):\n  File \"C:\\Users\\tuandm4\\mcp_env\\Lib\\site-packages\\ida_pro_mcp\\server.py\", line 51, in dispatch_proxy\n    response = conn.getresponse()\n               ^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\http\\client.py\", line 1390, in getresponse\n    response.begin()\n  File \"C:\\Python311\\Lib\\http\\client.py\", line 325, in begin\n    version, status, reason = self._read_status()\n                              ^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\http\\client.py\", line 286, in _read_status\n    line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\socket.py\", line 706, in readinto\n    return self._sock.recv_into(b)\n           ^^^^^^^^^^^^^^^^^^^^^^^\nConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host\n","data":"[WinError 10054] An existing connection was forcibly closed by the remote host"}} { metadata: undefined }

Here is the settings from claude_desktop_config.json, already tried native python environment but no luck as well:

{
  "mcpServers": {
    "ida-pro-mcp": {
      "command": "C:\\Users\\tuandm4\\mcp_env\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\tuandm4\\mcp_env\\Lib\\site-packages\\ida_pro_mcp\\server.py",
        "--ida-rpc",
        "http://127.0.0.1:13337"
      ]
    }
  }
}

Already set up the plugin and turn on in IDA Pro:

Image

The MCP Server appears in UI or the list of MCP Servers in other cli tools, but can't seems to run normally to interact with the opened IDA Pro process.

And ideas on the potential error? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions