Repolode
microsoft

microsoft/multilspy

A Python LSP client library for building applications that query language servers for definitions, references, hover info and completions.

Stars
615
Forks
112
Open issues
57
Last commit
8 days ago

What is it?

multilspy is a Python client library for the Language Server Protocol. It lets developers start a language server, send requests such as go-to-definition, find references, hover, completions and document symbols, and receive structured results, without writing the JSON-RPC plumbing themselves.

The library handles downloading platform-specific server binaries and managing their setup and teardown, along with the protocol communication and per-language configuration. It offers both a synchronous API and an asyncio-based API. Supported languages include Java, Python, Rust, C#, TypeScript, JavaScript, Go, Dart, Ruby, Kotlin, PHP and C++.

The project originates from research on Monitor-Guided Decoding, where static analysis results guide LLM code generation. It is aimed at building tools that give AI systems repository-level context.

Key features

  • 01Starts and stops language servers, downloading platform-specific binaries as needed.
  • 02Provides go-to-definition, find-references, hover, completion and document-symbol requests.
  • 03Offers both synchronous and asyncio-based APIs.
  • 04Supports a dozen languages through a common interface.
  • 05Ships per-language configuration for each supported server.

Use cases

  • Giving LLM coding agents repository-wide symbol and type context.
  • Building code analysis tools that work across several languages.
  • Extracting definitions and references from a codebase for indexing or research.

Quick start

  1. 1

    Create and activate a Python 3.10+ virtual environment

    conda create -n multilspy_env python=3.10
  2. 2

    Activate the virtual environment

    conda activate multilspy_env
  3. 3

    Install multilspy from PyPI

    pip install multilspy

Things to know

  • Requires Python 3.10 or newer.
  • Each supported language relies on a separate language server that multilspy downloads or sets up.

Topics

FAQ

What is multilspy?
A Python LSP client library for building applications that query language servers for definitions, references, hover info and completions. multilspy is a Python client library for the Language Server Protocol. It lets developers start a language server, send requests such as go-to-definition, find references, hover, completions and document symbols, and receive structured results, without writing the JSON-RPC plumbing themselves.
Is multilspy free to use? What license does it have?
multilspy is open source under the MIT license. Check the license terms before using it in commercial products.
Is multilspy still maintained?
Actively maintained. The last commit to multilspy was on Oct 29, 2026.
What can I use multilspy for?
Giving LLM coding agents repository-wide symbol and type context. Building code analysis tools that work across several languages. Extracting definitions and references from a codebase for indexing or research.
How do I install multilspy?
Create and activate a Python 3.10+ virtual environment: conda create -n multilspy_env python=3.10 Activate the virtual environment: conda activate multilspy_env Install multilspy from PyPI: pip install multilspy
Where can I get multilspy?
The source code and installation instructions are on GitHub: https://github.com/microsoft/multilspy

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects