Summary
MCP clients using the official Go SDK >= 1.7 (e.g. Charm Crush) send server/discover (SEP-2575, protocol 2026-07-28) before the legacy initialize handshake. Per the MCP/JSON-RPC spec, a server that does not implement server/discover must reply with -32601 Method not found so the client falls back to initialize. This server instead exits with rc=1, killing the stdio connection.
Repro
printf '{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{}}\n' | browser39 mcp
Expected: {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"Method not found"}} and the process keeps running.
Actual: process exits (rc=1), no response on stdout:
MCP server error: expect initialized request, but received: Some(Request(JsonRpcRequest { jsonrpc: JsonRpcVersion2_0, id: Number(1), request: CustomRequest(CustomRequest { method: "server/discover", ...
Downstream effect: clients that probe with server/discover fail the whole connection with connection closed: calling "initialize": client is closing: EOF.
Suggested fix
Treat any unknown JSON-RPC method (before initialization) as MethodNotFound (-32601) instead of exiting. Note the same crash also occurs for any custom request before initialize is received, so unknown-method handling during the pre-init state is the general fix.
Summary
MCP clients using the official Go SDK
>= 1.7(e.g. Charm Crush) sendserver/discover(SEP-2575, protocol2026-07-28) before the legacyinitializehandshake. Per the MCP/JSON-RPC spec, a server that does not implementserver/discovermust reply with-32601 Method not foundso the client falls back toinitialize. This server instead exits with rc=1, killing the stdio connection.Repro
Expected:
{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"Method not found"}}and the process keeps running.Actual: process exits (rc=1), no response on stdout:
Downstream effect: clients that probe with
server/discoverfail the whole connection withconnection closed: calling "initialize": client is closing: EOF.Suggested fix
Treat any unknown JSON-RPC method (before initialization) as
MethodNotFound(-32601) instead of exiting. Note the same crash also occurs for any custom request beforeinitializeis received, so unknown-method handling during the pre-init state is the general fix.