Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyProgramming

agent-lsp

Lets your AI agent use language servers to find callers, preview edits and refactor code safely across many languages.

172 stars on GitHubby Blackwell SystemsLicense MITUpdated 18 days ago

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

claude mcp add agent-lsp -- npx -y @blackwell-systems/agent-lsp

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Show me every caller of this function, split into tests and non-tests.
Preview renaming this method and tell me which files would stop compiling.

What it is

This server runs the language servers your editor already relies on, such as gopls and rust-analyzer, and exposes them to your AI agent as tools. The agent can see who calls a function, preview what an edit would break before touching a file, and run multi-step refactors. It keeps the language servers warm between sessions so answers come back fast.

What it can do

  • blast_radius: all exports and all callers of a symbol in one call
  • simulate_edit: preview an edit in memory and check the diagnostics
  • safe_apply_edit: write an edit only if it could be verified
  • preview_edit: see the impact of an edit before the file changes
  • simulate_chain: test a sequence of dependent edits
  • find_symbol: find symbols across all running language servers
  • refactor: ask the language server for refactorings and apply them
  • start_lsp: start or connect to a language server

When to use

  • β€ΊWhen you rename or change a function in a large codebase and want to know what breaks first
  • β€ΊWhen you want your agent to navigate code by meaning instead of searching text
  • β€ΊWhen you need a refactor that checks the build and runs tests before it finishes

What you need

The agent-lsp binary (installed with the install script, then run agent-lsp init) and the language servers for the languages you use, such as gopls or pyright.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free and open source?

The readme shows a license badge and a public repository. It is a single Go binary.

Which languages work?

The readme says it runs 32 real language servers in CI, including Go, Python, TypeScript, Rust, Java, C, C++, C#, Ruby, PHP, Kotlin and Swift.

Is it a language server itself?

No. It orchestrates existing language servers and exposes their features as MCP tools.

Does it write to my files when previewing?

No. Preview tools check the effect of an edit in memory. safe_apply_edit writes only an edit it could verify.

Why is the first session slower?

The language server must index the workspace first. The readme says later sessions reuse the warm index.

Does it reduce token use?

The readme says responses use a compact format and reports fewer tokens than grep and read on its test tasks.

If it does not work

  • β€ΊIf a language gives no results, check that its language server (for example gopls or pyright) is installed and on your PATH.
  • β€ΊPython and TypeScript projects need minutes of indexing at first, so wait for the daemon to finish before asking for references.
  • β€ΊRestart your AI app fully after running agent-lsp init.

5 new skills a week. 1 minute to read.