-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
modelcontextprotocol/docs/specification/2025-06-18/basic/lifecycle.mdx
Lines 119 to 125 in 9001fed
- 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
Labels
bugSomething isn't workingSomething isn't working