Lsp MCP Server

MCP server for Language Server Protocol (LSP) integration, providing hover information, code completions, diagnostics, and code actions with

Local serverstdioTypeScript

What is the Lsp MCP MCP server?

Lsp mcp mcp server lets Claude, Cursor and other MCP clients work with Lsp MCP directly. MCP server for Language Server Protocol (LSP) integration, providing hover information, code completions, diagnostics, and code actions with resource-based access.

What Lsp MCP does

An MCP (Model Context Protocol) server for interacting with LSP (Language Server Protocol) interface. This server acts as a bridge that allows LLMs to query LSP Hover and Completion providers.

The MCP Server works by: 1. Starting an LSP client that connects to a LSP server 2. Exposing MCP tools that send requests to the LSP server 3. Returning the results in a format that LLMs can understand and use

Tools it exposes

Once connected, the assistant can call these 10 tools directly:

  • get_info_on_location — Get hover information at a specific location in a file
  • get_completions — Get completion suggestions at a specific location in a file
  • get_code_actions — Get code actions for a specific range in a file
  • open_document — Open a file in the LSP server for analysis
  • close_document — Close a file in the LSP server
  • get_diagnostics — Get diagnostic messages (errors, warnings) for open files
  • start_lsp — Start the LSP server with a specified root directory
  • restart_lsp_server — Restart the LSP server without restarting the MCP server
  • set_log_level — Change the server's logging verbosity level at runtime
  • Logging — The server includes a comprehensive logging system with 8 severity levels: - debug: Detailed information for debugging purposes - info: General informational

Installing the lsp mcp mcp server

The server is distributed via npm as tritlo/lsp-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Requirements

  • Node.js (v16 or later) - npm For the demo server: - GHC (8.10 or later) - Cabal (3.0 or later)

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Lsp MCP sits in that group, and the shape of its toolset — get_info_on_location, get_completions, get_code_actions among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • With 10 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Lsp MCP.
  • Maintained by Tritlo, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the lsp mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
get_info_on_locationGet hover information at a specific location in a file
get_completionsGet completion suggestions at a specific location in a file
get_code_actionsGet code actions for a specific range in a file
open_documentOpen a file in the LSP server for analysis
close_documentClose a file in the LSP server
get_diagnosticsGet diagnostic messages (errors, warnings) for open files
start_lspStart the LSP server with a specified root directory
restart_lsp_serverRestart the LSP server without restarting the MCP server
set_log_levelChange the server's logging verbosity level at runtime
LoggingThe server includes a comprehensive logging system with 8 severity levels: - debug: Detailed information for debugging purposes - info: General informational messages about system operation - notice: Significant operatio

How to install the Lsp MCP MCP server

{
  "mcpServers": {
    "lsp-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "tritlo/lsp-mcp",
        "<language-id>",
        "<path-to-lsp>",
        "<lsp-args>"
      ]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js (v16 or later) - npm For the demo server: - GHC (8.10 or later) - Cabal (3.0 or later)

Example prompts to try

  • Use Lsp MCP to get info on location.
  • Use Lsp MCP to get completions.
  • Use Lsp MCP to get code actions.

Frequently asked questions

It connects Lsp MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (get_info_on_location, get_completions, get_code_actions, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lsp MCP directly.