Problem
mcpls times out against tsgo --lsp --stdio for requests such as textDocument/documentSymbol.
During initialization, tsgo sends a valid server-to-client JSON-RPC request:
{"jsonrpc":"2.0","id":"ts1","method":"client/registerCapability","params":{"registrations":[{"id":"typescript-config-watch-id","method":"workspace/didChangeConfiguration","registerOptions":{"section":["js/ts","typescript","javascript","editor"]}}]}}
mcpls logs it as:
Received response for unknown request ID: String("ts1")
Root Cause
Inbound JSON-RPC messages with an id are always classified as responses. LSP servers can also send requests to the client; those messages have both id and method.
Fix
Classify inbound messages by JSON-RPC shape:
id + method -> server request
id + result/error -> response
method without id -> notification
Then reply to common LSP client requests, including client/registerCapability and workspace/configuration.
I have a local patch with focused unit tests and a tsgo behavior probe.
Problem
mcplstimes out againsttsgo --lsp --stdiofor requests such astextDocument/documentSymbol.During initialization, tsgo sends a valid server-to-client JSON-RPC request:
{"jsonrpc":"2.0","id":"ts1","method":"client/registerCapability","params":{"registrations":[{"id":"typescript-config-watch-id","method":"workspace/didChangeConfiguration","registerOptions":{"section":["js/ts","typescript","javascript","editor"]}}]}}mcplslogs it as:Root Cause
Inbound JSON-RPC messages with an
idare always classified as responses. LSP servers can also send requests to the client; those messages have bothidandmethod.Fix
Classify inbound messages by JSON-RPC shape:
id + method-> server requestid + result/error-> responsemethodwithoutid-> notificationThen reply to common LSP client requests, including
client/registerCapabilityandworkspace/configuration.I have a local patch with focused unit tests and a tsgo behavior probe.