# Repository Briefing: phone-harness/mcp
> Source: https://repoforai.com/repo/phone-harness/mcp (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/phone-harness/mcp
- **Official Docs / Website**: https://phone-harness.com
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (81/100 · Maintenance 35/35 · Adoption 15/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, MCP, API
- **Momentum**: 857 ★ total (+2 24h / +18 7d) · 76 forks
- **Topics**: `ai-agents`, `android`, `iphone`, `mcp`, `mcp-server`, `mobile-automation`, `model-context-protocol`, `phone-automation`
- **When to Use**: Best for: Mobile developers and QA teams using MCP agents to explore app flows, capture screenshots, or check UI behavior on cloud iPhones and Android emulators. Skip if: You need offline execution, control of a local device fleet, deterministic regression tests, or a setup that does not rely on Phone Harness cloud devices.

## Overview
```text
### Architecture & Core Mechanics
Phone Harness MCP is a Python bridge between an agent's MCP client and Phone Harness cloud devices. The hosted /mcp endpoint uses Streamable HTTP. Clients can sign in with OAuth for the phone:drive scope or send an API key as a bearer token. The agent lists or starts a device, then passes its device ID to tools that read or interact with the screen. Device execution happens in the cloud, not in the connector process.

The package requires Python 3.10 or newer and declares mcp>=2.3,<3, Click>=8.1, Pillow>=10, and Starlette>=0.40. The integration surface is the set of MCP tools: clients can compose screen reads and device actions without a client-specific device SDK. The hosted-mode container uses a bearer supplied with each request rather than embedding a credential in the image.

### Key Capabilities & Differentiators
The same tool surface targets dedicated cloud iPhones and cloud Android emulators. With no device specified, a start call launches a temporary Android emulator; a device ID can select an iPhone or a saved Android phone that retains apps and logins. A session runs for 30 minutes by default. That duration is a session setting, not a billing unit.

Screen inspection combines JPEG screenshots with visible text and tap-ready centers. Screenshots default to a maximum long edge of 1,024 pixels and include a conversion from image positions to screen coordinates. Element listing uses Android's accessibility tree or iPhone text recognition, so the two platforms do not expose equivalent UI semantics. The agent can tap, long-press, swipe, type, and open apps. Separate iPhone reservation tools provide a quote and a Stripe Checkout link; a person must complete payment.

### Trade-offs & Limitations
Compared with an Appium suite or native UI tests, this connector trades control over devices and runners for a short path from an MCP client to a cloud session. It fits exploratory, visual workflows better than regression suites that rely on stable locators and repeatable assertions. Android accessibility data and iPhone text recognition produce different kinds of observations, and screen coordinates can change with orientation. After a transition, an agent should re-read the screen rather than reuse old coordinates.

The MIT license covers the connector code, not the cloud devices. Android is metered by phone-minute, so stopping an idle session matters; iPhones are subscription-based, so stopping a session is not the same as canceling the subscription. Self-hosting changes where the connector runs but leaves the cloud dependency in place. No local model or CUDA stack is listed; size a relay for request concurrency and image handling, and keep test accounts and data separate from personal ones.

### Hardware & Deployment Guide
The lowest-setup path is to add https://mcp.phone-harness.com/mcp to a compatible client and authenticate. Write-tool support still depends on the client and workspace: ChatGPT web lists Business, Enterprise, and Edu for custom plugins that can drive a phone, while Pro access is limited to read and fetch tools. Local stdio, Docker, and Vercel are options for running the connector, not the device fleet.

The Dockerfile uses python:3.12-slim, installs the package, switches to non-root UID 10001, and starts phone-harness-mcp with --port 8000 --host 0.0.0.0. The example for a named public host also supplies --allowed-hosts mcp.example.com. For a source checkout, uv sync and uv run pytest cover dependency setup and test execution. The manifest marks version 0.1.0 as alpha; the ChatGPT walkthrough is a connector review recording, not a server package release.
```

## Key Capabilities
```text
- Transport: Streamable HTTP at /mcp, with OAuth phone:drive access or API-key bearer authentication.
- Device lifecycle: List running and startable devices, start a temporary Android emulator or select a provisioned device, and end sessions explicitly.
- Screen geometry: JPEGs default to a 1,024-pixel maximum long edge, with a mapping from image points to tap coordinates.
- UI inspection: Android uses accessibility data; iPhone uses text recognition. Visible labels and tap centers are available as text or JSON.
- Reservation approvals: iPhone deposits require human completion of Stripe Checkout; cancellation requires confirm=true.
- Container: The Python 3.12-slim image runs the phone-harness-mcp entrypoint as UID 10001 and exposes port 8000.
```

## Quick Start / Clone
```bash
uv sync
uv run pytest
uv run phone-harness-mcp --help
```
