Lsp MCP logo

Lsp MCP

Connects MCP-compatible clients to language servers for code navigation, diagnostics, refactoring, and formatting.

Install Lsp MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "lsp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@theupsider/lsp-mcp@latest"
      ],
      "env": {
        "LSP_MCP_LOG_LEVEL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 13 tools correctly ().

Overview

The lsp-mcp MCP server connects language models to Language Server Protocol implementations for code navigation, diagnostics, refactoring, and formatting. It detects languages from project files, selects and starts matching language servers, and exposes a stable set of MCP tools over stdio. Use it when an agent needs workspace-aware code intelligence across supported languages, including projects with multiple languages. Install it on the same machine as the source files so managed language servers can access the filesystem.

Use cases

  • Navigate from symbols to definitions across a workspace
  • Find references and implementations before changing code
  • Inspect errors and warnings from language servers
  • Rename symbols and apply code actions through an agent
  • Format complete files or selected code ranges

Key features

  • Automatic language detection from project files
  • Automatic language-server selection and startup
  • Workspace persistence across server restarts
  • Multi-language project support
  • Read and write LSP operations
  • Human-readable and raw LSP response fields

Tools13

What Lsp MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.4k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 83d

What it can do

From the 13 tools this server returned when we ran it.

Read-only tools · 13
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age181 days
Maintainers1

Observed 2026-10-28 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · @theupsider/lsp-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads551Package downloads in the last 30 days.
Last commit22d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed13Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Lsp MCP works

What lsp-mcp does

The lsp-mcp MCP server exposes Language Server Protocol features through MCP tools. It supports project initialization, definition and type-definition lookup, reference searches, symbol inspection, workspace symbol queries, diagnostics, implementation lookup, server health checks, renaming, code actions, and document or range formatting.

Language detection uses project markers such as pyproject.toml, package.json, go.mod, Cargo.toml, pom.xml, build.gradle, and Package.swift. The listed language-server mappings cover Python, TypeScript, JavaScript, C#, Java, Go, Rust, C/C++, Ruby, PHP, Kotlin, and Swift. Multiple language servers can run for one project.

How it works

Run the lsp-mcp MCP server through the MCP stdio protocol. A client can initialize it with a project root, after which the server scans the workspace and starts matching language servers on a best-effort basis. Clients with MCP Roots support can initialize automatically; otherwise, call lsp_init with a root path before using the other tools.

The optional languages argument to lsp_init lets a client preselect languages instead of relying on project detection. If a language was not started during initialization, later tool calls can trigger lazy startup for the language associated with the requested file. Responses contain readable text plus raw LSP data.

Initialized workspace details and detected languages persist in the operating system's configuration directory. On later starts, the server can reconnect using the last-known root. If a previously healthy language server cannot start, lsp_init becomes available again for reinitialization.

Setup and configuration

Install the package globally with npm or Bun:

Terminal
npm install -g @theupsider/lsp-mcp@latest

Then run lsp-mcp, or configure it as a stdio server in an MCP client. For VS Code and Cursor, the README recommends workspace-level .vscode/mcp.json configuration so the process runs where the workspace resides, including remote, WSL, and development-container environments.

The lsp-mcp MCP server must run on the same machine as the code. Its managed language servers require direct filesystem access and do not work when the source is only available through a remote connection. Set LSP_MCP_LOG_LEVEL to error, info, or debug; the default is info.

Tools and capabilities

  • lsp_init initializes a project and optionally pre-warms selected languages.
  • lsp_definition, lsp_type_definition, and lsp_implementation navigate related code locations.
  • lsp_references finds symbol usages.
  • lsp_document_symbols and lsp_workspace_symbols inspect symbols within a file or across the project.
  • lsp_diagnostics reports file or workspace errors and warnings.
  • lsp_health reports the status of managed language servers.
  • lsp_rename changes a symbol name through LSP.
  • lsp_code_action lists or applies available actions.
  • lsp_formatting formats a document, while lsp_range_formatting formats a selected range.

Limitations and notes

Language-server availability and behavior depend on the mapped server binaries and the project. Initialization is best effort, so a language may require a later lazy start or reinitialization if its server is missing or fails. The server uses local filesystem access; it is not suitable for placing the MCP process on a different machine from the workspace.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Lsp MCP

lsp-mcp is an MCP server that connects language models to Language Server Protocol implementations for supported programming languages. Its main tools provide definitions, references, symbols, diagnostics, implementations, health checks, renaming, code actions, and document or range formatting through a standard MCP interface.

Install it globally with npm using `npm install -g @theupsider/lsp-mcp@latest`, then run `lsp-mcp` or configure the command as an MCP stdio server. Install it on the same machine as the project so its language servers can read the source files.

Yes, lsp-mcp works with Cursor through a stdio MCP configuration.

It scans the project root for language-specific markers and selects a mapped language server. Examples include `go.mod` for Go, `Cargo.toml` for Rust, `tsconfig.json` for TypeScript, `package.json` for JavaScript, and `pyproject.toml` or `setup.py` for Python.

Yes, it can run multiple language servers simultaneously in the same project. Call `lsp_init` with a root for automatic detection, or provide a `languages` array to pre-warm specific languages.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLsp MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/lsp-mcp?style=directory)](https://allmcps.com/mcp/lsp-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/lsp-mcp"><img src="https://allmcps.com/api/badge/lsp-mcp?style=directory" alt="Lsp MCP on AllMCPs" /></a>