← all repositories
microsoft/multilspy

Python library that wrangles language servers so you don't have to

multilspy abstracts away the messy work of downloading, configuring, and talking to LSP servers across a dozen languages.

586 stars Python Coding Assistants
multilspy
Velocity · 7d
+0.9
★ / day
Trend
steady
star history

What it does

multilspy is a Python client library for the Language Server Protocol. It handles the tedious parts of spinning up language servers—downloading the right binaries, managing JSON-RPC chatter, and keeping track of server-specific quirks—then exposes a clean synchronous or async API for common queries like “where is this symbol defined?” or “what completions are valid here?”

The interesting bit

The library grew out of a NeurIPS 2023 research project on Monitor-Guided Decoding, where static analysis feeds into LLM code generation to prevent hallucinated method names and invalid call sequences. That pedigree shows: multilspy is designed for programmatic use by tools and agents, not just human-driven IDE features.

Key highlights

  • Supports 12 languages out of the box, from Java (Eclipse JDTLS) to Rust (rust-analyzer) to PHP (Intelephense)
  • Both sync (SyncLanguageServer) and async (LanguageServer) APIs
  • Auto-downloads and configures platform-specific server binaries
  • Handles the full LSP lifecycle: setup, handshake, requests, teardown
  • Used in published research beyond its origin paper, including test-repair tools and coding agents

Caveats

  • Requires Python ≥3.10; the README specifically warns against 3.8 due to asyncio runtime errors
  • The API surface is deliberately narrow—definition, references, completions, hover, document symbols—so you’ll need to file an issue or PR for less common LSP methods

Verdict

Worth a look if you’re building AI coding tools, repository-level agents, or any automated system that needs to reason about code structure across multiple languages. Less compelling if you just want IDE features; that’s what VS Code is for.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.