Pyrefly language server plugin for Claude Code
npx claudepluginhub alessioarcara/claude-pyrefly-lspPython language server (Pyrefly) for type checking and code intelligence
A Claude Code plugin that runs Pyrefly as the language server for Python (.py, .pyi): hover, go to definition, find references, symbols, call hierarchy and diagnostics.
The plugin only tells Claude Code how to start the server; the pyrefly binary must be on your PATH:
uv tool install pyrefly
# or
pip install pyrefly
claude plugin marketplace add alessioarcara/claude-pyrefly-lsp
claude plugin install pyrefly-lsp@alessioarcara-plugins
Then restart Claude Code or run /reload-plugins. If pyrefly is not on your PATH, the plugin says so when a session starts.
If you have the official pyright-lsp plugin, disable it, so two servers do not both answer for the same files:
claude plugin disable pyright-lsp@claude-plugins-official
In a project with no pyrefly.toml (or [tool.pyrefly] in pyproject.toml), Pyrefly falls back to its basic preset, which does not infer the return type of functions without annotations: hover shows -> Unknown.
This plugin starts the server with the default preset instead, so return types are inferred in every project without a config file. The price is more diagnostics than basic reports.
The preset is an option of the plugin (basic, legacy, default or strict). To change it:
echo '{"typeCheckingMode": "basic"}' | claude plugin configure pyrefly-lsp@alessioarcara-plugins --values-stdin
The setting applies to the language server only. pyrefly check on the command line still follows the project's own config.
MIT
7-day visitors to each marketplace page
Anthropic example skills
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
Ultra-compressed communication mode. Shortens prose while preserving technical terms, code, commands, and exact errors.