Skip to main content
The Node.js SDK (rcp-protocol) is written entirely against the standard library (child_process, http, readline) — no native addon, nothing to build. It is ESM and async (every call returns a Promise) and interoperates byte-for-byte with the C++, Python, and Rust SDKs.

Install

Node ≥ 18. The package is ESM ("type": "module").

Server

Handlers may be sync or async.

Client

A gated call to an unadvertised capability throws before any I/O:
Client methods: embed, embedSparse, embedMulti, rerank, retrieve, search (returns { hits, usage, nextCursor }), graph, transform, indexAdd, indexDelete, catalog, info, ping, call, shutdown.

Selecting a backend

Fusion & the vector codec

The reference Reciprocal Rank Fusion (spec §16.3) and the compact f32-base64 embedding codec (§7.3.1) ship here too — byte-for-byte identical to the Python, Rust, and C++ SDKs:
See Federation and compact encoding.

Test

The suite includes a case where the Node client drives the C++ example server, proving cross-language interop.