TL;DR
Get business pricing on monitors, keyboards and dev gear
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
Microsoft’s Pylance documentation describes the Type Server Protocol (TSP), a JSON-RPC interface for requesting Python type-analysis data from a type server. The specification covers protocol versions, workspace snapshots, type and import queries, and optional negotiated IPC connections for concurrent read-only requests.
Microsoft’s Pylance release documentation describes the Type Server Protocol (TSP), a JSON-RPC interface that lets a client request Python type-analysis data from a server maintaining analysis state for a workspace. The specification defines requests for protocol compatibility, snapshots, search paths, import resolution and type information, and adds an optional way to open extra IPC channels for read-only work.
The documentation identifies three protocol artifacts in the repository as the authoritative definitions: typeServerProtocol.ts, which defines TypeScript interfaces and request types; tsp.json, a machine-readable model; and tsp.schema.json, a JSON schema for that model. TSP uses JSON-RPC methods prefixed with typeServer/ and adopts familiar Language Server Protocol data shapes, including positions, ranges and string-form URIs, where useful.
A typical session starts when a client launches or connects to the server and establishes shared workspace and document state, commonly through LSP initialization and synchronization. It then requests the server’s supported protocol version, checks compatibility, obtains an initial snapshot identifier, and sends supported queries. Requests that require it include the current snapshot; the server can notify the client with typeServer/snapshotChanged when earlier results are no longer valid.
The protocol’s listed versions run from 0.1.0 through 0.4.1. The history records additions and changes to request types and type representations, as well as support for multi-connection negotiation and the connection-control request. The document cautions that minor-version changes in the 0.x series may be breaking, while patch changes remain backward compatible within the same minor line.
Separate Channels for Type Queries
TSP gives clients and type-analysis servers a shared request-and-response contract for work that depends on a workspace’s current state. Version checks and snapshot identifiers provide a defined way for clients to determine whether their expected protocol and analysis results are current, rather than treating type data as detached from the files and configuration that produced it.
The optional multi-connection feature is aimed at workloads with concurrent read-only requests, such as high-volume type queries or background workers. A client can use an extra channel without moving workspace ownership to it: the main connection remains responsible for initialization, document synchronization, state-changing notifications and connection control. That division can keep read-only work from competing on the main JSON-RPC connection, while the specification says servers must remain correct without the feature.
For implementers, the distinction matters because multi-connection mode is a performance option, not a correctness requirement. Clients and servers must negotiate a shared transport before opening an extra channel; absent agreement, they stay on the main connection. This gives different implementations a fallback path rather than making additional IPC support a prerequisite for using TSP.
Popular right now

Ninja Foodi 10-Quart DualZone 6-in-1 Air Fryer, Black, DZ302

LG C2 Series 65-Inch OLED evo 4K Smart TV (OLED65C2PUA, 2022)

Ninja CREAMi 7-in-1 Ice Cream Maker, NC301
As an affiliate, we earn on qualifying purchases.
How TSP Fits With LSP
TSP uses selected Language Server Protocol conventions but defines its own type-server requests. According to the documentation, clients commonly use LSP initialization and document synchronization to provide the state a server needs, then send TSP requests over the same JSON-RPC connection. The main channel may use a supported transport such as stdio or Node IPC; when stdio is used, standard output is reserved for protocol messages.
The protocol’s version history shows a series of revisions rather than a single unchanging type format. The document lists 0.2.0 as adding request types and fields, 0.3.0 as switching to more complex type shapes, and 0.4.0 as adopting a Type union and stub-based type payloads. Version 0.4.1 adds multi-connection negotiation and the connection-control request.
Multi-connection support is negotiated during ordinary LSP initialization. Each side advertises supported transport kinds under an experimental type-server capability. The documentation lists IPC as the built-in transport for extra channels. The client opens one through a control request on the main connection; depending on the platform, the IPC arguments describe one full-duplex endpoint or separate server input and output endpoints.
Adoption and Compatibility Details
The supplied documentation defines the protocol, but it does not establish which clients or type servers currently implement it, how widely it is being used, or whether particular products have adopted multi-connection mode. It also does not provide performance measurements demonstrating how much extra IPC channels improve query throughput or responsiveness.
The source material gives the version history through 0.4.1 but no publication date or release schedule. Because the protocol is in the 0.x version series and its own guidance warns that minor releases may break compatibility, implementers need to consult the current protocol artifacts and check supported versions rather than assume that every implementation accepts the same requests or type shapes.
The document says servers should validate channel-opening requests, connect promptly and report success or failure, but the provided material does not specify deployment-wide adoption, security policy, or operational outcomes. Those details cannot be inferred from the protocol description alone.
Check Implementations and Versions
For a client or server team evaluating TSP, the next concrete step is to compare its implementation against the repository’s TypeScript definitions, protocol model and JSON schema, then test version negotiation and the requests it intends to support. Clients should use the returned semantic version to determine compatibility and follow the single-connection path when multi-connection support is absent or transports do not match.
Where both sides advertise a common transport, a client can request an extra IPC channel through the main connection and handle either acceptance or a reported failure. The protocol description does not announce a separate product launch or adoption deadline, so broader implementation status and any later protocol changes remain matters to verify in future repository updates.
Key Questions
What is the Type Server Protocol?
TSP is a JSON-RPC protocol for clients to request Python analysis data from a type server that maintains a workspace’s type-analysis state.
What information can a client request?
The documented requests cover the protocol version, snapshots, Python search paths, import resolution, and computed, declared or expected types.
Does TSP require multiple connections?
No. Extra connections are an optional performance feature. The specification says a server must work correctly in single-connection mode, and clients must not open an extra channel without a successful capability match.
How do clients and servers negotiate extra IPC channels?
Both sides advertise supported transports during LSP initialization. An extra channel can be opened only if both advertise the multi-connection capability and share at least one transport; the documented built-in option is IPC.
Are all TSP versions backward compatible?
No. The documentation says minor changes in the 0.x series may be breaking. Patch changes are described as backward compatible within the same minor version line, so clients should check the server’s reported version.
Source: github.com
