> ## Documentation Index
> Fetch the complete documentation index at: https://retrievalcontextprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Conformance

> Three named conformance levels — L0 Base, L1 Retrieval, L2 SOTA — and a transport-agnostic test suite that validates any server in any language.

RCP defines three named conformance levels. A server **MUST** state its level in
`info`/`initialize` via `_meta.conformance` (`"L0"`, `"L1"`, or `"L2"`); clients
use it as a coarse expectation, and **capabilities as the precise contract**.

## Levels

<AccordionGroup>
  <Accordion title="L0 — Base (REQUIRED of every server)" icon="1" defaultOpen>
    Answer `initialize`, `info`, and `ping` (the latter two at any time, echoing
    a `ping` nonce); advertise at least one retrieval capability; reject
    pre-`initialize` requests with `-32001`; reject unadvertised capability
    methods (`-32003`), undefined methods (`-32004`), and unsupported options
    (`-32005`); return well-formed JSON-RPC 2.0 echoing the request `id`; validate
    params (`-32602`) instead of crashing; ignore unknown notifications; tolerate
    unknown fields, capability keys, and `_meta`.
  </Accordion>

  <Accordion title="L1 — Retrieval (RECOMMENDED)" icon="2">
    L0 **plus** `retrieve` with `modes: ["dense","sparse","hybrid"]`, `filter` and
    `citations` support, consistent `Hit.score` (higher = more relevant), and
    `k`/`minScore` honoured. The target for a general-purpose RAG backend.
  </Accordion>

  <Accordion title="L2 — SOTA (OPTIONAL)" icon="3">
    L1 **plus** a selection of `rerank` (cross-encoder and/or ColBERT),
    `multiVector` / late interaction, `graph`, `query/transform`, `streaming`, and
    `pagination`. The frontier profile — hybrid + rerank + graph + multimodal.
  </Accordion>
</AccordionGroup>

<Note>
  Levels are a **coarse** signal. The precise, machine-checkable contract is always
  the capability set a server advertises at `initialize`. A client should gate on
  `supports(...)`, not on the level string.
</Note>

## The test suite

A transport-agnostic conformance suite validates **any** server, in **any**
language, over stdio or HTTP:

<CodeGroup>
  ```sh Python engine (stdio) theme={null}
  python3 conformance/check.py -- python3 examples/example_server.py
  ```

  ```sh C++ engine (stdio) theme={null}
  python3 conformance/check.py -- ./sdk/cpp/example_server
  ```

  ```sh Node.js engine (stdio) theme={null}
  python3 conformance/check.py -- node sdk/node/examples/example_server.js
  ```

  ```sh Rust engine (stdio) theme={null}
  python3 conformance/check.py -- ./sdk/rust/target/debug/examples/example_server
  ```

  ```sh Any engine (HTTP) theme={null}
  python3 conformance/check.py --http http://127.0.0.1:8000/rcp
  ```
</CodeGroup>

The harness is **level-aware**: it tags every check L0/L1/L2, skips the checks
for capabilities a server doesn't advertise, and prints the highest level the
server actually reaches:

```
26 passed, 0 failed, 0 skipped
CERTIFIED LEVEL: L2
declared _meta.conformance='L2' — consistent
```

It also **cross-checks honesty**: a server that declares `_meta.conformance: "L2"`
but only certifies L1 is flagged as `OVERCLAIMED` and the run exits non-zero —
even with zero failed checks — so a badge can't lie. Pass `--json` for a
CI-consumable report; the non-zero exit gates a release pipeline.

The Python and C++ reference example servers both **certify L2** (a real
dense + sparse → RRF → rerank hybrid pipeline), and every SDK's client drives
every other SDK's server over both stdio and HTTP.

## Conforming clients

A conforming *client* must:

<Steps>
  <Step title="Initialize first">Send `initialize` before any gated method.</Step>
  <Step title="Honour negotiation">Respect the negotiated protocol version.</Step>
  <Step title="Gate on capabilities">Never call an unadvertised method.</Step>
  <Step title="Correlate by id">Match responses to requests by `id`, not order.</Step>

  <Step title="Tolerate dropped notifications">
    Function correctly even if it drops every `notifications/progress` and
    `notifications/log`.
  </Step>
</Steps>
