# Ceraph: The Playwright MCP for React Native

> Ceraph is an MCP server that lets your AI coding agent drive and test a React Native or Expo app end-to-end on a real iOS device or simulator — the Playwright MCP for React Native.

- Author: Ike Studios LLC
- Published: 2026-07-14
- Canonical: https://ceraph.dev/blog/the-playwright-mcp-for-react-native

---

Every developer who has shipped a mobile app knows the testing story. You write the feature, then you write the tests — an Appium script, a Detox flow, a Maestro YAML — and then you maintain those tests forever as the UI moves under them. AI coding agents rewrote the first half of that story: they write the feature now. This post is about the second half — giving those same agents the ability to test what they built, on a real device, the way a person would.

That is what Ceraph does. It is an [MCP](https://modelcontextprotocol.io) server that lets an AI coding agent drive and test your React Native or Expo app end-to-end (E2E) on a real iOS device or the iOS Simulator: tap, type, swipe, deep-link, screenshot, and read runtime errors — so a code change is verified against the running app, not just against the type checker. If you already know Playwright's MCP for the web, Ceraph is that, for React Native.

## What is an MCP, briefly?

The Model Context Protocol (MCP) is an open standard — introduced by Anthropic and now supported across the popular AI coding tools — for handing an LLM agent a set of tools it can call. An MCP server exposes typed actions; an MCP client — Claude Code, Cursor, Codex, VS Code, Windsurf, and others — lets the model behind it (Anthropic's Claude, OpenAI's GPT, Google's Gemini, or xAI's Grok) invoke them mid-conversation. Ceraph ships as one npm package, `@ceraph/react-native-mcp`, and every capability below is a tool your agent can call while it works. No new service, no separate test runner — the agent you already code with gains hands and eyes on the device.

## From Selenium to AI agents

For twenty years, testing a UI meant writing a script. Selenium put the browser under program control back in 2004 and gave us WebDriver — the protocol nearly every tool since has built on. Cypress and Playwright modernized the web side with faster runs, smarter waiting, and less flake, but the shape held: a human writes the selectors and assertions, then keeps them green as the interface changes.

Mobile inherited the same model. Appium brought WebDriver to native apps, wrapping Apple's XCUITest and Android's UIAutomator behind one API. Detox added gray-box synchronization built for React Native; Maestro made flows declarative with YAML. These are good tools — but every one of them still needs a person to author the test, encode the selectors, and babysit the script as screens move. That maintenance tax is why so many mobile test suites quietly rot.

Agentic testing changes the assumption underneath all of it. The agents in Claude Code, Cursor, and Codex already write the feature; what they have lacked is a way to *use* the app they just changed — to open the screen, walk the flow, and see whether it actually works. Ceraph closes that gap. Instead of a human maintaining a script against brittle selectors, the agent drives the running app directly, reads a structured accessibility snapshot to decide what to do next, and adapts when the layout shifts. The test author and the test runner become the same agent: the one that wrote the code.

That is the line between scripted automation and agentic testing. Selenium, Appium, and Playwright run a script you wrote and maintain; Ceraph hands the agent the primitives and lets it test the way a person does — look, act, look again — no selector file to keep alive.

## The agentic loop: edit, ask, drive on device

Agentic testing only pays off when the agent can see what it did. The Ceraph loop is tight:

1. **You edit code** — add a screen, fix a bug, tweak a form.
2. **You ask your agent to test what the change touched.**
3. **The agent drives the app** on your connected iPhone or a booted simulator, observes each screen, and reports what passed and what looks off.

Under the hood that is four moves the agent repeats: `ceraph_start` to reach a ready state, `ceraph_snapshot` to observe, a `screen_*` primitive to act, then snapshot again. It is the same observe–act–observe agent loop that makes browser automation with Playwright reliable, brought to mobile.

## The core tools

- **`ceraph_start`** — one call brings the app to ready-to-test: Metro, build and install, WebDriverAgent, and an on-device verification pass. It runs only what is missing and stops at the first failed gate with a concrete fix.
- **`ceraph_snapshot`** — a structured, deterministic snapshot of the current screen: every element with its role, name, value, on-screen bounds, live state, and a stable `ref`. No LLM guesswork, no screenshot-pixel math — the agent gets a real accessibility tree to reason about.
- **`screen_*` primitives** — `screen_tap`, `screen_tap_and_verify`, `screen_type_into_field`, `screen_swipe`, `screen_scroll_to`, `screen_open_url` for deep links, and `screen_screenshot` for a pixel image. You plan the steps; Ceraph drives WebDriverAgent and reports the outcome.
- **Runtime error capture** — a `__DEV__` shim streams JS exceptions, unhandled promise rejections, network failures, and `console.error` back to the agent, so a redbox or a silent crash shows up in the conversation instead of being missed.
- **Camera and media shim** — iOS blocks external processes from injecting camera frames, so Ceraph serves a still image to `takePictureAsync` and a clip to `recordAsync`. Camera-heavy flows — ID scans, profile capture — become testable in two lines.
- **Test-user provisioning** — mint a managed test user against Clerk, Auth0, Supabase, Firebase, or Cognito so flows behind a sign-in wall still run end-to-end.

## Platform support

Ceraph is **iOS-only at launch**. A real iOS device over USB and the iOS Simulator — windowed or headless — are both supported. It requires a Mac with Xcode, because the runtime path (devicectl, WebDriverAgent, simctl) is Apple-specific. Android is on the roadmap; today, iOS testing is the whole surface.

## How it slots into your agent

Ceraph is client-agnostic — it works with any MCP client. Run one command in your React Native project root:

```
npx @ceraph/react-native-mcp@latest init
```

`init` auto-configures every MCP client it detects — Claude Code, Cursor, Codex, VS Code, Windsurf, Antigravity — installs a Claude Code hook that injects runtime errors straight into your conversation, and signs you in. Your agent supplies its own tokens; Ceraph hands it the driving and testing primitives. There is nothing new to learn: you keep vibe coding in the editor you already use, and now the agent can prove its work on a real device.

Ceraph gives LLM agents the same autonomous testing surface on iOS that Playwright gives them on the web: observe the screen, act on it, read the errors, iterate. That is React Native testing your agent can actually run — agentic, end-to-end, on a real device. It is the missing half of mobile test automation for the AI coding era.

Ready to try it? [Get started here.](/docs/get-started)
