Fast Mobile MCP
High-performance mobile automation architecture with a thin MCP gateway and dedicated Go workers for Android and iOS.
fast-mobile-mcp
High-performance mobile automation architecture with a thin MCP gateway and dedicated Go workers for Android and iOS.
Purpose
fast-mobile-mcp exists to make mobile automation usable from MCP clients (agents, CLIs, IDE assistants) with production-like behavior:
- one MCP endpoint for both Android and iOS
- strict per-device action serialization with cross-device parallelism
- snapshot-based element references (
ref_id) for stable follow-up actions - small response payloads for LLM-friendly tool usage
- binary screenshot streaming over gRPC between gateway and workers
Use this project if you want a mobile MCP server that is fast, deterministic, and easy to plug into any stdio-compatible MCP client.
Monorepo Layout
gateway-mcp/: MCP server (Node.js + TypeScript) with validation, per-device queueing, gRPC routing, retries, and response shaping.worker-android/: Android worker (Go) with cached discovery, persistent uiautomator2 clients, snapshot store, and serial per-device executors.worker-ios/: iOS worker (Go) with simulator discovery, persistent WebDriverAgent clients, snapshot store, and serial per-device executors.proto/: shared protobuf contract and generated code output location.shared/: shared config and shared Go packages (snapshot model).
Prerequisites
- Go (1.22+)
protoc(Protocol Buffers compiler)- Node.js (20+) + npm
adbinPATHfor Android runtimexcrun simctl+ WebDriverAgent for iOS runtime- Android
uiautomator2HTTP server reachable on forwarded device port (default7912) - iOS WebDriverAgent reachable on configured host/port (default
http://127.0.0.1:8100+)
Quick Start
- Install gateway dependencies:
cd gateway-mcp && npm install
- Generate protobuf stubs:
- Linux/macOS:
./scripts/gen-proto.sh - Windows:
powershell -ExecutionPolicy Bypass -File .\scripts\gen-proto.ps1
- Linux/macOS:
- Build gateway:
cd gateway-mcp && npm run build
One-Command MCP Server (for CLI clients)
Use this as your MCP server command in any stdio-compatible client:
- Windows PowerShell:
powershell -ExecutionPolicy Bypass -File <repo>\scripts\mcp-stdio.ps1 - Windows cmd:
<repo>\scripts\mcp-stdio.cmd - Linux/macOS:
<repo>/scripts/mcp-stdio.sh - Fallback:
node <repo>/gateway-mcp/scripts/mcp-stdio.mjs
Important: replace <repo> with your real local path. Do not paste C:\path\to\... literally.
Detailed client config mapping: docs/CLI_SETUP.md
Includes explicit setup for Codex CLI, Claude Code, Claude Desktop, and Cursor.
What this launcher does:
- starts local Android worker by default
- starts local iOS worker only on macOS by default
- starts gateway on stdio so MCP clients can connect directly
Launcher env switches:
FMMCP_START_ANDROID=0to disable local Android workerFMMCP_START_IOS=1to force starting local iOS workerFMMCP_BOOTSTRAP=1to allow startup-timenpm install/build(disabled by default for faster, stable MCP handshakes)
Install in Popular MCP Clients
Use this repo's launcher command in your client config:
powershell -ExecutionPolicy Bypass -File C:\path\to\fast-mobile-mcp\scripts\mcp-stdio.ps1
Codex CLI
codex mcp add fast-mobile-mcp -- powershell -ExecutionPolicy Bypass -File C:\path\to\fast-mobile-mcp\scripts\mcp-stdio.ps1
codex mcp list
~/.codex/config.toml alternative:
[mcp_servers.fast-mobile-mcp]
command = "powershell"
args = ["-ExecutionPolicy", "Bypass", "-File", "C:\\path\\to\\fast-mobile-mcp\\scripts\\mcp-stdio.ps1"]
[mcp_servers.fast-mobile-mcp.env]
FMMCP_START_ANDROID = "1"
FMMCP_START_IOS = "0"
Claude Code
claude mcp add-json fast-mobile-mcp "{\"type\":\"stdio\",\"command\":\"powershell\",\"args\":[\"-ExecutionPolicy\",\"Bypass\",\"-File\",\"C:\\\\path\\\\to\\\\fast-mobile-mcp\\\\scripts\\\\mcp-stdio.ps1\"],\"env\":{\"FMMCP_START_ANDROID\":\"1\",\"FMMCP_START_IOS\":\"0\"}}"
claude mcp list
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"fast-mobile-mcp": {
"type": "stdio",
"command": "powershell",
"args": [
"-ExecutionPolicy",
"Bypass",
"-File",
"C:\\path\\to\\fast-mobile-mcp\\scripts\\mcp-stdio.ps1"
],
"env": {
"FMMCP_START_ANDROID": "1",
"FMMCP_START_IOS": "0"
}
}
}
}
Startup Error Fix (Codex)
If Codex shows:
MCP startup failed: ... initialize response
it is usually a bad script path in the MCP config. Verify and fix with:
codex mcp get fast-mobile-mcp
codex mcp remove fast-mobile-mcp
codex mcp add fast-mobile-mcp -- powershell -ExecutionPolicy Bypass -File C:\Users\nagar\fast-mobile-mcp\scripts\mcp-stdio.ps1
codex mcp list
Cursor
Add to .cursor/mcp.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"fast-mobile-mcp": {
"type": "stdio",
"command": "powershell",
"args": [
"-ExecutionPolicy",
"Bypass",
"-File",
"C:\\path\\to\\fast-mobile-mcp\\scripts\\mcp-stdio.ps1"
],
"env": {
"FMMCP_START_ANDROID": "1",
"FMMCP_START_IOS": "0"
}
}
}
}
MCP Tool Surface
The gateway exposes these tools:
list_devicesget_active_appget_ui_treefind_elementstaptypeswipescreenshot_stream
Runtime Smoke E2E
Run a runtime smoke check through MCP (workers + gateway):
cd gateway-mcp && npm run e2e:smoke
What it validates:
- tool registration (
tools/list) list_devicesreturns at least one ready deviceget_ui_treereturns a snapshotfind_elementsworks against that snapshotscreenshot_streamreturns frame metadata- invalid device request fails as expected
Note: action-level checks (get_ui_tree, tap/type/swipe, screenshots) require platform automation servers to be alive:
- Android:
uiautomator2endpoint responds to/version - iOS: WDA endpoint responds to
/status
Optional E2E env switches:
FMMCP_E2E_DEVICE_ID=<device-id>to target a specific deviceFMMCP_E2E_PLATFORM=PLATFORM_ANDROID|PLATFORM_IOSto target platformFMMCP_E2E_ENABLE_ACTIONS=1to include a small swipe action check
Quick Verification for Reviewers
For anyone checking the repo directly, this is the fastest verification path:
cd gateway-mcp && npm install && npm run build- from repo root:
powershell -ExecutionPolicy Bypass -File .\scripts\gen-proto.ps1(Windows) or./scripts/gen-proto.sh(Linux/macOS) cd worker-android && go build ./cmd/workercd worker-ios && go build ./cmd/workercd gateway-mcp && npm run e2e:smoke(requires runtime dependencies and at least one ready device)
Build Targets
make protomake build-gatewaymake build-workersmake mcp-stdiomake e2e-smoke
Runtime Design Guarantees
- parallel automation across devices
- strict serial execution per device
- snapshot-based
ref_idaddressing - small, shaped payloads to MCP clients
- gRPC binary screenshot chunk streaming
Environment
- Gateway env:
gateway-mcp/.env.example - Android env:
worker-android/.env.example - iOS env:
worker-ios/.env.example - Unified sample config:
shared/config/sample.yaml
Verwandte Server
Trading MCP Server
An intelligent trading assistant that fetches live stock prices using the Yahoo Finance API.
MCP-Ambari-API
Automate Apache Ambari operations with AI/LLM: Natural language commands for Hadoop cluster management, service control, configuration monitoring, and real-time status tracking via Model Context Protocol (MCP) tools.
norikae-mcp
🚃 乗換案内MCP - 乗り換え検索 / Norikae MCP - Japanese train route search using Yahoo! Transit
SwitchBot MCP Server
Control SwitchBot devices interactively using the SwitchBot API.
mcp-dice
Rolls dice using standard notation (e.g., 1d20) and returns individual rolls and their sum.
Chromia MCP
Send CHR transactions using the Chromia Wallet.
D&D MCP Server
A server for managing Dungeons & Dragons campaigns, storing all data in local JSON files.
BloodHound MCP
Enables Large Language Models to interact with BloodHound Community Edition data.
Android-Mobile-MCP
This MCP server enabling AI agents to control Android devices.
AI Endurance
AI coach for running, cycling, triathlon