Skip to content

[BUG] Windows: "Connection closed" error when using LSP tools despite "Connected" status #35

@PsypraxDesign

Description

@PsypraxDesign

Environment

  • OS: Windows 10/11
  • Node.js: [deine Version - node --version]
  • cclsp: latest (via npx)
  • Claude Code: 2.1.1

Problem

cclsp shows "✓ Connected" in claude mcp list, but all LSP tool calls fail with:

Error: MCP error -32000: Connection closed

Steps to Reproduce

  1. Install cclsp: npm install -g cclsp
  2. Run setup: cclsp setup --user
  3. Configure for Python (pyright) and TypeScript
  4. Add to Claude: claude mcp add cclsp -s user cmd /c npx cclsp@latest
  5. Verify connection: claude mcp list shows "✓ Connected"
  6. In Claude Code, request: "get LSP diagnostics for [file].py"
  7. Error: "Connection closed"

Additional Info

  • npx pyright-langserver --stdio works correctly in terminal
  • npx typescript-language-server --stdio works correctly in terminal
  • The language servers start and respond, but cclsp seems to lose connection when Claude calls the tools

cclsp.json config

{
  "servers": [
    {
      "extensions": ["js", "ts", "jsx", "tsx"],
      "command": ["npx", "--", "typescript-language-server", "--stdio"],
      "rootDir": "."
    },
    {
      "extensions": ["py", "pyi"],
      "command": ["npx", "--", "pyright-langserver", "--stdio"],
      "rootDir": "."
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions