lsp-mcp

MCP.Pizza Chef: Tritlo

This bridges a chat assistant to the same language service that powers your editor's hover tooltips and red squiggles, so it can fetch the meaning of a symbol, suggested completions at a spot, the quick fixes on offer, and the current list of errors and warnings in a file. All nine tools are read-only; none of them writes to your files. You supply the language service program yourself and give its location in the settings, which makes this a programmer's setup rather than a one-click add-on.

Unmaintained · No commits in 14 months.
Coding

Use This MCP server To

Ask what the function on a given line actually does See the errors and warnings in a file I am reading Get suggested completions at a specific spot in my code Find out which quick fixes are offered for a broken line Check a symbol's type without opening my editor

README

LSP MCP Server

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.

Overview

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

This enables LLMs to utilize LSPs for more accurate code suggestions.

Configuration:

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

Features

MCP Tools

  • 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

MCP Resources

lsp-mcp FAQ

Is it still maintained?
It has gone quiet. There have been no code changes since July 2025, and it still depends on a version of the Model Context Protocol toolkit released in late 2024. It works, but do not expect quick fixes or new features.
Does it need an access key?
No. There is no sign-up and no key anywhere in the code. It runs on your machine and talks to a language service you already have installed, so nothing is sent to an outside company.
Can it change my code?
No. Every one of its nine tools only reads — file contents, hover text, completions, errors, and the list of fixes a language service suggests. It reports those suggested fixes but never applies them and never writes to a file.
Which programming languages does it cover?
Whichever ones you already have a language service program for. The project ships extra support for Haskell and its tests exercise TypeScript, but the bridge itself does not care about the language as long as you point it at the right program.
How hard is the setup?
This one is for developers. You need Node installed, a language service program for your language already on the machine, and its file path pasted into the settings. You also have to run its start command with your project folder before any other tool will respond.
Which apps does it work in?
Any assistant that can start a local tool from a settings snippet. The instructions reference Claude's debugging flag, so Claude Code and Claude Desktop are the natural fits.
Can I use this to work out why a file is throwing errors?
Yes. Ask for the diagnostics on the file and you get back the same list of errors and warnings your editor would show, alongside the fixes it would offer you.