Get the FREE Ultimate OpenClaw Setup Guide →

lsp

An MCP (Model Context Protocol) server that bridges Claude Code to Language Server Protocol (LSP) servers, enabling semantic code intelligence capabilities.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio professioneit-lsp-mcp-server node /absolute/path/to/lsp-mcp-server/dist/index.js \
  --env LSP_LOG_LEVEL="info"

How to use

The lsp MCP server acts as a bridge between Claude Code and your local language servers, exposing LSP capabilities to Claude Code users. Once running, Claude Code can delegate semantic code intelligence tasks such as go-to-definition, hover information, code completion, diagnostics, symbol search, refactoring, and formatting to the connected language servers through the MCP interface. The server supports multiple languages (TypeScript/JavaScript, Python, Rust, Go, C/C++, Ruby, PHP, Elixir, Kotlin, Java) and can manage multiple workspaces with on-demand server startup and crash-based restarts. To use it, configure Claude Code to point at the MCP via the provided mcp.json entry, ensuring the command points to Node with the built MCP server script, and optionally set environment variables like LSP_LOG_LEVEL to control verbosity. After configuration, restart Claude Code and verify the lsp status with the dedicated status tool before performing code navigation or edits. When available, prefer LSP-based tools (e.g., lsp_goto_definition, lsp_find_references, lsp_completions) over generic text search tools to leverage semantic analysis and accurate symbol resolution.

How to install

Prerequisites:

  • Node.js 18.0.0 or higher installed on the host
  • The language servers you want to use installed and accessible (per language instructions in the README)

Install the MCP server package:

  • Clone the repository: git clone <repository-url> cd lsp-mcp-server

Install dependencies and build: npm install npm run build

Verify the build: node dist/index.js --help

Configure Claude Code to point to the MCP server (see the README's configuration section). If you prefer a global CLI, you can link the package locally after installation: npm link lsp-mcp-server --help

Additional notes

Tips and common considerations:

  • Ensure your target language servers are healthy and reachable. The MCP starts language servers on-demand and restarts them if they crash.
  • For security and stability, adjust root/workspace boundaries and file size limits in your Claude Code settings as recommended by the MCP documentation.
  • If you see verbose or missing-capability errors, check the LSP_LOG_LEVEL environment variable and the server startup logs for any language-specific initialization errors.
  • When configuring multiple workspaces, provide per-workspace server instances to avoid cross-workspace symbol leakage.
  • If you use a global installation, ensure the path to dist/index.js is accurate for your environment and that Claude Code can access the globally installed command.

Related MCP Servers

Sponsor this space

Reach thousands of developers