Skip to content

fix(ping): use transport-level health check for SSE servers#242

Open
kimjune01 wants to merge 1 commit into
IBM:mainfrom
kimjune01:fix-203-sse-ping
Open

fix(ping): use transport-level health check for SSE servers#242
kimjune01 wants to merge 1 commit into
IBM:mainfrom
kimjune01:fix-203-sse-ping

Conversation

@kimjune01
Copy link
Copy Markdown
Contributor

Fixes #203

Why

mcp-cli ping checked server.connected, a static property that reflects
initial connection state. For SSE transports this was always stale — the
ping command reported "Connected" even when the server was unreachable,
or failed silently.

Changes

  • Replace server.connected with tool_manager.check_server_health(),
    which calls send_ping() on the actual transport. Works for stdio, SSE,
    and HTTP.
  • Report online/total count at the end.
  • Use enumerate instead of list.index() for server filtering.

Tests

  • Updated existing ping test mocks.
  • Added SSE transport ping, mixed transport, and online count tests.

4443 passed, 12 skipped, 0 failures.

kimjune01 added a commit to kimjune01/sweep that referenced this pull request May 17, 2026
Background investigations the substrate ran during this session.
Modified existing graphs (envoyproxy/envoy, pymc-devs/pymc,
ratatui/ratatui) and new graphs for: IBM/mcp-cli#242,
MaterializeInc/materialize#36491, flux-rs/flux#1595, gluesql/gluesql#1912,
microsoft/aici#122, njbrake/agent-of-empires (#1176, #1177),
pingcap/tidb#68379, pingcap/tiflash#10845, pola-rs/polars#27592,
pylint-dev/pylint#11002, thanos-io/thanos#8816, triton-lang/triton#10278,
vllm-project/vllm#42174, wiiznokes/fan-control#247.

Pure artifact commit — these accumulate as pipeline output; not
authored in this conversation. Committing now so the working tree
is clean before the next session.
Replace server.connected (static property) with
tool_manager.check_server_health() which performs a real
transport-level send_ping() across all transport types.

Fixes IBM#203

Signed-off-by: June Kim <kimjune01@gmail.com>
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

Successfully merging this pull request may close these issues.

ping does not work with SSE servers

1 participant