Skip to content

Changing port of MCP server requires a restart of GhidraΒ #131

@skerit

Description

@skerit

I changed the port of the server in Ghidra:

Image

But when I try to connect to it, it just fails:

npx -y mcp-remote http://localhost:8955/mcp/sse
[221919] Using automatically selected callback port: 22015
[221919] [221919] Connecting to remote server: http://localhost:8955/mcp/sse
[221919] Using transport strategy: http-first
[221919] Connection error: TypeError: fetch failed
    at node:internal/deps/undici/undici:13510:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async StreamableHTTPClientTransport.send (file:///home/skerit/.npm/_npx/705d23756ff7dacc/node_modules/mcp-remote/dist/chunk-FBGYN3F2.js:13014:24) {
  [cause]: AggregateError [ECONNREFUSED]:
      at internalConnectMultiple (node:net:1122:18)
      at afterConnectMultiple (node:net:1689:7) {
    code: 'ECONNREFUSED',
    [errors]: [ [Error], [Error] ]
  }
}
[221919] Fatal error: TypeError: fetch failed
    at node:internal/deps/undici/undici:13510:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async StreamableHTTPClientTransport.send (file:///home/skerit/.npm/_npx/705d23756ff7dacc/node_modules/mcp-remote/dist/chunk-FBGYN3F2.js:13014:24) {
  [cause]: AggregateError [ECONNREFUSED]:
      at internalConnectMultiple (node:net:1122:18)
      at afterConnectMultiple (node:net:1689:7) {
    code: 'ECONNREFUSED',
    [errors]: [ [Error], [Error] ]
  }
}

It was still listening to the previous, original 8080 port.
After restarting Ghidra, it worked.

Either a warning should be given to the user to restart Ghidra, or after changing the port the internal HTTP server should restart.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions