lsprotocol
Python types for Language Server Protocol.
Decision gist · record as of 2026-08-14
Yes. lsprotocol is actively maintained with no known vulnerabilities, carries a permissive license, and installs with minimal friction. It is the standard way to work with LSP types in Python. Install it if you are building any LSP-based tool.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with only two runtime dependencies.
- Active maintenance with recent commits since first release in 2022.
License · maintenance · safety
permissive license (permissive) — Permissive license allows free use, modification, and distribution with minimal restrictions.
last release 2025-06-17 (423 days) · last repo commit 2026-04-02 · 157 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,346,046 downloads/mo, #3,119 on PyPI
Alternatives
Verify before relying
python -m pip install lsprotocol
from lsprotocol import types
position = types.Position(line=10, character=3)- Whether the generated types stay synchronized with the official LSP specification across all versions
- Performance characteristics when serializing/deserializing large or deeply nested protocol messages
What it is and what it does
lsprotocol is a Python library that provides object-oriented type definitions for the Language Server Protocol (LSP), a standardized protocol used by code editors to communicate with language tools. It includes both the type classes themselves and built-in converters to serialize and deserialize LSP messages to and from JSON.
You use it by importing type classes from lsprotocol.types to construct protocol messages, and optionally using lsprotocol.converters to handle JSON serialization. It depends on attrs and cattrs for class definitions and conversion logic. The library is kept up to date with the latest version of LSP.
Use it for
- Building a language server that needs to send and receive LSP protocol messages with type safety
- Creating an LSP client that communicates with language servers using standardized message structures
- Serializing LSP types to JSON for transmission over a network or stdio connection
- Validating protocol messages against the official LSP specification types
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
lsprotocol is actively maintained with no known vulnerabilities, carries a permissive license, and installs with minimal friction. It is the standard way to work with LSP types in Python. Install it if you are building any LSP-based tool.
Install
lsprotocol on PyPI
Before you install
Low friction install with only two runtime dependencies. Active maintenance with recent commits since first release in 2022.
License in practice
Permissive license allows free use, modification, and distribution with minimal restrictions.
Quickstart
python -m pip install lsprotocol
from lsprotocol import types
position = types.Position(line=10, character=3)
Verify before relying
- Whether the generated types stay synchronized with the official LSP specification across all versions
- Performance characteristics when serializing/deserializing large or deeply nested protocol messages
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesattrscattrs |
| Maintenance | Actively maintained 423 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,346,046 / month, #3,119 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: lsprotocol-2025.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “language server protocol types”
- lsprotocolProvides Python object types and converters for the Language Server…
- pyglspygls is a Python framework for building Language Servers that…
- python-language-serverImplements the Language Server Protocol for Python, providing code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also jedi-language-server · jupyterlab-lsp · ruff-lsp · leanclient · pygls · python-lsp-server · python-language-server · zuban · python-lsp-jsonrpc · pylsp-mypy