Universal LSP MCP Server
Provides LSP tools for C/C++ development, including definition, references, diagnostics, code actions, and formatting via clangd.
Provides LSP tools for JavaScript development, including definition, references, diagnostics, code actions, and formatting via typescript-language-server.
Provides LSP tools for Kotlin development, including definition, references, diagnostics, code actions, and formatting via kotlin-language-server.
Provides LSP tools for PHP development, including definition, references, diagnostics, code actions, and formatting via intelephense.
Provides LSP tools for Python development, including definition, references, diagnostics, code actions, and formatting via pyright or pylsp.
Provides LSP tools for Ruby development, including definition, references, diagnostics, code actions, and formatting via solargraph.
Provides LSP tools for Rust development, including definition, references, diagnostics, code actions, and formatting via rust-analyzer.
Provides LSP tools for Swift development, including definition, references, diagnostics, code actions, and formatting via sourcekit-lsp.
Provides LSP tools for TypeScript development, including definition, references, diagnostics, code actions, and formatting via typescript-language-server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Universal LSP MCP ServerFind all references to the function calculateTotal in the current project."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Universal LSP MCP Server
One MCP server to rule all Language Servers ā automatic language detection, zero-config setup.
Overview
A Model Context Protocol (MCP) server that gives language models access to Language Server Protocol (LSP) functionality across all major programming languages. Unlike existing LSP-MCP servers, this project supports 13 languages out of the box with zero manual configuration ā it automatically detects your codebase, selects the right language server, and exposes all LSP operations through a stable, language-independent tool interface.
Related MCP server: lsp-mcp-server
Supported Languages
Language | Language Server | Auto-Detected Via |
Python |
|
|
TypeScript |
|
|
JavaScript |
|
|
C# |
|
|
Java |
|
|
Go |
|
|
Rust |
|
|
C / C++ |
|
|
Ruby |
|
|
PHP |
|
|
Kotlin |
|
|
Swift |
|
|
Features
š Automatic Language Detection ā Scans project root for language markers (
package.json,Cargo.toml,go.mod, etc.)š Auto Language Server Selection ā Hardcoded mapping with fallback servers; installs missing LSPs automatically
š¤ Hands-Free Initialization ā Clients that support MCP Roots auto-initialize on connect ā
lsp_initdisappears from the tool list once all servers start cleanlyš¾ Cross-Session Persistence ā Initialized workspaces and their ready languages are remembered across server restarts
š Graceful Degradation ā
lsp_initreappears if a previously-working server starts failing (e.g. language added, binary missing)š 12 LSP Tools ā Definition, references, symbols, diagnostics, rename, code actions, formatting, and more
š Read & Write Operations ā Both inspection and modification of code via LSP
š Polyglot Support ā Multiple language servers run simultaneously in the same project
š Hybrid Responses ā Human-readable
textfield + raw LSP data inrawfieldš MCP Stdio Protocol ā Works with any MCP-compatible client
ā” Zero Config ā Install and run, no per-language setup required
Installation
Important: Install
lsp-mcpon the same machine where your code lives. The language servers it manages need direct filesystem access to your codebase ā they cannot work over a remote connection or on a different machine than your source files.
# npm
npm install -g @theupsider/lsp-mcp@latest
# bun
bun install -g @theupsider/lsp-mcp@latestQuickstart
VS Code / Cursor
Add to your workspace .vscode/mcp.json (recommended ā ensures the server runs on the same machine as your code, including SSH remotes, WSL, and Dev Containers):
{
"servers": {
"lsp-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@theupsider/lsp-mcp@latest"]
}
}
}Why workspace config? VS Code runs servers defined in
.vscode/mcp.jsonwherever the workspace lives. Servers defined in your user profile always run locally ā which breaks LSP when your code is on a remote machine.
CLI
# Run the server (reads from stdin, writes to stdout)
lsp-mcpThe server starts with no active project. Most clients auto-initialize when they support the MCP Roots protocol (VS Code, Copilot, etc.), but lsp_init remains available as a manual override.
For clients without Roots support, the first action the model must take is calling lsp_init:
lsp_init({ root: "/path/to/your/project" })lsp_init will:
Scan the root for language markers and start matching language servers (best-effort)
Disappear from the tool list when you called it explicitly ā subsequent calls to any LSP tool trigger lazy server startup for that file's language if no server was detected at init time
Return health status for all servers that were started eagerly
Optional: pre-warm specific languages (skips detection, faster cold start):
lsp_init({ root: "/path/to/project", languages: ["python", "typescript"] })Persistence: Once initialized, the workspace configuration (detected languages) is saved to your OS-standard config directory (~/.config/lsp-mcp/ on Linux, ~/Library/Application Support/lsp-mcp/ on macOS, %APPDATA%\lsp-mcp\ on Windows). On subsequent server startups, the MCP server will automatically reconnect using the last-known root, so you rarely need to call lsp_init again.
Re-emergence: If a language server that was previously healthy fails to start (e.g. you added a new language or removed a binary), lsp_init will reappear in the tool list, signaling the model should re-initialize.
Available Tools
Read-Only Tools
Tool | Description | Key Parameters | Visibility |
| Initialize server for a project root |
| Conditional ā hidden after a successful explicit |
| Go to definition |
| Always |
| Find all references |
| Always |
| List symbols in a file |
| Always |
| Search symbols across workspace |
| Always |
| Get errors & warnings |
| Always |
| Go to type definition |
| Always |
| Find implementations |
| Always |
| Check status of all LSP servers | (none) | Always |
Write Tools
Tool | Description | Key Parameters |
| Rename symbol |
|
| Apply / list code actions |
|
| Format document |
|
| Format code range |
|
Configuration
Environment Variable | Description | Default |
| Log level: |
|
Setup Scripts
Two helper scripts are included for setting up a development environment:
setup-languages-ubuntu24.shā Installs all language runtimes, compilers, and toolchains on Ubuntu 24.04 (Python, Node.js, Java, Go, Rust, Ruby, PHP, Kotlin, Swift, etc.)setup-lsp.shā Installs all language servers (pyright, typescript-language-server, omnisharp, jdtls, gopls, rust-analyzer, clangd, solargraph, intelephense, kotlin-language-server)
# 1. Install language runtimes
chmod +x setup-languages-ubuntu24.sh
./setup-languages-ubuntu24.sh
# 2. Install language servers
chmod +x setup-lsp.sh
./setup-lsp.sh
# 3. Reload PATH
source ~/.bashrcTroubleshooting
Language server not found
If a language server cannot be auto-installed, the server logs a structured error and continues running for other languages. Manually install the missing server:
# Python
pipx install python-lsp-server
# C#
dotnet tool install -g omnisharp-roslyn
# Java
npm install -g vscode-java
# Ruby
gem install solargraphServer not detecting language
Ensure your project root contains a language marker file (e.g., package.json for TypeScript, Cargo.toml for Rust). The server scans the directory passed to lsp_init for these markers.
High memory usage
Each language server runs as a separate process. For large projects with many languages, consider limiting the workspace or using LSP_MCP_LOG_LEVEL=info to monitor server health.
Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Client (AI Model) ā
āāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Protocol (stdio)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā LSP MCP Server (Node.js) ā
ā āāāāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāāā ā
ā ā lsp_init ā ā lsp_... ā ā lsp_... ā ā
ā āāāāāāā¬āāāāāā āāāāāā¬āāāāāā āāāāāāā¬āāāāāā ā
ā āāāāāāāāāāāāāāā¼āāāāāāāāāāāāāā ā
ā ā¼ ā
ā Language Router & Adapter ā
ā (auto-detects language ā selects LSP) ā
āāāāāāāā¬āāāāāāāāāāā¬āāāāāāāāāāā¬āāāāāāāāāāāā¬āāāāāā
ā ā ā ā
ā¼ ā¼ ā¼ ā¼
pyright typescript gopls clangd
pylsp lsp rust- ...
analyzerLicense
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Enable language models to perform advanced AI-powered web scraping with enterprise-grade reliabiliā¦
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceBridges Large Language Models with Language Server Protocol interfaces, allowing LLMs to access LSP's hover information, completions, diagnostics, and code actions for improved code suggestions.1,373 npm123MIT
- AlicenseAqualityFmaintenanceBridges Claude Code to Language Server Protocol (LSP) servers to enable semantic code intelligence features like navigation, refactoring, and real-time diagnostics. It supports multiple languages including TypeScript, Python, and Rust with multi-root workspace capabilities.191,373 npm21MIT
- AlicenseNot gradedqualityFmaintenanceBridges the Model Context Protocol with Language Server Protocol to provide AI agents with persistent access to code intelligence features including navigation, diagnostics, refactoring, and completion across 7+ programming languages.1,373 npmMIT

karellen-lsp-mcpofficial
AlicenseNot gradedqualityDmaintenanceProvides LLM clients with structured code intelligence through LSP servers, enabling queries for definitions, references, call hierarchies, and more.2Apache 2.0