Skip to content

Unclear if ping MUST be supported before initialize request #1667

@JLLeitschuh

Description

@JLLeitschuh

Describe the bug
It may be helpful to determine if a server is "alive" by sending a ping request before attempting to initialize a connection.

The specification currently states:

- The client **SHOULD NOT** send requests other than
[pings](/specification/2025-06-18/basic/utilities/ping) before the server has responded to the
`initialize` request.
- The server **SHOULD NOT** send requests other than
[pings](/specification/2025-06-18/basic/utilities/ping) and
[logging](/specification/2025-06-18/server/utilities/logging) before receiving the `initialized`
notification.

However, it does not explicitly state that ping MUST be supported before initialize.

Even the documentation on ping doesn't state that it must be supported before initialize.

https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/ping

As such, at least the Rust SDK does not seem to not support ping before initialize:

Here's a test with the rust MCP SDK:

curl 'http://localhost:5050/mcp' \
  -H 'accept: application/json, text/event-stream' \
  -H 'content-type: application/json' \
  --data-raw '{"jsonrpc":"2.0","id":1,"method":"ping","params":{}}'
Unexpected message, expect initialize request%

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions