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
Server Terkait
Weather MCP Server
Provides real-time weather alerts and detailed forecasts for US locations using the National Weather Service API.
Neonia
The ultimate platform for Autonomous AI Agents. Features include Autonomous Tool Discovery (dynamically finds and executes missing capabilities), Stateful Cloud Memory (remembers cross-session context), Context Packing (saves LLM tokens), and 20+ specialized dev tools.
D&D MCP Server
A server for managing Dungeons & Dragons campaigns, storing all data in local JSON files.
WeGene Assistant
Analyze your WeGene genetic testing report using large language models.
OilPriceAPI
Real-time oil, gas, and commodity prices. 40+ energy commodities with natural language queries, price subscriptions, and analyst prompts.
Freebeat AI
Allows users to generate music videos using Freebeat through MCP
3D Cartoon Generator & File System Tools
Generates 3D-style cartoon images using Google's Gemini AI and provides secure file system operations.
NVD CVE MCP Server
The NVD CVE MCP Server is a powerful security research tool
PoshMCP
Expose explicitly whitelisted PowerShell commandlets as a MCP Tool
mycop
AI code security scanner with 100 built-in rules covering OWASP Top 10 and CWE Top 25