--- id: lsprotocol version: "2025.0.0" license: unclear license_treatment: permissive maintenance: active --- # lsprotocol — Python types for Language Server Protocol. License: permissive · Maintenance: active · Downloads: 2.3M/mo ## 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 above — verify before relying. Provides Python object types and converters for the Language Server Protocol, enabling you to build LSP clients and servers with standardized message structures. 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 pip install lsprotocol uv add lsprotocol poetry add lsprotocol ## Installing lsprotocol 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: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags language server protocol types, lsp types python, language server implementation, lsp client server types, protocol message structures, language-server-protocol, type-definitions, lsp [View on SkillFed](https://skillfed.io/packages/lsprotocol) · [View on PyPI](https://pypi.org/project/lsprotocol/)