LabscoMCP early access ↗
TritloMCP SERVER · OFFICIAL PROJECT

LSP MCP Server

Give an assistant the hover types, completions, code actions and diagnostics your editor already gets from the language server, instead of guessing from text.

by Tritlo ↗Code Intelligence & Repository Indexing✓ Official

LABSCO SUMMARY

The assistant stops guessing at symbols it could have looked up.

Hover types, completions, code actions and diagnostics come from the same language server your editor trusts, so the assistant reads what the compiler knows instead of inferring it from text. One launch wraps one language server, chosen by language id and executable path.

What it is

A bridge from an MCP client to one language server you choose at launch by language id, executable path and arguments. Its tools pass hover, completion, code-action and diagnostic requests to that server and return the answers.

What you get

  • Hover information at a position in a file — the type and documentation the language server reports — through get_info_on_location
  • Completion suggestions at a position through get_completions
  • Code actions for a range, such as the fixes the server offers for an error, through get_code_actions
  • Errors and warnings for the files you have opened through get_diagnostics, plus lsp-diagnostics:// resources that update over subscriptions
  • Control over which files the server analyses, with open_document and close_document
  • The language server started with a project root through start_lsp, and restarted without restarting the MCP server through restart_lsp_server
  • lsp-hover:// and lsp-completions:// resources for the same hover and completion answers
  • Logging verbosity changed at runtime with set_log_level, across eight severity levels

Requirements

Node.js 16 or later, plus the language server you want to query, passed at launch as in npx tritlo/lsp-mcp haskell /usr/bin/haskell-language-server-wrapper lsp. From version 0.2.0, call start_lsp with your project's root directory before any LSP request. No account and no key.

Setup effort

One command — npx tritlo/lsp-mcp <YOUR_LANGUAGE> <YOUR_PATH_TO_LSP> [<YOUR_LSP_ARGS>]