Verified

Lsp MCP Server

Language Server Protocol integration for LLMs to query hover, completion, and diagnostics.

Data last scanned 2 days ago · Reviewed 2 days ago

339 tools122TypeScriptMIT

Overview

The Lsp MCP Server functions as a bridge that allows LLMs to communicate with Language Server Protocol (LSP) servers. By initiating an LSP client and exposing MCP tools, the server enables AI models to fetch accurate code suggestions, diagnostic reports, and hover information directly from a project's language tooling. Developers can interact with the server using tools like get_info_on_location and get_completions, or subscribe to real-time diagnostic updates through specialized resources. The system also supports file lifecycle management, including opening and closing documents for analysis, and provides configurable logging levels for debugging.

Our verdict

With a security score of 28/100, this server is classified as high-risk. This rating is driven by the fact that the project is community-maintained rather than vendor-official and has not undergone an editorial review for security, including its authentication methods and read-only mode support. Given the lack of recent updates—with the last commit occurring 365 days ago—this tool is best suited for experimental environments rather than sensitive or production workflows.

  • Supports core LSP operations like hover and completions
  • Provides real-time diagnostic updates via subscriptions
  • Small footprint with only three direct dependencies
  • Includes integration tests for TypeScript LSP
  • High-risk security profile with unreviewed authentication
  • Inactive development with no commits for one year
  • Community-maintained without official vendor support
  • Missing public homepage link

Setup

Claude Desktop
{
  "mcpServers": {
    "lsp-mcp": {
      "args": [
        "-y",
        "lsp-mcp-server"
      ],
      "command": "npx"
    }
  }
}

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
get_info_on_locationGet hover information at a specific location in a filelow
get_completionsGet completion suggestions at a specific location in a filelow
get_code_actionsGet code actions for a specific range in a filelow
open_documentOpen a file in the LSP server for analysismedium
close_documentClose a file in the LSP servermedium
get_diagnosticsGet diagnostic messages (errors, warnings) for open fileslow
start_lspStart the LSP server with a specified root directorymedium
restart_lsp_serverRestart the LSP server without restarting the MCP servermedium
set_log_levelChange the server's logging verbosity level at runtimelow

Compatibility

ClientLocalDockerRemoteRead-only
Claude Desktop
Cursor
VS Code
Windsurf
ChatGPT

Frequently asked questions

What are the prerequisite software requirements?

You need Node.js version 16 or later and npm installed to run the server.

Do I need to start the LSP server manually after connecting?

Yes, as of version 0.2.0, you must explicitly call the start_lsp tool with your project's root directory before any other LSP functionality will work.

How can I change the logging verbosity?

You can use the set_log_level tool at runtime to change the verbosity, or use the --mcp-debug flag when running your client to view full traffic.

What is the difference between MCP tools and resources in this server?

MCP tools perform active requests like retrieving completions or code actions, while MCP resources provide access to information like diagnostic messages with real-time subscription updates.

Can I restart the LSP server without restarting the MCP server itself?

Yes, the server includes a restart_lsp_server tool specifically for this purpose.

Badge

Lsp MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.