phantom-mcp
phantom-mcp
MCP-Server, der es Claude Code ermöglicht, iOS-Simulatoren, Android-Emulatoren und echte Geräte zu sehen und zu steuern. 24 Tools zum Testen mobiler Apps, ohne das Terminal zu verlassen.
Claude kann Screenshots machen, den Bildschirm lesen, tippen, scrollen, Felder ausfüllen, Assertionen prüfen, Videos aufnehmen – automatisch, auf iOS und Android.
Ein Testbericht mit Screenshots wird bei jeder Testsitzung automatisch generiert.
Architektur
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
Voraussetzungen
Tool | Erforderlich für | Überprüfung |
macOS 13+ | alles | - |
Xcode 15+ | iOS |
|
Node.js 18+ | alles |
|
Appium 3+ | iOS (WDA) |
|
xcuitest driver | iOS (WDA) |
|
Android SDK | Android |
|
Installation
Option A — npm (empfohlen)
# 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 — aus den Quellen
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"Die 24 Tools
Geräteverwaltung
Tool | Beschreibung |
| Listet alle Geräte auf (iOS-Sims + Android-Emus + echte Geräte) |
| Wählt das aktive Gerät aus. Automatischer Boot, falls ausgeschaltet. Automatische Vorbereitung des Geräts (Opt-out über skip_setup) |
| Versetzt das Gerät in einen sauberen Zustand: Zwischenablage leeren / Statusleisten-Overrides / Tastatur schließen / iOS QWERTY erzwingen |
Beobachtung
Tool | Beschreibung |
| Erstellt einen Screenshot des aktiven Geräts |
| Barrierefreiheitsbaum mit Index [N] für jedes Element |
| Wartet darauf, dass ein Element erscheint (mit Timeout) |
| Scrollt, bis ein Element gefunden wird |
Assertionen
Tool | Beschreibung |
| Überprüft, ob ein Text auf dem Bildschirm IST |
| Überprüft, ob ein Text NICHT auf dem Bildschirm IST |
Interaktion
Tool | Beschreibung |
| Tippt (nach Index, Koordinaten oder Text). Automatisches Schließen der Tastatur, falls das Ziel verdeckt ist |
| Langer Druck (Kontextmenüs) |
| Texteingabe mit Clear-Option und Verify-Option, um den Wert nach dem Tippen erneut zu lesen |
| Wischen (hoch/runter/links/rechts) |
| Schließt die Software-Tastatur (keine Aktion, falls nicht sichtbar) |
Navigation
Tool | Beschreibung |
| Öffnet eine URL / einen Deep Link |
Geräteaktionen
Tool | Beschreibung |
| Simuliert ein Schütteln |
| Ändert die Ausrichtung (Hochformat/Querformat) |
| Startet/stoppt die Videoaufnahme |
App-Lebenszyklus
Tool | Beschreibung |
| Startet eine App per Bundle-ID / Paketname |
| Schließt eine App |
Analyse & Automatisierung (Stufe 3)
Tool | Beschreibung |
| Barrierefreiheits-Audit: fehlende Labels, zu kleine Tippziele, Bilder ohne Alt-Text |
| Automatischer Testbericht: Start zum Beginn der Nachverfolgung, Ende zur Generierung des Markdowns. Jede Aktion wird automatisch protokolliert. |
| Vergleicht zwei Screenshots Pixel für Pixel, um visuelle Regressionen zu erkennen |
| Führt dieselbe Aktion auf mehreren Geräten mit einem Befehl aus |
Automatischer Betrieb
Geräteauswahl
Phantom bootet niemals automatisch ein Gerät. Es fordert dich auf zu wählen:
Wenn nur 1 Gerät aktiv ist, wird es automatisch verwendet
Wenn mehrere aktiv sind, wirst du aufgefordert, mit
set_devicezu wählenWenn keines aktiv ist, wird die Liste der verfügbaren Geräte angezeigt
Automatischer WDA-Start (iOS)
WebDriverAgent wird automatisch beim ersten iOS-Tool gestartet, das es benötigt. Erster Start ca. 60-90s (Xcode-Build), danach sofort.
ADB Multi-Device (Android)
Alle ADB-Befehle zielen auf das über -s <serial> ausgewählte Gerät ab. Keine Verwirrung bei mehreren Geräten.
Texteingabe (AZERTY-kompatibel)
Die Eingabe verwendet pbcopy + Cmd+V (Einfügen) anstelle der virtuellen Tastatur. Dies ist sofort einsatzbereit und funktioniert mit allen Tastaturlayouts (AZERTY, QWERTY usw.).
Automatischer Testbericht
Jede Aktion (Tippen, Tippen, Wischen, Assertion...) wird automatisch mit einem Screenshot aufgezeichnet. Am Ende des Tests wird ein Markdown-Bericht in /tmp/phantom-report-xxx/ generiert.
Sicherheit
Alle Systembefehle laufen über
execFile(keine Shell)Eingaben werden per Regex validiert: Bundle-IDs, UDIDs, Paketnamen, AVD-Namen, URLs
iOS-Prädikate maskiert (Anti-Injection)
Android-Text für die Geräte-Shell maskiert
Kein
as any, keinexec()Shell
Konfiguration
Optionale Umgebungsvariablen:
PHANTOM_WDA_PATH— Pfad zu WebDriverAgent (Standard: ~/.appium/...)PHANTOM_WDA_URL— WDA-URL (Standard: http://localhost:8100)
Mitwirken
Siehe CONTRIBUTING.md für das lokale Setup, das Muster zum Hinzufügen eines neuen Tools, Namenskonventionen und den PR-Workflow.
Siehe auch:
docs/LIMITATIONS.md — bekannte Einschränkungen + Workarounds
docs/PATTERNS.md — praktische Rezepte (iOS DatePicker, Bottom Sheets, etc.)
docs/FEATURE_REQUESTS.md — priorisierte Funktionen für die nächsten Versionen
docs/CHANGES_2026-04-30.md — Release Notes v2.3.0
Fehlerbehebung
WDA-Endlosschleife beim Absturz
MobAI oder ein anderes Tool verwendet Port 8100.
lsof -i :8100
pkill -f "MobAI""Kein Gerät verfügbar"
xcrun simctl list devices available # iOS
adb devices -l # AndroidWDA startet nicht
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 nicht gefunden
ls ~/Library/Android/sdk/platform-tools/adbProjektstruktur
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
- Alicense-qualityFmaintenanceAn 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
- Alicense-qualityDmaintenanceMCP 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
- Alicense-qualityDmaintenanceAn 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