Skip to content

lsp-invalid-transport

LSP transport type must be "stdio" or "socket"

Error

Rule Details

This rule checks the transport field of each server defined in lsp.json. Only "stdio" and "socket" are valid transport types. If the transport field is omitted, the server defaults to stdio, which is acceptable. An invalid transport type will cause a runtime error when Claude Code tries to start the LSP server, as it will not know how to communicate with the process.

Incorrect

LSP server with an invalid transport type

json
{
  "typescript": {
    "command": "typescript-language-server",
    "args": ["--stdio"],
    "transport": "http"
  }
}

Correct

LSP server with stdio transport

json
{
  "typescript": {
    "command": "typescript-language-server",
    "args": ["--stdio"],
    "transport": "stdio"
  }
}

LSP server with transport omitted (defaults to stdio)

json
{
  "typescript": {
    "command": "typescript-language-server",
    "args": ["--stdio"]
  }
}

How To Fix

Set the transport field to either "stdio" or "socket". If the server communicates over standard input/output, use "stdio". If it communicates over a TCP socket, use "socket". Omit the field entirely to default to "stdio".

Options

This rule does not have any configuration options.

Resources

Version

Available since: v0.2.0