pylsp-mypy
Mypy linter for the Python LSP Server
What it is and what it does
pylsp-mypy is a plugin that bridges mypy, Python's static type checker, into the Python LSP Server so that type errors appear in your editor in real time. Instead of running mypy separately from the command line, you get inline diagnostics as you type—or on save, depending on configuration. It reads mypy configuration from pyproject.toml and supports both standard mypy and the faster dmypy daemon mode for repeated checks.
The plugin is designed for developers who want to catch type errors early without leaving their IDE. It offers granular control over strictness, file exclusions, and performance trade-offs (live checking versus save-on-check). Configuration is straightforward via pyproject.toml, though advanced users can also pass custom mypy or dmypy commands—though doing so requires explicitly setting an environment variable for security.
Use it for:
- Enable type checking hints in your editor while writing Python code, catching type mismatches before runtime.
- Use dmypy daemon mode to speed up repeated type checks on large projects during active development.
- Exclude test directories or generated code from type checking via regex patterns in pyproject.toml.
- Display inferred types on hover to understand what mypy sees, useful when debugging type inference.
- Integrate strict type checking into your IDE workflow without running mypy as a separate build step.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates mypy static type checking into the Python LSP Server, displaying type errors and inferred types directly in your IDE as you edit.
Yes. This is a well-maintained, low-friction plugin that solves a real problem: bringing mypy diagnostics into your editor. It has no known vulnerabilities, permissive licensing, and active development. Install it if you use python-lsp-server and want inline type checking; the only gotcha is the Python 3.10+ requirement and the need to install it in the same virtualenv as the LSP server itself.
Install
pylsp-mypy on PyPI
pip
pip install pylsp-mypyuv
uv add pylsp-mypypoetry
poetry add pylsp-mypyInstalling pylsp-mypy
Before you install
Low friction install with active maintenance. Released 28 days ago, last commit 2025-08-27, and supports current Python versions (3.10–3.14). Depends on python-lsp-server and mypy, both standard tools.
License in practice
MIT license is permissive; you can use this freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pylsp-mypy
# Add to pyproject.toml:
[tool.pylsp-mypy]
enabled = true
live_mode = true
strict = false
Requires Python 3.10 or newer and must be installed into the same virtualenv as python-lsp-server itself.
Verify before relying
- Whether dmypy daemon mode actually improves responsiveness in practice for typical project sizes.
- Performance impact of live_mode on large codebases or slow machines.
- Compatibility with all LSP clients (hover display requires dmypy support).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — python-lsp-server, mypy, tomli |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 321,754/month — #7,620 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylsp_mypy-0.8.0-py3-none-any.whl
Keywords: mypy, typing
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
python-lsp-serverImplements the Language Server Protocol for…
permissive · top 5,000 on PyPI
python-lsp-ruffIntegrates ruff's linting, formatting, and…
permissive · top 15,000 on PyPI
jupyterlab-lspAdds Language Server Protocol (LSP) integration…
permissive · top 15,000 on PyPI
mypyMypy is a static type checker for Python that…
permissive · top 1,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
pyrightPyright is a Python command-line wrapper that…
permissive · top 1,000 on PyPI
python-lsp-jsonrpcImplements a JSON RPC 2.0 server for Python…
permissive · top 5,000 on PyPI
pytypePytype is a static type checker that infers…
permissive · top 5,000 on PyPI
types-smorestProvides type stubs for flask-smorest, enabling…
copyleft · top 5,000 on PyPI
types-lxmlProvides complete external type annotations for…
permissive · top 5,000 on PyPI