From pyrefly-lsp
Pyrefly language server for Python — diagnostics, type checking, go-to-definition, and find references for .py and .pyi files.
Ships in pyrefly-lsp. Installing the plugin adds it to Claude Code.
This LSP server requires pyrefly to be installed on your system. Make sure it's available in your PATH before enabling.
Copy this JSON into your .lsp.json to enable this server
Add to your .lsp.json or plugin.json:
{
"lspServers": {
"pyrefly": {
"command": "pyrefly",
"extensionToLanguage": {
".py": "python",
".pyi": "python"
},
"args": [
"lsp"
]
}
}
}File extensions mapped to language identifiers
Server configuration and transport parameters
pyreflystdioCommand-line arguments passed to the server process
Initialization options and workspace settings
npx claudepluginhub pyrefly-org/pyrefly --plugin pyrefly-lsp7-day visitors to each server page