Skip to content

[Doc] Document the client's ping answers and the stdio request limit - #551

Open
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:fill_the_client_ping_docs_gaps
Open

[Doc] Document the client's ping answers and the stdio request limit#551
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:fill_the_client_ping_docs_gaps

Conversation

@koic

@koic koic commented Sep 11, 2026

Copy link
Copy Markdown
Member

Motivation and Context

The client answers server pings automatically, but the docs leave out where that applies and what the stdio transport does with the other server-to-client requests.

The client Transports page now lists the automatic ping answer among the things the stdio transport handles, and a note states that ping is the only server-to-client request answered there: a wire-level elicitation/create or sampling/createMessage is ignored over stdio, so a server that sends one waits for an answer that never comes, while the SEP-2322 input_required route works on every transport and keeps on_elicitation and on_sampling handlers working over stdio. Without this note, the only trace of the limitation is a hung tool call.

The client Ping page now says that over HTTP a ping reaches the client only on a stream that is already open and that the client never opens one to receive pings, so a server can only ping a client that has a stream open. Registering on_server_request("ping") moves to the end of the section as the advanced option it is, together with its side effect of opening the GET listening stream on connect.

The client overview mentions the automatic answer next to MCP::Client#ping, and the server Ping page's Client Side section points at it.

How Has This Been Tested?

Documentation only; the linked headings and pages exist.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

## Motivation and Context

The client answers server pings automatically, but the docs leave out where that applies and what the stdio transport
does with the other server-to-client requests.

The client Transports page now lists the automatic ping answer among the things the stdio transport handles,
and a note states that `ping` is the only server-to-client request answered there: a wire-level `elicitation/create`
or `sampling/createMessage` is ignored over stdio, so a server that sends one waits for an answer that never comes,
while the SEP-2322 `input_required` route works on every transport and keeps `on_elicitation` and `on_sampling` handlers
working over stdio. Without this note, the only trace of the limitation is a hung tool call.

The client Ping page now says that over HTTP a ping reaches the client only on a stream that is already open
and that the client never opens one to receive pings, so a server can only ping a client that has a stream open.
Registering `on_server_request("ping")` moves to the end of the section as the advanced option it is, together with
its side effect of opening the GET listening stream on `connect`.

The client overview mentions the automatic answer next to `MCP::Client#ping`,
and the server Ping page's Client Side section points at it.

## How Has This Been Tested?

Documentation only; the linked headings and pages exist.

## Breaking Changes

None.
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.

1 participant