Lsp

Developer tools

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.

Your AI app calls the Lsp MCP server, which does the developer tools work and sends the result back to the chat.

About Lsp

Lsp is a community MCP server from jonrad, filed in our directory under developer tools. 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.

At a glance

Publisher
jonrad (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
194

How to set up Lsp

  1. Follow the install steps in the Lsp README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Lsp README for keys or settings; the registry lists none that Lsp requires.
  3. Add Lsp to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Lsp tools to confirm the connection.
  5. Run one read-only task with Lsp first, and keep your app asking before each tool call until the results look right.

Lsp compared with similar servers

  • Cognition Wheel by Hormold has fewer GitHub stars than Lsp (193 against 194); both are community servers, and both run locally.
  • Mcpd by mozilla-ai has more GitHub stars than Lsp (195 against 194); both are community servers, and both run locally.
  • Code Assistant by stippi has fewer GitHub stars than Lsp (191 against 194); both are community servers, and both run locally.

Before you connect Lsp

  • Give Lsp its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Lsp tool call until you trust what it does with them.
  • Treat text that Lsp fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Lsp on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Lsp

How marketing and sales teams put Lsp to work, by company size. Pick the size closest to yours and start Lsp on one use case.

Small business

  • A small business with a developer can use Lsp to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Lsp to explain and fix a marketing site issue without context switching between tools.
  • Lsp runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Lsp to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Lsp to keep scripts and automations documented and versioned as they change.
  • Start Lsp on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Lsp with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Lsp so web and marketing engineering share one reviewed way of working with AI.
  • Lsp is a community server, so have security review the code and pin a version before Lsp touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Lsp README

From jonrad/lsp-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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.

  • LSP MCP
    • Example
    • Warning
    • Features
    • Quick Start
      • Claude Desktop
        • Using Docker (Recommended)
        • Using npx
      • Cursor
      • MCP CLI Client
    • The ABCs (Introduction)
      • What is an MCP?
      • What is an LSP?
    • Development
      • Dependencies
      • Decisions
      • Roadmap
    • References

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

  • Multiple LSPs (Multiple programming language support) at the same time, see sample config
  • Dynamically generates supported LSP method from LSP JSON Schema, see json schema

Quick Start

Claude Desktop
Using Docker (Recommended)

Modify claude_desktop_config.json (As described in the MCP Docs) with the following:

{
  "mcpServers": {
    "lsp": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "docker.io/jonrad/lsp-mcp:0.3.1"]
    }
  }
}

You'll likely want to share some files with the container by passing docker -v /local_dir:/remote_dir. Then you can ask Claude about the files in /remote_dir/<filename>.

Using npx

Note: Claude Desktop is finicky with npx it seems. Sometimes it says the mcp fails but the tools still work. I'll look into this... later 😊

{
  "mcpServers": {
    "lsp": {
      "command": "npx",
      "args": ["-y", "--silent", "git+https://github.com/jonrad/lsp-mcp", "--lsp", "npx -y --silent -p 'typescript@5.7.3' -p 'typescript-language-server@4.3.3' typescript-language-server --stdio"]
    }
  }
}

This will provide Claude with the LSP capabilities of the typescript language server. You can modify the language server by switching the --lsp argument (and then restarting Claude).

Multiple LSPs at the same time is not yet supported.

Cursor

Follow the instructions provided by Cursor. For settings, choose Type = command and Command = docker run ... as mentioned above for claude (eg docker run -i --rm -v <LOCAL_DIR>:<REMOTE_DIR> jonrad/lsp-mcp:<version>)

MCP CLI Client

Follow the instructions for Claude but the config file is located in ~/.llm/config.json

The ABCs (Introduction)

What is an MCP?
What is an LSP?

Development

yarn
yarn mcp-cli # Interactive MCP tool to help with development
yarn dev --help # Get the CLI help
Dependencies
Decisions
  • Using python - I want to leverage a client library that makes the startup of this simple. A lot of LSPs are created in node, but the mature client libraries seem to be dependent on vscode. I like the look of multilspy, so we'll start with python. It helps that I already created a python MCP, so at least I'll have a leg up there
  • uv for package management and such - I've been seeing this used more frequently lately and this is an excuse to learn it. Switching package managers in the future is annoying but doable. I may have to revisit this decision once implementing CI/CD. Maybe I can use this instead of a dependency on taskfile as well? to be decided
  • Async when possible - It's 2025
  • Switching to node after all. POC with python was more successful than I expected. But, multilspy doesn't support the entire LSP spec and vscode's library will be easier to work with as node is arguably the defacto standard language of LSP servers/clients.
  • Using the low-level MCP SDK. I think I'll need more control and it's frankly not that complicated as compared to the higher level FastMCP.
  • Using zod for config validation. It's already a dependency for the MCP SDK, so no reason to overthink it.
  • I've set to always use an LSP even for unknown languages (eg LLM provides a textDocument/documentSymbol request for python but there is no python LSP registered). I'll probably revisit this decision.
  • Decided to make the LSPs start only when they are asked something. May make configurable later, but for now this prevents overuse of resources.
Roadmap

This is just a list of things I'd like to do eventually. There is no timeline or order for these.

  • Figure out how to sync capabilities between the LSP client (this) and the LSP server
  • Auto generated the LSP JSON Schema or find where it's published
  • Make json schema a cli argument so we don't have the update code to support new ones
  • Connect to an already running LSP server (via a multiplexing LSP server?)
  • Switch to (Taskfile)[https://taskfile.dev/]
  • Create a proper release process

References

Questions about Lsp

What is the Lsp MCP server?

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. Lsp is maintained by jonrad on GitHub at jonrad/lsp-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Lsp MCP server?

Lsp doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (jonrad/lsp-mcp). Like most servers, Lsp ends with a command or URL you paste into your AI app's MCP config.

Does Lsp need an API key?

The registry lists no required keys for Lsp. Check the Lsp README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Lsp an official MCP server?

No. Lsp is a community server maintained by jonrad. Community servers can be excellent; read the code and the open issues before you give Lsp access to company data.

What license is Lsp under?

Lsp is released under the MIT license, according to its GitHub repository. The license covers the code of Lsp; the service it connects to has its own terms.