Response message due to Parse Error has invalid id
When a MCP server is misbehaving (typically during development) and there are issues with message processing or response writing, an Error response is written, see
https://github.com/mark3labs/mcp-go/blob/edda393a1a231aefaaef41086ba7344e30c6b559/server/stdio.go#L233
(v0.23.0)
The createErrorResponse is called with a nil for id which is invalid according to the specification ; this causes errors in the client (when that is validating the message) and therefore hides the actual cause.
According to https://modelcontextprotocol.io/docs/concepts/transports the id is either a number or string, maybe better to pass an empty string here.
however, the json rpc2 spec says null is allowed: https://www.jsonrpc.org/specification#request_object
so maybe this issue is obsolete and it is the client not handling it correctly.