Pyright

Fast, feature-rich Python static type checker from Microsoft. Powers VS Code's Pylance extension. Written in TypeScript for speed — significantly faster than mypy for large codebases. Supports all Python typing features including generics, protocols, TypeVarTuple, ParamSpec, and type narrowing. Can be run standalone or as a language server.

Evaluated Mar 06, 2026 (0d ago) v1.1+
Homepage ↗ Repo ↗ Developer Tools python type-checker static-analysis microsoft vscode pylance mypy-alternative
⚙ Agent Friendliness
69
/ 100
Can an agent use this?
🔒 Security
97
/ 100
Is it safe for agents?
⚡ Reliability
87
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
88
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
90
Secret Handling
92

Static analysis tool — no network access during analysis. Safe to run in air-gapped environments.

⚡ Reliability

Uptime/SLA
92
Version Stability
85
Breaking Changes
82
Error Recovery
88
AF Security Reliability

Best When

Type-checking large Python codebases or projects using VS Code/Pylance where speed and advanced typing support matter.

Avoid When

You're deeply invested in mypy's plugin ecosystem or need exact mypy compatibility for existing tooling.

Use Cases

  • Type-check large Python codebases faster than mypy — Pyright processes large repos in seconds vs mypy's minutes
  • Enable strict type checking in Python projects with granular strictness levels (off, basic, standard, strict)
  • Integrate with VS Code via Pylance for real-time type checking and intelligent code completion
  • Run in CI pipelines with pyright --outputjson for machine-parseable type error output
  • Type-check Python code that uses advanced typing features (TypeVarTuple, overload, ParamSpec) with better inference than mypy

Not For

  • Runtime type checking — Pyright is static analysis only; use beartype or pydantic for runtime validation
  • Python 2 codebases — Pyright targets Python 3.7+ only
  • Projects requiring exact mypy compatibility — some edge cases differ; test both if migrating

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
No
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

CLI tool — no auth needed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed open source tool from Microsoft. Pylance (VS Code extension) is a separate proprietary product but Pyright itself is fully open source.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Pyright and mypy have different inference behaviors for some edge cases — code that passes one may fail the other; test both if cross-compatibility matters
  • pyrightconfig.json must be in project root — without it, Pyright uses defaults which may not match your project's Python version or import paths
  • Stub files (.pyi) are preferred over py.typed marker — Pyright resolves type information differently than mypy for some packages
  • venvPath and venv settings must point to the correct virtual environment — wrong venv causes 'import could not be resolved' for all installed packages
  • typeCheckingMode: 'strict' enables many rules that may fail on untyped third-party libraries — add reportMissingTypeStubs = 'none' for untyped deps
  • Pyright does not support mypy plugins — projects relying on mypy plugins (SQLAlchemy, pydantic mypy plugin) need separate configuration

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Pyright.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered