Copyable example
Use server/discover without rebuilding initialize.
For MCP protocol revision 2026-07-28
server/discover lets a client learn supported versions and server capabilities. It is a lightweight discovery call, not a stateful handshake. Servers implement it; clients may skip it when they already know the target version.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "server/discover",
"params": {
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {
"name": "example-client",
"version": "1.0.0"
},
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"supportedVersions": ["2026-07-28", "2025-11-25"],
"capabilities": {
"tools": {}
},
"instructions": "Use the tools to inspect build artifacts."
}
}Implementation notes
supportedVersionsis an array because one endpoint may support a current stateless revision and a legacy fallback.capabilitiesdescribes the server, while request metadata describes capabilities available from this client for this call.- Instructions should add useful operating context rather than duplicate every tool description.
- For HTTP, send the same version in
MCP-Protocol-Version.
Common mistakes
Do not return a session ID, treat discovery as authorization, omit request metadata, or make all later requests depend on server-side state created by discovery. Check a complete exchange in the free stateless validator.