LSP-MCP
Provides language intelligence for C and C++ via integration with clangd, including diagnostics, cross-file navigation (go-to-definition, go-to-declaration), find references, code completion, and document formatting capabilities.
Provides comprehensive language intelligence for JavaScript via integration with typescript-language-server, including real-time diagnostics, cross-file navigation (go-to-definition, find references), code completion, refactoring tools, and workspace-wide symbol search.
Provides language intelligence for PHP via integration with intelephense, including diagnostics, code completion, navigation features (go-to-definition, find references), and workspace-wide symbol search.
Provides language intelligence for Python via integration with pyright-langserver, including type-checking diagnostics, cross-file navigation (go-to-definition, find references), code completion, signature help, and automated refactoring capabilities.
Provides comprehensive language intelligence for Rust via integration with rust-analyzer, including real-time diagnostics, cross-file navigation (go-to-definition, find references, go-to-implementation), code completion, and symbol renaming across the workspace.
Provides comprehensive language intelligence for TypeScript via integration with typescript-language-server, including real-time diagnostics, cross-file navigation (go-to-definition, find references), code completion, refactoring tools, and workspace-wide symbol search.
Click on "Install 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., "@LSP-MCPgo to definition of handleRequest"
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.
lsp-mcp
The most complete MCP server for language intelligence. 22 tools covering navigation, diagnostics, refactoring, and formatting. CI-verified across 7 languages. Built directly against the LSP 3.17 specification.
Unlike typical MCP-LSP bridges, lsp-mcp maintains a persistent language server session — agents operate on a fully indexed workspace with real-time diagnostics and cross-file awareness, not a cold-started stub that forgets context between calls.
Why lsp-mcp
lsp-mcp | typical alternatives | |
Languages (CI-verified) | 7 | 1–2 |
Tools | 22 | 3–5 |
LSP spec compliance | 3.17, built to spec | ad hoc |
Connection model | persistent | per-request |
Cross-file references | ✓ | rarely |
Real-time diagnostic subscriptions | ✓ | ✗ |
Test coverage | 76% statements, 86% functions | rarely tested |
Quick Start
{
"mcpServers": {
"lsp": {
"type": "stdio",
"command": "npx",
"args": ["blackwell-systems/LSP-MCP", "<language-id>", "<path-to-lsp-binary>", "<lsp-args>"]
}
}
}TypeScript:
{ "args": ["blackwell-systems/LSP-MCP", "typescript", "typescript-language-server", "--stdio"] }Go:
{ "args": ["blackwell-systems/LSP-MCP", "go", "gopls"] }Rust:
{ "args": ["blackwell-systems/LSP-MCP", "rust", "rust-analyzer"] }Multi-Language Support
Every language below is integration-tested on every CI run — start_lsp, open_document, get_diagnostics, and get_info_on_location all verified against the real language server binary:
Language | Server | Install |
TypeScript / JavaScript |
|
|
Python |
|
|
Go |
|
|
Rust |
|
|
Java |
| |
C / C++ |
|
|
PHP |
|
|
Tools
All tools require start_lsp to be called first.
Session
Tool | Description |
| Start the language server with a project root |
| Restart without restarting the MCP server |
| Open a file for tracking (required before position queries) |
| Stop tracking a file |
Analysis
Tool | Description |
| Errors and warnings — omit |
| Hover info (type signatures, docs) at a position |
| Completion suggestions at a position |
| Function signature and active parameter at a call site |
| Quick fixes and refactors for a range |
| All symbols in a file (functions, classes, variables) |
| Search symbols by name across the workspace |
Navigation
Tool | Description |
| All references to a symbol across the workspace |
| Jump to where a symbol is defined |
| Jump to the type definition of a symbol |
| Jump to all implementations of an interface or abstract method |
| Jump to the declaration of a symbol (distinct from definition — e.g. C/C++ headers) |
Refactoring
Tool | Description |
| Get a |
| Validate a rename is possible before committing |
| Get |
| Apply a |
| Execute a server-side command (e.g. from a code action) |
Utilities
Tool | Description |
| Change log verbosity at runtime |
Recommended agent workflow:
start_lsp(root_dir="/your/project")
open_document(file_path=..., language_id=...)
get_diagnostics() # whole project, no file_path
get_info_on_location(...) / get_references(...)
close_document(...)Language IDs: typescript, typescriptreact, javascript, javascriptreact, python, go, rust, java, c, cpp, php
Resources
Diagnostic resources support real-time subscriptions — the server sends notifications/resources/updated when diagnostics change.
Scheme | Description |
| All open files |
| Specific file (subscribable) |
| Hover at position |
| Completions at position |
LSP 3.17 Conformance
lsp-mcp is implemented directly against the LSP 3.17 specification and validated through integration testing against real language servers. Coverage includes:
Full lifecycle (
initialize→initialized→shutdown) with graceful SIGINT/SIGTERM handlingProgress protocol — workspace-ready detection waits for all
$/progresstokens to complete before sending referencesServer-initiated requests (
workspace/configuration,window/workDoneProgress/create, dynamic registration) — all correctly responded to, unblocking servers that gate workspace loading on these responsesCorrect JSON-RPC framing, error code handling, and response shape normalization across hover, completion, code actions, and diagnostics
See docs/lsp-conformance.md for the full method coverage matrix and spec section references.
Extensions
Language-specific extensions add tools, prompts, and resource handlers, loaded automatically by language ID at startup.
To add an extension, create src/extensions/<language-id>.ts implementing any subset of getToolHandlers, getToolDefinitions, getResourceHandlers, getSubscriptionHandlers, getPromptDefinitions, and getPromptHandlers. All features are namespaced by language ID.
Development
git clone https://github.com/blackwell-systems/LSP-MCP.git
cd LSP-MCP && npm install && npm run build
npm test # all unit test suites
npm run test:multi-lang # 7-language integration test (requires language servers)Coverage: ~76% statements, ~86% functions. To inspect MCP traffic: claude --mcp-debug.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/blackwell-systems/LSP-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server