# vscode-jsonrpc

> A json rpc implementation over streams

Latest version **9.0.2** (published 2026-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install vscode-jsonrpc
pnpm add vscode-jsonrpc
yarn add vscode-jsonrpc
bun add vscode-jsonrpc
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 9.0.2 |
| Published | 2026-08-28 |
| First published | 2015-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 219.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1789 |
| Author | Microsoft Corporation |
| Maintainers | microsoft1es, microsoft-oss-releases, alexandrudima, kaimaetzel, lszomoru, vscode-bot |

## Links

- npm: https://www.npmjs.com/package/vscode-jsonrpc
- Repository: https://github.com/Microsoft/vscode-languageserver-node
- Homepage: https://github.com/Microsoft/vscode-languageserver-node#readme
- Issues: https://github.com/Microsoft/vscode-languageserver-node/issues
- npm.io page: https://npm.io/package/vscode-jsonrpc

## Recent versions

- 9.0.2 (latest) — 2026-08-28
- 9.0.0-next.12 (next) — 2026-05-26
- 9.0.1 — 2026-06-30
- 9.0.0 — 2026-06-03
- 9.0.0-next.11 — 2025-12-18
- 9.0.0-next.10 — 2025-11-13
- 9.0.0-next.9 — 2025-08-08
- 9.0.0-next.8 — 2025-05-12
- 9.0.0-next.7 — 2025-02-04
- 9.0.0-next.6 — 2024-08-19
- 9.0.0-next.5 — 2024-07-04
- 9.0.0-next.4 — 2024-06-11
- 8.2.1 — 2024-05-21
- 9.0.0-next.3 — 2024-05-21
- 9.0.0-next.2 — 2024-03-06
- … 124 more at https://npm.io/package/vscode-jsonrpc/versions

## README

# VSCode JSON RPC

[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
[![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)

This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.

The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between
a client and a server. Below an example how to setup a JSON-RPC connection. First the client side.

```ts
import * as cp from 'child_process';
import * as rpc from 'vscode-jsonrpc/node';

let childProcess = cp.spawn(...);

// Use stdin and stdout for communication:
let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(childProcess.stdout),
	new rpc.StreamMessageWriter(childProcess.stdin));

let notification = new rpc.NotificationType<string, void>('testNotification');

connection.listen();

connection.sendNotification(notification, 'Hello World');
```

The server side looks very symmetrical:

```ts
import * as rpc from 'vscode-jsonrpc/node';


let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(process.stdin),
	new rpc.StreamMessageWriter(process.stdout));

let notification = new rpc.NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();
```

# History

For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)


## License
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)

---
_Source: https://npm.io/package/vscode-jsonrpc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
