Labsco
MCP SERVER

LSP MCP Server

by Tritlo

Give an assistant the answers your editor already gets from the language server — real definitions, real references, real renames — instead of grep output.

Code Intelligence & Repository Indexing
Summary
The assistant stops guessing at symbols it could have looked up.

The questions grep answers badly — which of the four handle functions this one is, who actually calls it, what the overload returns — go to the same language server your editor trusts. lsp_smart_search collapses the usual chain of separate queries into one response, and lsp_rename previews the entire edit before a file is touched. Diagnostics only cover files opened in the session, which is what lsp_index_files is for.

What it is

A bridge to the language servers your project already runs. 29 tools expose what LSP knows: definitions, references, implementations, hover types, diagnostics, call and type hierarchies, code actions and rename.

What you get
  • Definition, type-definition and implementation lookups that follow aliases, re-exports and overloads rather than matching text
  • Every reference to a symbol across the codebase, and within one file the same occurrences classified as text, read or write
  • Type signatures and documentation at a position, parameter hints at a call site, and inferred type annotations across a whole range through inlay hints
  • A structured file outline, the exports that make up its public surface, its imports including CommonJS require() and dynamic imports, and the files that import it back
  • Compiler errors and warnings for one file, or across every file opened in the session
  • Rename across the codebase with dry_run on by default, and code actions that fix errors, organise imports or extract a function
  • Call hierarchy in both directions, and type hierarchy walked up to supertypes or down to subtypes
  • Full context on a symbol in one call — signature, definition, references, implementations and call hierarchy together — reachable from a bare name with no file path
  • Direct control of the language servers when you need it: status, manual start and stop, and a batch file-open that makes diagnostics start publishing
Requirements

Npx on your PATH, and the language servers for the languages you work in — the tools relay what those servers report and start them per workspace. No account and no key.

Setup effort

One command — npx tritlo/lsp-mcp <language> /path/to/lsp [lsp-args...]