phantom-mcp
Allows testing and automation of Android emulators and real devices through ADB and UIAutomator, enabling screenshot capture, UI interaction, app launching, and accessibility audits.
Provides integration with Appium for iOS automation through WebDriverAgent, enabling UI testing, element interaction, and mobile app automation workflows.
Enables testing and automation of iOS simulators and real devices via xcrun simctl and WebDriverAgent, supporting screenshot capture, UI interaction, app management, and accessibility testing.
Provides platform support for running mobile testing automation tools, serving as the base operating system for iOS simulator management and Android emulator execution.
Enables iOS simulator management and WebDriverAgent execution for iOS app testing and automation through Xcode command-line tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@phantom-mcptake a screenshot of the login screen on the iPhone 15 simulator"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
phantom-mcp
MCP server that allows Claude Code to see and control iOS simulators, Android emulators, and real devices. 24 tools to test mobile apps without leaving the terminal.
Claude can take screenshots, read the screen, tap, scroll, fill in fields, verify assertions, record videos — automatically, on iOS and Android.
A test report with screenshots is generated automatically at the end of each test session.
Architecture
Claude Code
| MCP protocol (stdio)
v
Phantom (Node.js TypeScript)
| |
v v
iOS Android
xcrun simctl ADB
WebDriverAgent UIAutomator
(localhost:8100) (adb shell)
| |
v v
Simulateur / iPhone Emulateur / DeviceRelated MCP server: mobile-device-mcp
Prerequisites
Tool | Required for | How to check |
macOS 13+ | all | - |
Xcode 15+ | iOS |
|
Node.js 18+ | all |
|
Appium 3+ | iOS (WDA) |
|
xcuitest driver | iOS (WDA) |
|
Android SDK | Android |
|
Installation
Option A — npm (recommended)
# 1. Installer le package
npm install -g phantom-mcp
# 2. Installer Appium + driver iOS
npm install -g appium
appium driver install xcuitest
# 3. Enregistrer dans Claude Code
claude mcp add -s user phantom -- npx phantom-mcpOption B — from source
git clone https://github.com/nthimpulse/phantom-mcp.git
cd phantom-mcp
npm install
npm run build
claude mcp add -s user phantom -- node "$(pwd)/build/index.js"The 24 tools
Device management
Tool | Description |
| Lists all devices (iOS sims + Android emus + real devices) |
| Selects the active device. Auto-boots if off. Auto-prepares the device (opt-out via skip_setup) |
| Sets the device to a clean state: clear clipboard / status bar overrides / dismiss keyboard / force QWERTY iOS |
Observation
Tool | Description |
| Captures the active device screen |
| Accessibility tree with index [N] for each element |
| Waits for an element to appear (with timeout) |
| Scrolls until an element is found |
Assertions
Tool | Description |
| Verifies that text IS on the screen |
| Verifies that text IS NOT on the screen |
Interaction
Tool | Description |
| Taps (by index, coordinates, or text). Auto-dismisses keyboard if target is obscured |
| Long press (context menus) |
| Text entry with clear option, and verify option to re-read the value after typing |
| Swipe (up/down/left/right) |
| Closes the soft keyboard (no-op if not visible) |
Navigation
Tool | Description |
| Opens a URL / deep link |
Device actions
Tool | Description |
| Simulates a shake |
| Changes orientation (portrait/landscape) |
| Starts/stops video recording |
App lifecycle
Tool | Description |
| Launches an app by bundle ID / package name |
| Closes an app |
Analysis & Automation (Tier 3)
Tool | Description |
| Accessibility audit: missing labels, tap targets too small, images without alt text |
| Automatic test report: start to begin tracking, end to generate the markdown. Each action is tracked automatically. |
| Compares two screenshots pixel by pixel to detect visual regressions |
| Executes the same action on multiple devices in one command |
Automatic operation
Device selection
Phantom never boots a device automatically. It asks you to choose:
If only 1 device is active, it uses it automatically
If multiple, it asks you to choose with
set_deviceIf none, it shows you the list of available devices
Auto-launch WDA (iOS)
WebDriverAgent is launched automatically on the first iOS tool that needs it. First launch ~60-90s (Xcode build), then instantaneous.
ADB multi-device (Android)
All ADB commands target the device selected via -s <serial>. No multi-device confusion.
Text entry (AZERTY compatible)
Entry uses pbcopy + Cmd+V (paste) instead of the virtual keyboard. It is instantaneous and works on all keyboard layouts (AZERTY, QWERTY, etc.).
Automatic test report
Each action (tap, type, swipe, assert...) is automatically recorded with a screenshot. At the end of the test, a markdown report is generated in /tmp/phantom-report-xxx/.
Security
All system commands go through
execFile(no shell)Inputs validated by regex: bundle IDs, UDIDs, package names, AVD names, URLs
iOS predicates escaped (anti-injection)
Android text escaped for the device shell
Zero
as any, zeroexec()shell
Configuration
Optional environment variables:
PHANTOM_WDA_PATH— path to WebDriverAgent (default: ~/.appium/...)PHANTOM_WDA_URL— WDA URL (default: http://localhost:8100)
Contributing
See CONTRIBUTING.md for local setup, the pattern for adding a new tool, naming conventions, and the PR workflow.
See also:
docs/LIMITATIONS.md — known limitations + workarounds
docs/PATTERNS.md — practical recipes (iOS DatePicker, bottom sheets, etc.)
docs/FEATURE_REQUESTS.md — prioritized features for upcoming versions
docs/CHANGES_2026-04-30.md — release notes v2.3.0
Troubleshooting
WDA crash in a loop
MobAI or another tool is using port 8100.
lsof -i :8100
pkill -f "MobAI""No device available"
xcrun simctl list devices available # iOS
adb devices -l # AndroidWDA does not start
cd ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent
xcodebuild -project WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
-destination "platform=iOS Simulator,name=iPhone 17 Pro" \
testADB not found
ls ~/Library/Android/sdk/platform-tools/adbProject structure
phantom/
src/
index.ts Point d'entree MCP (24 tools)
platforms/
types.ts Interfaces communes
ios/
simctl.ts Wrapper xcrun simctl
wda.ts Client WDA + auto-launch
android/
adb.ts Wrapper ADB complet
tools/ 24 tools (21 fichiers)
utils/
device-manager.ts Detection + routing multi-device
xml.ts Parser XML partage
docs/
README.md Ce fichier
TUTORIAL.md Tuto pas-a-pas
FLOWS.md Exemples de flows de testMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that provides comprehensive tools for managing iOS simulators, including device control, app lifecycle management, and UI automation. It enables developers to boot devices, install apps, capture screenshots, and simulate user interactions through natural language commands.3MIT
- AlicenseAqualityDmaintenanceMCP server that gives AI coding assistants the ability to see and interact with mobile devices. 49 tools for Android/iOS — AI-powered visual analysis (Claude + Gemini), smart tap/type by description, Flutter widget tree inspection, video recording, and test script generation. 4-tier element search with <1ms local matching. Free tier included, zero setup via npx.49793Business Source 1.1
- AlicenseNot gradedqualityDmaintenanceMCP server for cross-platform mobile automation (iOS/Android) using accessibility trees and screenshots, enabling agents to interact with apps on simulators, emulators, and physical devices.7Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server for mobile automation that enables LLMs to interact with Android and iOS devices through screenshot, tap, swipe, log analysis, and app lifecycle management.242MIT
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nthImpulse/phantom-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server