MCP server for Language Server Protocol (LSP) integration, providing hover information, code completions, diagnostics, and code actions with
Lsp mcp mcp server lets Claude, Cursor and other MCP clients work with Lsp MCP directly. MCP server for Language Server Protocol (LSP) integration, providing hover information, code completions, diagnostics, and code actions with resource-based access.
An MCP (Model Context Protocol) server for interacting with LSP (Language Server Protocol) interface. This server acts as a bridge that allows LLMs to query LSP Hover and Completion providers.
The MCP Server works by: 1. Starting an LSP client that connects to a LSP server 2. Exposing MCP tools that send requests to the LSP server 3. Returning the results in a format that LLMs can understand and use
Once connected, the assistant can call these 10 tools directly:
get_info_on_location — Get hover information at a specific location in a fileget_completions — Get completion suggestions at a specific location in a fileget_code_actions — Get code actions for a specific range in a fileopen_document — Open a file in the LSP server for analysisclose_document — Close a file in the LSP serverget_diagnostics — Get diagnostic messages (errors, warnings) for open filesstart_lsp — Start the LSP server with a specified root directoryrestart_lsp_server — Restart the LSP server without restarting the MCP serverset_log_level — Change the server's logging verbosity level at runtimeLogging — The server includes a comprehensive logging system with 8 severity levels: - debug: Detailed information for debugging purposes - info: General informationalThe server is distributed via npm as tritlo/lsp-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Lsp MCP sits in that group, and the shape of its toolset — get_info_on_location, get_completions, get_code_actions among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| get_info_on_location | Get hover information at a specific location in a file |
| get_completions | Get completion suggestions at a specific location in a file |
| get_code_actions | Get code actions for a specific range in a file |
| open_document | Open a file in the LSP server for analysis |
| close_document | Close a file in the LSP server |
| get_diagnostics | Get diagnostic messages (errors, warnings) for open files |
| start_lsp | Start the LSP server with a specified root directory |
| restart_lsp_server | Restart the LSP server without restarting the MCP server |
| set_log_level | Change the server's logging verbosity level at runtime |
| Logging | The server includes a comprehensive logging system with 8 severity levels: - debug: Detailed information for debugging purposes - info: General informational messages about system operation - notice: Significant operatio |
{
"mcpServers": {
"lsp-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"tritlo/lsp-mcp",
"<language-id>",
"<path-to-lsp>",
"<lsp-args>"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.