monocle
Gives AI agents the ability to interact with iOS simulators through 21+ tools for mobile app testing.
README
Monocle
Playwright for Mobile — Give AI agents the ability to test any iOS mobile app.
Monocle is an open-source MCP server + visual dashboard that lets AI agents (Claude Code, Cursor, etc.) interact with iOS simulators through 21+ tools: tap, swipe, type, screenshot, inspect elements, wait for conditions, record sessions, and more.
Architecture
┌─────────────────────────────────────────────────────┐
│ Monocle Dashboard (Next.js) │
│ Live Simulator View + Agent Chat + Action Timeline │
└───────────────────────┬─────────────────────────────┘
│ HTTP + WebSocket (:7200)
┌───────────────────────▼─────────────────────────────┐
│ Monocle Server (Node.js) │
│ MCP Server (stdio+HTTP) + REST API + WS Streaming │
│ 21+ tools • Element refs (@e1) • Session recording │
└───────────┬────────────────────────┬────────────────┘
│ │
idb_companion xcrun simctl
(accessibility, (screenshots,
tap, swipe, type) recording, lifecycle)
Quick Start
# Prerequisites: Xcode 15+, Node.js 20+, idb_companion
npm install
npm run dev
# Or use via MCP (stdio mode for Claude Code):
npx tsx packages/server/src/index.ts --stdio
MCP Configuration
{
"mcpServers": {
"monocle": {
"command": "npx",
"args": ["tsx", "/path/to/monocle/packages/server/src/index.ts", "--stdio"]
}
}
}
Tools (21+)
| Category | Tools |
|---|---|
| Screen | screenshot, getScreenText |
| Interact | tap, tapByText, tapById, doubleTap, longPress, swipe, type, typeInto, pressKey |
| Inspect | listElements, findElement, getElementInfo |
| Wait | waitForElement, waitForText, assertVisible |
| Device | listDevices, launchApp, terminateApp, getDeviceInfo, openUrl |
| Record | startRecording, stopRecording |
Element Refs
Monocle assigns short refs (@e1, @e2, ...) to every UI element. Use them anywhere:
Agent: "tap @e3" → taps the Login button
Agent: "type into @e5 'hello@example.com'" → types into email field
Refs are stable within a session — same element keeps the same ref across calls.
Packages
packages/server— MCP server, iOS bridges, streaming, sessionspackages/dashboard— Next.js visual dashboardpackages/cli— CLI (monocle start,monocle devices,monocle screenshot)
Prerequisites
- macOS with Xcode 15+
- At least one iOS Simulator booted
idb_companioninstalled (brew install idb-companion)- Python 3.11 venv with
fb-idb(for accessibility tree)
License
MIT — Pivot Studio AI
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.