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

# Choose your integration path

> One screen that maps your goal to the right Phosra surface — the five ways to integrate, what each one costs you in effort, and exactly where to start.

There are **five ways** to integrate with Phosra. They are not tiers of the same product — each one exists for a different job. Pick the row that matches what you are building; every path has a copy-paste quickstart that runs against the [live sandbox](https://phosra-api-sandbox-production.up.railway.app) with no account.

This page replaces reading [Architecture](/concepts/architecture), [Partner Integration Overview](/integration/overview), and [SDK Overview](/sdks/overview) end-to-end just to figure out where to begin.

## Start with one question

**What are you doing with child-safety rules?**

<CardGroup cols={3}>
  <Card title="Writing rules for a family" icon="pen-to-square" href="/integration/provider">
    You build a parental-controls or safety app. A parent grants consent; you write age-appropriate rules on the family's behalf. → **Provider path** (`@phosra/link`)
  </Card>

  <Card title="Enforcing rules in an app" icon="shield-halved" href="/integration/platform">
    You run an app, OS, router, or school network. You receive signed rule profiles and enforce them locally. → **Platform path** (`@phosra/gatekeeper`)
  </Card>

  <Card title="Just calling the API" icon="code" href="/quickstart">
    You want raw HTTP from any language — no SDK, no framework. → **Direct REST**
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Wiring an AI agent" icon="robot" href="/sdks/mcp-server">
    You want Claude, GPT, or another MCP-compatible agent to create families, set policies, and read enforcement state through tools. → **MCP server** (`@phosra/mcp`)
  </Card>

  <Card title="Building on the open protocol" icon="cube" href="/ocss/protocol-sdk">
    You need the vendor-neutral OCSS crypto primitives — sign/verify receipts, sealed envelopes, the Trust List — with no Phosra account and no lock-in. → **OCSS protocol SDK** (`@openchildsafety/ocss`)
  </Card>
</CardGroup>

## The five paths at a glance

| Path                  | Package                                                                                | Best for                                                      | You write                | First call effort | Start here                                     |
| --------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------ | ----------------- | ---------------------------------------------- |
| **Provider**          | [`@phosra/link`](https://www.npmjs.com/package/@phosra/link) `0.1.2`                   | Parental-control vendors that **issue** rules & consent       | TypeScript               | \~15 min          | [Provider quickstart →](/integration/provider) |
| **Platform**          | [`@phosra/gatekeeper`](https://www.npmjs.com/package/@phosra/gatekeeper) `0.2.2`       | Apps, OSes, routers, schools that **enforce** rules           | TypeScript               | \~15 min          | [Platform quickstart →](/integration/platform) |
| **Direct REST**       | none — plain JSON over HTTPS                                                           | Any language, quick scripts, backends                         | curl / Python / Go / any | **5 min**         | [Quickstart →](/quickstart)                    |
| **MCP server**        | [`@phosra/mcp`](https://www.npmjs.com/package/@phosra/mcp) `0.4.0`                     | AI agents & assistants (Claude, GPT, MCP clients)             | agent config             | \~5 min           | [MCP Server →](/sdks/mcp-server)               |
| **OCSS protocol SDK** | [`@openchildsafety/ocss`](https://www.npmjs.com/package/@openchildsafety/ocss) `0.1.3` | Anyone who wants the open crypto primitives, provider-neutral | TypeScript               | varies            | [Protocol SDK →](/ocss/protocol-sdk)           |

<Note>
  Every version above is verified against the public npm registry. `@phosra/link`, `@phosra/gatekeeper`, `@phosra/mcp`, and `@openchildsafety/ocss` are all live and installable today. The native **iOS** and **Android** enforcement SDKs are distributed privately (not on npm/Maven yet) — see [iOS SDK](/sdks/ios) / [Android SDK](/sdks/android).
</Note>

## How the paths relate

Most of the paths are **complementary**, not alternatives. A real deployment usually combines two:

* A **Provider** app (`@phosra/link`) writes rules → the hosted census distributes them → a **Platform** (`@phosra/gatekeeper`) enforces them. Two halves of the same flow.
* **Direct REST** and the **MCP server** are two different front doors to the *same* control-plane API. Pick REST for code, MCP for agents.
* The **OCSS protocol SDK** sits *underneath* both `@phosra/link` and `@phosra/gatekeeper` — they re-export its signing and verification primitives. Use it directly only if you want the raw protocol with no Phosra-specific helpers.

```mermaid theme={null}
flowchart LR
  P["Provider app<br/>@phosra/link"] -->|writes signed rules| C["Hosted OCSS census"]
  C -->|distributes signed profile| G["Platform<br/>@phosra/gatekeeper"]
  R["Direct REST / MCP"] -.->|manage families & policies| C
  O["@openchildsafety/ocss<br/>(crypto primitives)"] -.->|sign / verify| P
  O -.->|sign / verify| G
```

## Not sure yet? Try the fastest path first

The **Direct REST** path returns a real `201` in one call with **no account and no key**. Run this against the live sandbox to see a family, child, policy, and rules materialize — then decide which SDK you want on top:

```bash theme={null}
curl -X POST https://phosra-api-sandbox-production.up.railway.app/api/v1/setup/quick \
  -H "Content-Type: application/json" \
  -d '{"child_name":"Emma","birth_date":"2016-03-15","strictness":"recommended"}'
```

Real response from the sandbox (trimmed):

```json theme={null}
{
  "family": { "id": "7e1e2a77-1c5c-436d-9fc7-0d3b5bf4fc90", "name": "Emma's Family" },
  "child":  { "id": "65e1f14f-9d0a-491c-9108-bd6223a59778", "name": "Emma", "birth_date": "2016-03-15T00:00:00Z" },
  "policy": { "id": "8fd80f2d-6c29-4dcb-bcd1-a4794f8ded4e", "name": "Emma's Protection Policy", "status": "active" },
  "rules":  [ /* age-appropriate rules for a preteen */ ]
}
```

<Tip>
  The full zero-to-enforcement version of this call — in curl, TypeScript, Python, and Go — lives in the [Quickstart](/quickstart). Every tab is copy-paste and runs against the same open sandbox.
</Tip>

## Decision checklist

Still torn between two paths? Match the strongest statement below:

* **"A parent needs to authorize me before I can act."** → **Provider** (`@phosra/link`) — it runs the consent ceremony and signs your rule-write directives.
* **"I need to block or allow content on a device, in real time, offline-safe."** → **Platform** (`@phosra/gatekeeper`) — it verifies the signed profile once and decides locally with `isAllowed()`, fail-closed, zero per-decision network calls.
* **"I just need to script family/policy setup from my backend."** → **Direct REST** — no SDK, any language.
* **"An LLM agent should drive this."** → **MCP server**.
* **"I want the open standard's crypto, and I might swap providers later."** → **OCSS protocol SDK** — identical across every OCSS-conformant implementation.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart — first call in 5 min" icon="terminal" href="/quickstart">
    Zero to an enforced policy against the live sandbox, no key.
  </Card>

  <Card title="Architecture overview" icon="diagram-project" href="/concepts/architecture">
    The control plane vs the data plane vs the open OCSS protocol — one mental model.
  </Card>

  <Card title="Partner Integration Overview" icon="handshake" href="/integration/overview">
    Provider and Platform roles in depth, plus the pricing boundary.
  </Card>

  <Card title="Example apps & starters" icon="cubes" href="/guides/example-apps">
    Runnable end-to-end starters and every clonable example repo.
  </Card>
</CardGroup>
