Is your feature request related to a problem? Please describe.
When building MCP clients, it's not possible to externally detect the negotiated MCP protocol version for stdio transports, as it's only stored for HTTP-based transports (as they need to pass it in HTTP headers). But that makes it difficult to debug MCP clients and understand the lower-level behavior.
Describe the solution you'd like
Add StdioServerTransport.setProtocolVersion() and protocolVersion() getter, which would set and get protocol version for use by the external implementation.
Describe alternatives you've considered
No simple workaround exists, except for intercepting the stdio channel which is a massive pain.
Additional context
We need this for the mcpc MCP CLI client
I'll be happy to prepare a PR.