Universal LSP MCP Server
MCP serverDev toolsUniversal LSP MCP server
Unavailable. This server has no hosted endpoint yet, so ahel can't serve it.
Add to setup to save this item as a reference. ahel cannot run it, and signing in will not install it.
Getting started
- Save this item in Your setup as a reference.
- Read the source or reference documentation for its setup requirements. Saving it here does not connect it to your AI.
- Check this page for availability before trying to install it through ahel.
From the project's README
As published by theupsider/lsp-mcp in README.md.
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.
Supported Languages
| Language | Language Server | Auto-Detected Via |
|---|---|---|
| Python | pyright / pylsp | pyproject.toml, setup.py |
| TypeScript | typescript-language-server | tsconfig.json |
| JavaScript | typescript-language-server | package.json |
| C# | omnisharp | *.csproj, *.sln |
| Java | vscode-java / jdtls | pom.xml, build.gradle |
| Go | gopls | go.mod |
| Rust | rust-analyzer | Cargo.toml |
| C / C++ | clangd | *.c, *.cpp, *.h |
| Ruby | solargraph | Gemfile |
| PHP | intelephense | composer.json |
| Kotlin | kotlin-language-server | build.gradle.kts |
| Swift | sourcekit-lsp | Package.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@latest
Quickstart
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-mcp
The 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 |
|---|---|---|---|
lsp_init | Initialize server for a project root | root (required), languages (optional string array) | Conditional β hidden after a successful explicit lsp_init call |
lsp_definition | Go to definition | file, line, character | Always |
lsp_references | Find all references | file, line, character | Always |
lsp_document_symbols | List symbols in a file | file | Always |
lsp_workspace_symbols | Search symbols across workspace | query (limit: 100β500 results) | Always |
lsp_diagnostics | Get errors & warnings | file (scope: file or workspace) | Always |
lsp_type_definition | Go to type definition | file, line, character | Always |
lsp_implementation | Find implementations | file, line, character | Always |
lsp_health | Check status of all LSP servers | (none) | Always |
Write Tools
| Tool | Description | Key Parameters |
|---|---|---|
lsp_rename | Rename symbol | file, line, character, newName |
lsp_code_action | Apply / list code actions | file, line, character, apply |
lsp_formatting | Format document | file |
lsp_range_formatting | Format code range | file, range |
Configuration
| Environment Variable | Description | Default |
|---|---|---|
LSP_MCP_LOG_LEVEL | Log level: error, info, debug | info |
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 ~/.bashrc
Troubleshooting
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 solargraph
Server 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- ...
analyzer
License
Signals
- GitHub stars
- 3
- Forks
- 2
- Last commit
- Jul 2026
- Weekly_downloads
- 284 weekly_downloads
Advanced
- Delivery
- lsp-mcp MCP server β your ahel connector (mcp.ahel.ai) β your AI.
- Item type
- mcp-server
- Key
io-github-theupsider-lsp-mcp- Source
- github.com/theupsider/lsp-mcp
More in Dev tools
MCP server Β· adarsh4052
More in Dev toolsdraw.io
MCP server Β· jgraph
More in Dev toolsairtreks-mcp
MCP server Β· airtreks
More in Dev tools0nMCP
MCP server Β· 0nork
More in Dev toolssportwizzard
MCP server Β· adamruehle
More in Dev toolsgithub-mcp-server
MCP server Β· github
More in Dev tools