The Type Server Protocol is a JSON-RPC interface for Python search paths, import resolution, and computed, declared and expected types. Results are bound to analysis snapshots, so file or configuration changes require fresh queries rather than reuse of stale results. Version 0.4.1 adds optional read-only connections while the main connection retains state-changing operations. Microsoft describes using TSP to select Pyrefly as Pylance’s analysis engine without losing editor integrations. Pyright remains the default, and protocol versions are distinct from product versions.
Back to Tech
Python TSP separates type analysis from editor integration
Snapshot validity and read-only connection boundaries are central to the protocol.