Skip to main content
RCP ships four native SDKs that speak the identical wire format: a header-only C++ SDK and dependency-free Python, Node.js, and Rust SDKs. This page takes you from zero to a working retrieval engine in two steps:

1. See it run

Clone the repo and query the reference engine. Real output in under a minute.

2. Write your own

A complete, copy-paste engine you can run and then make real.
You only need Python 3 or Node.js installed — the reference engine is a toy in-memory index with no models, no vector database, and no network calls. It exists to show the protocol, not the retrieval math.

See it run

The repo ships a complete example server (a tiny retrieval engine) and a client that drives it. Running the client spawns the server, performs the initialize handshake, discovers the server’s capabilities, and calls three of them — all over plain JSON-RPC on stdio.
1

Clone the repo

2

Run the example client

3

Read the output

That is a full RCP session. The client never imported the server’s code — it only spoke the protocol. Swap the server for one backed by real embeddings and the client wouldn’t change a line.

Write your own engine

An RCP server is just a program that advertises what it can do and answers method calls. Here is a complete engine backed by a three-document keyword index. It runs as-is; replace the body of search with real vector search and nothing else changes.
1

Save the engine as my_engine.py

2

Save a client as query.py

3

Run it

Install the SDK, then run the client (it launches the engine as a subprocess):
Rust and C++ follow the identical shapeServer::new(), advertise a capability, register a handler, serve_stdio(). Complete, compiler-verified engines live at sdk/rust/examples/example_server.rs and sdk/cpp/examples/example_server.cpp; the Rust and C++ SDK pages walk through them.

Go further — two runnable demos

Once the basics click, two self-contained programs show off the parts of RCP that sell it. Both run with only Python 3, no models, no config:

Streaming (HTTP + SSE)

A real HTTP server streams notifications/progress frames as a 3-stage retrieve funnel fills, then the final response — over one SSE connection.

Federation (fan out + fuse)

One command spawns two independent engines, fans a query out, and fuses their rankings with rcp.rrf_fuse — origin tags and per-engine weights.

What just happened

Every RCP session is the same three beats, in every language:

Initialize

The client connects and sends initialize. The server replies with the negotiated protocol version, its name, and its capabilities — the exact set of things it can do. See Initialization.

Gate on capabilities

The client checks a capability (c.supports(...)) before calling a method. Calling an unadvertised capability fails client-side, before any I/O — no wasted round trip. See Capabilities.

Call methods

The client calls capability-gated methods like retrieve and reads back normalized hits. The server ran whatever pipeline it wanted behind that one call. See the retrieval pipeline.
Notice what the client didn’t do: it didn’t know the server’s language, its index, or its ranking math. It only spoke the wire. That decoupling is the whole point — read Why RCP for the motivation.

Installing the SDK

The SDKs are published to their registries — install the one you need:
Each SDK page has the full install and API details.

Where to go next

The method set

Every method at a glance, and the capability that gates it.

Core concepts

The wire format, capabilities, and errors — one concept per page.

Federation & Selector

Target one engine or fuse many from a single registry.

SDKs

The full API of each native SDK.