lsp-mcp

MCP.Pizza Chef: jonrad

Code editors quietly run a background helper for each language that knows where every function is defined and who calls it. This hands that helper's questions to your assistant instead: jump to a definition, list every reference, show the type under the cursor, outline a file you have never opened. The recommended container arrives ready for TypeScript, JavaScript and Python. It only reads your files and never writes to them. Be aware the author calls it a proof of concept, the last change landed in March 2025, and it publishes over sixty separate tools.

Unmaintained · no code changes since March 2025; author calls it a proof of concept
Coding

Use This MCP server To

Find every place a function is used across my project Jump to where a confusing variable was first defined Get an outline of a file I have never opened Ask what type a value actually has at this line See the errors the language helper reports for a file

README

LSP MCP

An Model Context Protocol (MCP) server that provides LLMs/AI Agents with the capabilities of a language server protocol (LSP) server. This gives the AI the ability to get language aware context from the codebase.

Example

Input:

Use lsp to give me insights into the following typescript code:

let foo = "bar";
function x() {
  let foo = 123;
  console.log(foo);
}
x();
console.log(foo);

Output:

I'll use LSP (Language Server Protocol) to analyze your TypeScript code. Let me break down what's happening:
Here's what the code does and the insights from LSP analysis:

1. Variable Shadowing:

There are two variables named foo:

A global foo (string type) initialized with the value "bar"
A local foo (number type) inside the function x() initialized with the value 123

2. Execution Flow:

First, the global foo is declared and assigned the value "bar"
When function x() is called, the local foo variable is declared and assigned 123
The console.log(foo) inside the function outputs 123 (the local variable)
After the function finishes, console.log(foo) outputs "bar" (the global variable)

3. Scope Isolation:

The LSP confirms that TypeScript correctly identifies the different types:

The global foo is a string type
The local foo inside the function is a number type

Changes to the local foo don't affect the global foo

This is a classic example of variable shadowing in JavaScript/TypeScript, where a local variable with the same name as a global variable takes precedence within its scope.

Warning

This is in a POC state.

Features

lsp-mcp FAQ

Is this still being worked on?
No. The last code change was March 2025, and the readme itself calls the project a proof of concept. The author does not name a successor.
Do I need an API key?
No. Everything runs on your own machine against your own files, so there is no account, no sign-up and no credential of any kind.
Can it change my code?
No. It asks the language helper questions and reports the answers. Even a rename request only returns a suggested set of edits; nothing is written to disk by this tool.
Which programming languages work?
The recommended container is set up for TypeScript, JavaScript and Python out of the box. Other languages work if you supply the matching language helper yourself.
Why does my app complain about too many tools?
Because it publishes more than sixty of them, one for each question the language protocol defines. Several apps cap how many they will load, so you may need to narrow the list in its configuration.
Can I use this to find my way around an unfamiliar codebase?
Yes, that is its strongest use. Ask where something is defined or what calls it and you get real answers from the language helper rather than a guess.
Can it handle two languages at once?
Yes, through a configuration file, despite a note in the readme suggesting otherwise. That note applies only to the shortcut command-line option.
How hard is setup?
Developer level. You run it through Docker or npx, and with Docker you also have to share your code folder into the container before it can see anything.