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 Server?

Lsp MCP 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

Requirements

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

Practical notes

  • Maintained by Tritlo, written in TypeScript.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

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

How to install the Lsp MCP Server

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

From the project documentation. Replace placeholders and example paths before connecting.

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

MCP server for Language Server Protocol (LSP) integration, providing hover information, code completions, diagnostics, and code actions with resource-based access Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.