You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): eliminate connection timeout and JSON-RPC notification compliance
Fix three bugs preventing MCP server from completing the initialize
handshake within the client's timeout window:
1. CRITICAL (serve.rs): move run_connect_time_catchup to a
spawn_blocking background task so the MCP message loop enters
immediately. The previous synchronous block_on call prevented
the server from reading stdin until catch-up indexing finished,
causing the client's initialize request to time out.
2. HIGH (schema.rs): make JsonRpcRequest.id optional with
#[serde(default)]. JSON-RPC 2.0 notifications omit the id
field entirely, so deserialization failed for compliant clients
sending notifications/initialized.
3. MEDIUM (mod.rs): dispatch now returns Option<Value> — None for
notifications (id=null) per JSON-RPC 2.0 §4.1. The message loop
skips writing a response when dispatch returns None.
0 commit comments