Skip to main content
An agent runtime speaks ACP to its client, calls tools over MCP, and fetches grounding context over RCP. All three share JSON-RPC framing, an initialize/capabilities handshake, _meta extensibility, and cursor pagination — learn one, you know the shape of all three.

Roles

Client

An application, agent runtime, or IDE that needs retrieval context. It initiates the connection and drives the handshake.

Server (engine)

A RAG engine, vector database, or aggregator that advertises capabilities and answers method calls.
The client always initiates. A server MUST NOT assume any capability was negotiated until initialize completes.

The retrieval pipeline model

RCP models retrieval as a composable pipeline. A single retrieve call can transparently drive as many stages as the engine supports:
1

Query transform

Expansion, HyDE, decomposition (query/transform).
2

Candidate generation

Dense, sparse, or hybrid first-stage recall.
3

Rerank

Cross-encoder or late-interaction (MaxSim) scoring.
4

Diversify

MMR to reduce redundancy.
5

Assemble

Apply metadata filters and recency, and attach citations.
A thin client just calls retrieve and reads hits; a sophisticated client can also call the individual stages (embed, rerank, query/transform, graph) directly. See The retrieval pipeline for the full model.

Message shape

Every message is JSON-RPC 2.0. Requests carry an id; notifications do not. Extensibility rides in _meta.

Message format

The normative framing, id rules, and _meta extensibility.

How the connection unfolds

1

Connect

The client spawns the server (stdio) or opens an HTTP endpoint.
2

Initialize

The client sends initialize with its protocol version; the server replies with the negotiated version, its identity, and its capabilities.
3

Call

The client calls capability-gated methods (retrieve, embed, …), reading results and optionally streaming progress.
4

Shut down

The client sends shutdown (or just closes the transport).