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 theinitialize 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
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 ofsearch with real vector search and nothing
else changes.
- Python
- Node.js
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):
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)
notifications/progress frames as a 3-stage
retrieve funnel fills, then the final response — over one SSE connection.Federation (fan out + fuse)
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.Installing the SDK
The SDKs are published to their registries — install the one you need: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.