Repository navigation
Closed
Description
After a connection has been established, I shut down the server. The UI doesn't recognize the disconnection.
You still see the Reconnect and Disconnect buttons.
In the console you see tons of messages like this:
Error from MCP server: SseError: SSE error: TypeError: fetch failed: connect ECONNREFUSED ::1:8080, connect ECONNREFUSED 127.0.0.1:8080, connect EHOSTUNREACH fe80::1:8080 - Local (:::55056), connect ECONNREFUSED 192.168.1.142:8080, connect EHOSTUNREACH fe80::479:f5e1:f09e:ee06:8080 - Local (:::55059), connect EHOSTUNREACH fe80::16:546c:57d:64cb:8080 - Local (:::55061), connect EHOSTUNREACH fe80::5cff:b3ff:fe65:8cdf:8080 - Local (:::55062), connect ECONNREFUSED fda0:15a6:9edc:444e:10da:5b53:d2a6:2bac:8080
at _eventSource.onerror (file:///Users/oliver/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js:85:31)
at EventSource.scheduleReconnect_fn (file:///Users/oliver/.npm/_npx/5a9d879542beca3a/node_modules/eventsource/dist/index.js:248:53)
at file:///Users/oliver/.npm/_npx/5a9d879542beca3a/node_modules/eventsource/dist/index.js:98:174
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: undefined,
event: {
type: 'error',
message: 'TypeError: fetch failed: connect ECONNREFUSED ::1:8080, connect ECONNREFUSED 127.0.0.1:8080, connect EHOSTUNREACH fe80::1:8080 - Local (:::55056), connect ECONNREFUSED 192.168.1.142:8080, connect EHOSTUNREACH fe80::479:f5e1:f09e:ee06:8080 - Local (:::55059), connect EHOSTUNREACH fe80::16:546c:57d:64cb:8080 - Local (:::55061), connect EHOSTUNREACH fe80::5cff:b3ff:fe65:8cdf:8080 - Local (:::55062), connect ECONNREFUSED fda0:15a6:9edc:444e:10da:5b53:d2a6:2bac:8080',
code: undefined,
defaultPrevented: false,
cancelable: false,
timeStamp: 502389.422084
}
}
I would expect for the UI to show the connection has having been disconnected.
When the server comes back up again, then the connection gets reestablished, but the problem with this is that since this is a new session, there is no information about client capabilities from the initialized notification. So I don't know on the server if the client has sampling, roots or elicitation support.
Reacted by Nina Polshakova
Activity
odrobnik commentedon Jul 10, 2025
An alternative would be that upon reconnection to re-send the
initializerequest. Right now I only seeSo the inspector establishes a new SSE stream but doesn't initialize it (by exchanging the capabilities)
npolshakova commentedon Sep 26, 2025
Would #765 fix this by having the UI show the connection was disconnected?
odrobnik commentedon Oct 1, 2025
@npolshakova I guess so, does that stop the automatic reconnection?
cliffhall commentedon Aug 1, 2026
Triage: Priority = Medium
Scored 8/16 with the priority rubric added to
AGENTS.mdin #1891, as part of the backlog triage in #1872. Added to project board #28 with Status Incoming — meaning filed and scored but not yet approved for work. A maintainer decides whether it moves to Todo.buglabel (+1), high engagement (3 comments) (+1)Related issues. One connected issue:
Scores are a starting point, not a verdict — the rubric is meant to be overruled when it's plainly wrong, provided the reason is written down.
odrobnik commentedon Aug 2, 2026
I think that this is probably no longer current