Plugin

Pyright LSP

Python type checking and code intelligence through the Pyright language server.

pythonlsptypes
View original source ↗

When to choose it

Working with Python definitions, references and static types.

Choose it if: You want Python definitions, references and static type feedback with an appropriate project configuration.

Look elsewhere if: You need to verify runtime behavior or do not want to install the required language server.

What the source describes

  • Python and stub-file support
  • Type diagnostics
  • Language-server integration

Requirements

  • Local terminal Claude Code session with this plugin enabled
  • pyright-langserver on the Claude launch shell PATH, installed separately
  • A suitable Node runtime and the project’s Python/import configuration

Install for this repository only

  1. Install the configuration package. Use the existing local-scope pyright-lsp plugin install command. The official marketplace entry declares pyright-langserver with --stdio for .py and .pyi. It does not bundle the Python type checker, create a virtual environment or install your application’s Python dependencies.
  2. Distinguish the versions and executables. The marketplace entry is 1.0.0. The author package.json and npm metadata reviewed on 2026-10-11 identify the separate Pyright package as 1.1.414, with Node >=14.0.0 in its engine declaration. Use a Node runtime suitable for your selected release; this is not an installed-version or Python-version compatibility measurement.
    Shell • setup check
    node --version
    command -v pyright-langserver
  3. Choose an external installation method. The Microsoft author docs provide npm installation. This example pins the reviewed package and changes your global tool environment; it is not required if the correct server is already available. The same docs identify the PyPI/conda pyright distribution as a community-maintained wrapper that can install Node separately. Do not equate a Python package name with Microsoft’s npm package.
    Shell • optional dependency installation
    npm install -g pyright@1.1.414
  4. Check the actual server launch path. Verify pyright-langserver in the shell used to start Claude. The npm package exposes both pyright and pyright-langserver; finding the CLI alone does not establish the server is on PATH. pyright --version reports the CLI package version, not a completed LSP session. Restart Claude after changing PATH.
    Shell • setup check
    command -v pyright-langserver
    pyright --version
  5. Inspect Python project configuration. Use the intended workspace root. Microsoft documents pyrightconfig.json or [tool.pyright] in pyproject.toml; when both exist, pyrightconfig.json takes precedence. Configuration paths are relative to that file, and shell variables such as ~ are not supported. Check Python version, import paths and environment settings rather than assuming a VS Code interpreter selection carries into Claude.

Run the installation command in your shell after reviewing the source. Local scope enables the package for you in this repository. It does not enable it for every collaborator.

Shell • local install scope
claude plugin install pyright-lsp@claude-plugins-official --scope local
Installation and loading troubleshooting

How to use it

Use a normal navigation request once this local LSP integration is available. There is no /pyright-lsp command defined by the reviewed wrapper.

Claude Code • navigation request
Locate the selected Python function’s definition and references, then explain its annotated types. Report locations without changing files.

An original request for project navigation and diagnosis; it does not assume Python environments or dependencies have been installed. This request example is written by ClaudeStack; it is not a transcript of a tested session.

Request example
In this Python project, locate the definition and callers of the function I select using code intelligence when available. Explain its inferred or annotated types and which Pyright configuration controls this workspace. If imports cannot resolve, report the missing context without editing configuration, installing packages or hiding the diagnostic.

This Anthropic configuration plugin has an Apache-2.0 license. Microsoft’s separate Pyright package has an MIT license; it is a dependency, not another catalog entity introduced by this guide.

The marketplace version, npm server version and project Python version describe different layers. A source snapshot does not establish your installed versions or interpreter selection.

Reviewed on 2026-10-11 from fixed sources. No plugin, language server, installer or Python program was executed for this review.

October 27 follow-up: current author configuration and parser source describe useDefaultExcludes. The integrity-verified npm 1.1.414 archive also contains that option name; this static check did not install or run Pyright and does not establish behavior for a particular workspace. The marketplace entry remains 1.0.0; the separate npm archive reviewed was 1.1.414.

October 30 follow-up: import-resolution guidance was checked at the fixed Microsoft source linked below. This is documentation review; no Python, package installation or language-server session was run.

What to expect

The reviewed source describes these observations. ClaudeStack has not loaded or run this extension.

  • The local terminal integration can use Pyright for Python symbol navigation and type diagnostics on .py and .pyi. This wrapper registers a language server, not an MCP server or a Python execution sandbox.
  • After intended edits, code-intelligence diagnostics can appear in the conversation. A valid configuration and import environment affect which issues are reported; no new diagnostics is not proof that an application or its tests ran.
  • Pyright is static analysis. It does not execute your Python program, verify external services or replace project lint, test and runtime checks. Local plugins are not loaded by a Claude cloud session.

Self-check: Confirm the enabled plugin and Errors tab, the server executable and a real definition/reference lookup in an existing .py file. Inspect the controlling configuration and relevant environment before interpreting a diagnostic. Compare with the project’s existing Pyright/typecheck workflow and record that result separately; a CLI version check alone is insufficient.

Troubleshooting

pyright works in a shell but the plugin reports a missing binary

The configured executable is pyright-langserver, not pyright. Check that exact name in the Claude launch shell; npm exposes both, while a different wrapper or shell environment may expose them differently. Check the installation method before reinstalling.

Imports are unresolved despite an activated virtual environment

Inspect the workspace root and controlling Pyright configuration. Microsoft documents venvPath plus venv for selecting an environment and extraPaths for additional import roots. VS Code/Pylance interpreter settings are not a promise about this independent server; do not invent absolute machine-specific paths in shared configuration.

Editing pyproject.toml has no effect

Check for a pyrightconfig.json in the project. The author docs give it precedence over [tool.pyright]. Change only the configuration the project actually uses, with the project owner’s intended scope.

An unsupported Python feature is reported incorrectly

Check pythonVersion and the inferred interpreter version in the applicable configuration. The package’s Node engine requirement describes the JavaScript server runtime, not the Python version your code targets.

The pip package behaves differently from the npm instructions

The author installation page identifies the Python package as a community-maintained distribution that manages Node/Pyright. Verify its own documentation and actual executable paths; this guide’s fixed npm version does not certify that wrapper’s version, install behavior or license.

Navigation or new diagnostics never appear

Confirm a local terminal session, an enabled plugin in the current scope, a .py or .pyi file and the correct server PATH. Follow the current plugin activation message and inspect Errors. A server with no new diagnostic is different from a failed launch; test a known symbol lookup without adding artificial errors.

An explicitly included hidden folder is skipped, or an excluded file still has diagnostics

Check the selected configuration file, include paths, explicit exclude patterns and built-in defaults before assuming the server failed. Current Pyright source documents built-in hidden-directory and virtual-environment excludes taking precedence over include. If your installed release recognizes useDefaultExcludes, false disables built-in patterns and virtual-environment auto-detection; explicit excludes still apply. An excluded file can still enter analysis through an import from checked code. Confirm the actual files analyzed before interpreting an empty diagnostic result.

Python imports an editable package but Pyright cannot find its source

Check whether the editable install uses executable import hooks. Pyright cannot execute those hooks to locate source files. Microsoft recommends path-based .pth entries instead; review the build backend’s supported editable mode before changing installation settings.

A monorepo extraPaths pattern resolves no modules or selects an unexpected package

The reviewed upstream documentation describes local glob entries expanding to directories only: unmatched patterns add no path. Literal paths take precedence over glob matches, and an execution environment’s extraPaths replaces the default list. Inspect verbose output for resolved paths. Verify this behavior against your installed release; the current documentation does not prove that the guide’s pinned npm version supports glob expansion.

Disable or remove it

  • Disable or uninstall pyright-lsp in /plugin → Installed, matching the local scope used by this page’s install command. Follow the session’s reload or restart instructions.
  • Removing the Claude plugin leaves the separately installed language-server package and project configuration intact. Decide separately whether other editors or projects still need that package; do not delete project dependencies to disable Claude integration.

Limitations & considerations

  • The plugin config does not install Pyright, Python environments or application dependencies
  • Static diagnostics depend on project configuration and do not execute Python or replace tests
  • Include/exclude configuration can omit intended files; excluded files may still be analyzed when imported by other checked code
  • Editable-install import hooks are unavailable to static analysis; documented path glob behavior must be checked against the installed Pyright release

Source & review record

Our description is based on public documentation and manifests available on 2026-10-30. Installation formats were checked against Claude Code and the relevant installer documentation. No extension code was executed: this is a source review, not a runtime compatibility test or security audit.

Usage guide sources

Upstream revision checked for this guide: 41f619d61b999adec1a1c8deb97d1a5b6ac35bb6. Command names and behavior in this guide are documentation and registration-source findings, not runtime verification.

More plugins

Browse this type
Plugin

PR Review Toolkit

Specialized review agents for tests, comments, types, error handling and code quality.

AnthropicOfficial package
Plugin

TypeScript LSP

Connect TypeScript and JavaScript language intelligence to Claude Code.

AnthropicOfficial package
Plugin

Frontend Design

A focused design skill for building interfaces with an intentional visual direction.

AnthropicOfficial package

Each listing records its own source-review date. Listings are documentation reviews, not runtime tests or security audits. Our editorial method