MCP Appium
OfficialMCP Appium is a mobile automation MCP server for Android and iOS that lets you manage Appium sessions, devices, UI elements, gestures, apps, and test/locator generation.
Discover and select local iOS/Android devices, and prepare iOS simulators or real devices for testing.
Create, attach to, detach from, delete, list, and select Appium sessions, including remote servers.
Control device behavior: lock/unlock, shake, notifications, geolocation, orientation, device info, files, driver settings, keyboard, clipboard, and alerts.
Find one or many UI elements, read text/attributes, get the active element, and fetch page source XML.
Perform gestures: tap, double-tap, long-press, scroll, swipe, pinch-zoom, scroll-to-element, back, drag-and-drop, and raw W3C multi-touch actions.
Enter text, press navigation/hardware keys, take screenshots, record the screen, and manage native/webview contexts.
Manage app lifecycle: install, uninstall, activate, terminate, background, clear data, deep link, list, check state, and handle permissions.
Generate locator candidates and test-generation workflows.
Optional configured features include AI-vision element finding and documentation/skills tools.
Enables mobile test automation for Android apps using UiAutomator2, supporting element discovery, interactions, screen navigation, session management, and automated test generation for both emulators and real devices.
Integrates with Android SDK for Android device testing setup and configuration.
Provides comprehensive mobile automation capabilities through Appium, including cross-platform test creation, intelligent element locator generation, context switching for webviews, and Java/TestNG test code generation following Page Object Model best practices.
Enables mobile test automation for iOS apps using XCUITest, supporting simulator boot, WebDriverAgent setup, element interactions, screen navigation, session management, and automated test generation for both simulators and real devices.
Integrates with Xcode and iOS simulators for iOS device testing, including WebDriverAgent installation and configuration for real device testing with provisioning profiles.
Click on "Deploy 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., "@MCP Appium take a screenshot of the login screen on my Android device"
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.
MCP Appium - MCP server for Mobile Development and Automation | iOS, Android, Simulator, Emulator, and Real Devices
MCP Appium is an intelligent MCP (Model Context Protocol) server designed to empower AI assistants with a robust suite of tools for mobile automation. It streamlines mobile app testing by enabling natural language interactions, intelligent locator generation, and automated test creation for both Android and iOS platforms.
Table of Contents
Related MCP server: MobAI MCP Server
🚀 Features
Cross-Platform Support: Automate tests for both Android (UiAutomator2) and iOS (XCUITest).
AI-Powered Element Finding: Locate UI elements using natural language descriptions powered by vision models - no need for complex XPath or selectors.
Intelligent Locator Generation: AI-powered element identification using priority-based strategies.
Interactive Session Management: Easily create and manage sessions on local mobile devices.
Smart Element Interactions: Perform actions like clicks, text input, screenshots, and element finding.
Automated Test Generation: Generate Java/TestNG test code from natural language descriptions.
Page Object Model Support: Utilize built-in templates that follow industry best practices.
Flexible Configuration: Customize capabilities and settings for different environments.
Multilingual Support: Use your native language - AI handles all interactions naturally in any language (English, Spanish, Chinese, Japanese, Korean, etc.).
📋 Prerequisites
Before you begin, ensure you have the following installed:
System Requirements
Node.js (22.x from 22.23.4, 24.x from 24.22.1, or 26.12.1 and newer)
npm or yarn
Java Development Kit (JDK) (8 or higher)
Android SDK (for Android testing)
Xcode (for iOS testing on macOS)
MCP Appium supports two driver modes:
Embedded local drivers: when
appium_session_managementcreates anandroidoriossession withoutremoteServerUrl, MCP Appium uses the bundledappium-uiautomator2-driverorappium-xcuitest-driverdependency directly. You still need the platform toolchains below, but you do not need to install a global Appium server or runappium driver install uiautomator2/appium driver install xcuitestfor this mode.Remote WebDriver/Appium server: when
remoteServerUrlis provided toaction=createoraction=attach, MCP Appium uses thewebdriverclient to talk to that existing server. In this mode the remote server is responsible for its installed drivers, plugins, device access, and capability handling. Use this mode forplatform=general; embedded local creation is available only for Android and iOS.
Mobile Testing Setup for embedded local drivers
Android
Install Android Studio and the Android SDK.
Set the
ANDROID_HOMEenvironment variable.Add the Android SDK tools to your system's PATH.
Enable USB debugging on your Android device.
Install the Android platform tools/build tools and keep
adbavailable onPATH.
iOS (macOS only)
Install Xcode from the App Store.
Install the Xcode Command Line Tools:
xcode-select --install.Install iOS simulators through Xcode.
For real device testing, enable Developer Mode on the device and sign in to your Apple ID in Xcode (Settings → Accounts). Use
appium_prepare_ios_real_deviceto download and sign WebDriverAgent in a single call - it will guide you through provisioning profile selection and return capabilities for session startup.
🛠️ Installation
Standard config works in most of the tools::
{
"mcpServers": {
"appium-mcp": {
"disabled": false,
"timeout": 100,
"type": "stdio",
"command": "npx",
"args": ["appium-mcp@latest"],
"env": {
"ANDROID_HOME": "/path/to/android/sdk",
"CAPABILITIES_CONFIG": "/path/to/your/capabilities.json"
}
}
}
}In Cursor IDE
The easiest way to install MCP Appium in Cursor IDE is using the one-click install button:
This will automatically configure the MCP server in your Cursor IDE settings. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
Or install manually:
Go to Cursor Settings → MCP → Add new MCP Server. Name it to your liking, use command type with the command npx -y appium-mcp@latest. You can also verify config or add command arguments via clicking Edit.
Here is the recommended configuration:
{
"appium-mcp": {
"disabled": false,
"timeout": 100,
"type": "stdio",
"command": "npx",
"args": ["appium-mcp@latest"],
"env": {
"ANDROID_HOME": "/Users/xyz/Library/Android/sdk"
}
}
}Note: Make sure to update the ANDROID_HOME path to match your Android SDK installation path.
HTTP transport security
The --httpStream transport rejects MCP requests containing an Origin header
by default and disables CORS. To allow a trusted browser client, set a
comma-separated list of exact origins before starting the server:
APPIUM_MCP_ALLOWED_ORIGINS='https://inspector.example.com,http://localhost:3000' appium-mcp --httpStreamOrigins must use http or https and contain only scheme://host[:port].
Paths (including a trailing slash), credentials, wildcards and null are not
accepted; invalid configuration fails startup. Matching is exact, including
scheme and port. Unlisted, empty and opaque (null) origins receive HTTP 403
on MCP requests, even with an existing session. Preflight responses only grant
CORS access to listed origins. Browser cookies are not enabled by this setting.
The allowlist is captured when the server is constructed. It applies to both
the CLI and createAppiumMcpServer; the raw httpStream.cors option cannot
override it. Unset or empty configuration grants no browser access.
Clients that omit Origin, and stdio clients, continue to work. Origin validation
is not client authentication: non-browser clients can omit or forge this header.
Keep the HTTP listener on loopback; deployments exposed to other machines need
authentication and network access controls.
With Gemini CLI
Use the Gemini CLI to add the MCP Appium server:
gemini mcp add appium-mcp npx -y appium-mcp@latestThis will automatically configure the MCP server for use with Gemini. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
With Claude Code CLI
Use the Claude Code CLI to add the MCP Appium server:
claude mcp add appium-mcp -- npx -y appium-mcp@latestThis will automatically configure the MCP server for use with Claude Code. Make sure to update the ANDROID_HOME environment variable in the configuration to match your Android SDK path.
⚙️ Configuration
Environment Variables
Note: For embedded local Android/iOS sessions, MCP Appium already includes the UiAutomator2 and XCUITest driver packages. The system-level requirements are the platform toolchains (
ANDROID_HOME, Java, Android SDK tools, Xcode/iOS signing or simulator setup). For remote sessions, configure those requirements on the remote Appium/WebDriver server instead.
Variable | Required | Description |
| Optional | Absolute path to a |
| Optional | Directory where screenshots and screen recordings are saved. Defaults to the system temp directory ( |
| Optional | Directory for fresh XML snapshots when |
| Optional | Set to |
| Optional | MCP Apps static UI mode. Enabled by default. Set to |
| Optional | Session cleanup when the MCP client disconnects: |
| Optional | Absolute path to a pre-extracted |
| Optional | Comma-separated list of exact HTTP(S) origins allowed to access the HTTP transport from browser clients (e.g. |
REMOTE_SERVER_URL_ALLOW_REGEX | Optional | Regular expression applied to the complete remoteServerUrl value before MCP Appium connects to a remote Appium/WebDriver server. When unset, any valid HTTP(S) server URL is accepted. This checks the supplied URL only, not destinations selected by the WebDriver client from server responses. See Remote server security and trust model. |
REMOTE_SERVER_ENABLE_DIRECT_CONNECT | Optional |
|
ALLOW_REMOTE_APP_URLS | Optional |
|
| Optional | Set to |
| Required when | Base URL of the OpenAI-compatible vision model API |
| Required when | API key for the vision model provider |
| Optional | Vision model name (default: |
| Optional | Coordinate type: |
| Optional | Max image width in pixels before compression (default: |
| Optional | JPEG quality 1–100 for compressed screenshots sent to the vision API (default: |
| Optional | Set to |
| Optional | Hugging Face model used for semantic search in Appium documentation queries (default: |
| Optional | Directory path for persisted attached remote session info. When set, attached remote sessions are stored as JSON files in that directory and can be rehydrated after restart. |
| Optional | Set to |
| Optional | Set to |
| Optional | Set to |
| Optional | Service name reported to the OpenTelemetry collector (example: |
| Optional | Trace export protocol: |
| Optional | Trace-specific protocol; overrides |
| Optional | Traces endpoint. HTTP/JSON: |
| Optional | Trace sampling strategy; |
| Optional | Comma-separated |
REMOTE_SERVER_ENABLE_DIRECT_CONNECT and ALLOW_REMOTE_APP_URLS preserve existing behavior
when unset. Values are case-insensitive and may contain surrounding whitespace; other values
(including an empty string) fail server startup. They are operator-controlled environment
settings, not MCP tool arguments.
URL-based app installation is an intentional Appium feature. For embedded sessions it downloads
on the MCP host; for remote sessions it downloads on the remote Appium server. Disabling
ALLOW_REMOTE_APP_URLS limits these app inputs, not all host network access or all driver
capabilities that may use the network. When URL installation is enabled, redirect handling,
download size limits, and cache management remain the responsibility of the Appium downloader
and deployment controls. The app lifecycle tool uses openWorldHint: true because its operations
can interact with external services.
OpenTelemetry tracing
OpenTelemetry tracing is disabled by default. Set APPIUM_MCP_OTEL_ENABLED=true to initialize the Node.js OpenTelemetry SDK before the MCP server is constructed. The SDK uses standard OTEL_* environment variables, for example:
APPIUM_MCP_OTEL_ENABLED=true
# Optional: include sanitized non-sensitive argument values in spans.
# APPIUM_MCP_OTEL_INCLUDE_ARGUMENT_VALUES=true
# Optional: attach custom key=value pairs to every span (e.g. test case ID, team name).
# OTEL_RESOURCE_ATTRIBUTES=testcase.id=my-test-123,team=platform
OTEL_SERVICE_NAME=appium-mcp
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4318/v1/traces
OTEL_TRACES_SAMPLER=parentbased_always_onThe default remains OTLP HTTP/JSON. To use OTLP/gRPC with TLS:
APPIUM_MCP_OTEL_ENABLED=true \
OTEL_SERVICE_NAME=appium-mcp \
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc \
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://collector.example.com:443 \
npm run start:stdioFor a local gRPC collector without TLS, use http://127.0.0.1:4317. gRPC endpoints must not include
/v1/traces; HTTP/JSON trace endpoints should include that path (or the receiver's configured path).
Both exporters accept https:// for TLS. The receiver must support the selected protocol and encoding.
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL takes precedence over OTEL_EXPORTER_OTLP_PROTOCOL; empty values
are treated as unset. Unsupported protocols, including http/protobuf, produce an initialization error
when tracing is enabled. Endpoint, headers, timeout, and TLS configuration are handled by the selected
OpenTelemetry exporter. For example, use OTEL_EXPORTER_OTLP_TRACES_HEADERS for authentication metadata,
and OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE for a custom gRPC CA certificate file.
See the OpenTelemetry environment variable documentation and gRPC exporter documentation.
When enabled, appium-mcp creates spans for MCP tool calls, prompt loads, resource reads, and resource template reads. Error status is recorded for thrown operation errors and MCP tool results marked with isError. Span attributes intentionally avoid raw screenshots, XML page source, prompts, credentials, and other high-cardinality or sensitive payloads.
Tool spans include payload-free result-size attributes: mcp.tool.result.content_count, content_types, text_chars, resource_count, resource_text_chars, image_count, audio_count, base64_chars, and base64_bytes_estimate (all prefixed with mcp.tool.result.). content_types contains only known MCP types or other; payload values, resource URIs, MIME types, and unknown type strings are never recorded. Sizes are counted directly from known result fields without serializing or copying the complete result.
For local trace inspection, use the Jaeger setup in tools/telemetry:
npm run telemetry:jaeger:startThen open http://127.0.0.1:16686 and run appium-mcp with the environment values in tools/telemetry/jaeger.env.
Capabilities
Create a capabilities.json file to define your device capabilities:
{
"android": {
"appium:app": "/path/to/your/android/app.apk",
"appium:deviceName": "Android Device",
"appium:platformVersion": "11.0",
"appium:automationName": "UiAutomator2",
"appium:udid": "your-device-udid"
},
"ios": {
"appium:app": "/path/to/your/ios/app.ipa",
"appium:deviceName": "iPhone 15 Pro",
"appium:platformVersion": "17.0",
"appium:automationName": "XCUITest",
"appium:udid": "your-device-udid"
},
"general": {
"platformName": "mac",
"appium:automationName": "mac2",
"appium:bundleId": "com.apple.Safari"
}
}Set the CAPABILITIES_CONFIG environment variable to point to your configuration file.
Embedded session capability policy
For embedded Android and iOS sessions, each platform section of CAPABILITIES_CONFIG can define two optional lists in $toolInput. Both default to empty. Unlisted capabilities follow the usual merge rules, so a caller can override an ordinary preset. A key in reject fails embedded session creation if the caller supplies it. A key in ignore drops the caller’s value and keeps the operator’s preset, or uses the normal default if no preset exists.
{
"android": {
"appium:adbListenAllNetwork": false,
"$toolInput": {
"ignore": ["appium:adbListenAllNetwork", "appium:remoteAdbHost"],
"reject": ["appium:systemPort"]
}
}
}Rules cover prefixed, unprefixed, and grouped (appium:options) tool input. A name may appear in only one list. Place $toolInput under android or ios; placing it at the root or under general fails session creation. When either list contains a rule, the embedded policy requires a supplied appium:options to be an object so it can check the grouped names. With empty lists, the driver handles validation. Remote sessions omit the policy and forward tool capabilities normally. Embedded sessions fail if an explicitly configured file cannot be read or parsed.
Platform names and "general" mode
You can pass any platform name to
appium_session_management(action=create).If the platform is
iosorandroid, the server builds capabilities for that platform (including selected device info when local).If the platform is any other value, it is treated internally as
general:The session will use the provided
capabilitiesexactly as given, orIf
CAPABILITIES_CONFIGis set, it will merge with thegeneralsection from your capabilities file.
This allows custom setups and non-standard platforms to work without changing server logic.
Integrator notes (sessions, transport, logging)
For CI, device farms, or multi-session setups:
Multi-session and sessionId
The process keeps one active Appium session; tools use it when sessionId is omitted. If a tool call does not include a sessionId, it will target the active session instead of a specific one. If more than one session exists (see appium_session_management with action=list), pass sessionId on every tool call that must target a specific session. Do not assume the active session is stable if other clients or flows can create, select, or delete sessions.
Session persistence
If APPIUM_MCP_PERSIST_REMOTE_SESSIONS_PATH is set, MCP Appium persists attached remote sessions to that directory as JSON files. The path may be absolute or relative to the current working directory. Each session is stored under a canonical filename derived from a hash of the sessionId; older legacy filenames are migrated, and duplicate files for the same session are removed when the directory is read. When a persisted attached session is used again, the server tries to reattach to the remote Appium session; unreachable entries are pruned automatically.
Client disconnect
When the MCP client disconnects, the server deletes only MCP-owned sessions it is tracking (Appium deleteSession for each, via safeDeleteAllSessions). Attached sessions (ownership=attached) are intentionally left on the remote Appium server. Transports that drop often—httpStream behind proxies, idle timeouts, or flaky clients—can wipe owned automation in one go under the default policy. stdio is usually safer for a single long-lived operator; if you use httpStream, expect reconnects to require new owned sessions where applicable.
Remote Appium, CI, and device farms
For grids, cloud labs, or CI, prefer remoteServerUrl plus explicit capabilities on appium_session_management (action=create)—for example appium:udid, app path or id, platform version—rather than depending on local discovery. select_device is geared toward local ADB / simulator picking; use it as a dev convenience, not the main path for allocated remote devices.
Tool logging and argument size
Tool calls are logged with argument redaction implemented via JSON.stringify. Oversized payloads (especially long base64 strings, e.g., screenshot/image payloads, and also very large capabilities objects) cost CPU and log volume. Prefer CAPABILITIES_CONFIG and avoid passing large inline blobs in tool arguments when possible.
Screenshots
Set the SCREENSHOTS_DIR environment variable to specify where screenshots are saved. If not set, screenshots are saved to the system temp directory (os.tmpdir()). Supports both absolute and relative paths (relative paths are resolved from the current working directory). The directory is created automatically if it doesn't exist.
Screen Recording
Screen recordings are saved as MP4 files to the same directory as screenshots (SCREENSHOTS_DIR, or os.tmpdir() if not set).
iOS: Requires ffmpeg to be installed and available on
PATH. The default codec islibx264withyuv420ppixel format for QuickTime compatibility.Android: Uses the built-in
screenrecordcommand via UiAutomator2. No additional dependencies required.
To start recording, call appium_screen_recording with action="start". You may provide timeLimit in seconds to limit the maximum recording duration, but the start call still returns immediately. To finalize the recording, save the video, and receive the file path, call appium_screen_recording again with action="stop".
For iOS, videoScale accepts width:height with dimensions from 1 to 16384 (for example, 1280:720). One dimension may be -1 or -2 to preserve the aspect ratio; -2 also makes that dimension divisible by two. Scaling expressions and custom videoFilters are no longer supported by this MCP tool.
AI Vision Element Finding
Configure AI-powered element finding using vision models. When enabled, a separate tool — appium_ai — is registered alongside appium_find_element. It exposes action=find_element, which locates UI elements from natural-language descriptions and returns a coordinate UUID (ai-element:x,y:bbox) that can be passed to appium_gesture (tap / double_tap / long_press).
This feature is opt-in. When AI_VISION_ENABLED is unset or false, the appium_ai tool is not registered and the LLM has no way to invoke vision-based finding — keeping appium_find_element purely traditional. This deliberate gating prevents the model from defaulting to a slow, paid vision call when a stable locator (accessibility id, resource-id, etc.) would do the job.
Required Environment Variables:
{
"appium-mcp": {
"env": {
"ANDROID_HOME": "/path/to/android/sdk",
"AI_VISION_ENABLED": "true",
"AI_VISION_API_BASE_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"AI_VISION_API_KEY": "your_api_key_here"
}
}
}If AI_VISION_ENABLED=true is set without both API vars, the server fails to start with a clear error message — misconfiguration is surfaced immediately rather than mid-test.
Optional Environment Variables:
See the Environment Variables table above for the full list of AI_VISION_* options and their defaults.
Supported Vision Model Providers:
Based on benchmark testing, the following models are recommended:
Qwen3-VL-235B-A22B-Instruct
Provider: Alibaba Cloud DashScope
Accuracy: 100%
Speed: 12649ms
API:
https://dashscope.aliyuncs.com/compatible-mode/v1
gemini-3-flash-preview
Provider: Google AI
Accuracy: 100%
Speed: 17353
API:
https://generativelanguage.googleapis.com/v1beta
More models benchmarked can be found here.
Performance Features:
Image Compression: Automatically compresses screenshots to reduce API latency and token costs (50-80% size reduction)
Result Caching: Caches results for 5 minutes using a module-level LRU cache (max 50 entries) that persists across tool calls, avoiding redundant API calls for identical screenshot + instruction pairs
Coordinate Handling: In
normalizedmode (default), the model returns 0–1000 range coordinates that are automatically scaled to absolute pixel coordinates using the original image dimensions — independent of any image compression. Inabsolutemode, image resizing is disabled so the model's returned pixel coordinates always map directly to the original screen dimensions.
Performance Optimization
MCP Apps Mode
appium_get_page_source, appium_screenshot, and generate_locators use static MCP App viewers by default when
the client advertises MCP Apps support.
In the Page Source Inspector, Search highlights matching text in the displayed XML. Press Enter to jump to the next match or Shift+Enter for the previous match; navigation wraps and keeps the full XML visible. The match counter shows your current position.
Enter text in Search and click Find locators to generate candidates for
matching elements. Search uses a case-insensitive literal substring of element types and attribute values
(such as name, label, text, and resource ID), including hidden elements and types such as iOS icons.
Generation fetches fresh XML from the device; the XML already displayed remains unchanged. An empty search
keeps the default driver-specific filter. UiAutomator2 and XCUITest native sessions use their mobile
control filters; Web contexts use HTML control filters. Other native drivers include XML elements
without requiring mobile tag names or clickable/focusable attributes (the hierarchy wrapper remains
excluded). The same search is available directly with
generate_locators({query: "Calendar"}).
Use Preferred XPath attributes in Locator Candidates to enter additional attribute names, separated
by commas (for example AutomationId, data-testid). XPath generation tries them in the specified order
before the built-in attributes, retaining the existing uniqueness checks and fallbacks. This changes
XPath candidate generation, not which elements are included. Leave it empty to keep the defaults.
The same option is available as generate_locators({xpathAttributes: ["AutomationId", "data-testid"]}).
Up to 20 names are accepted; XPath expressions and namespace prefixes are not supported.
The MCP Apps Page Source Inspector also offers Take screenshot. It refreshes XML, reads screen
size, and captures an image. Select an XML element in the preview to overlay its screen bounds;
Search narrows that element list. Bounds use x, y, width, height or Android's
bounds="[left,top][right,bottom]". Hidden elements, missing or empty bounds, and offscreen elements
are reported without an overlay. Captures are sequential, not atomic: keep the device still and
recapture after navigation or rotation. Other coordinate formats and Web DOM layout are not inferred.
Page source XML and generated locator JSON remain in their normal text results for the LLM. Their viewers read those existing results instead of receiving duplicated copies inside generated HTML.
Saved screenshot base64 is delivered to the viewer through
structuredContent, which MCP Apps keeps out of model context. The LLM still receives the saved file path. ExplicitreturnRawBase64=truecalls keep their existing raw image result.
For clients with unreliable MCP Apps rendering, set APPIUM_MCP_APPS_ENABLED to false or 0:
{
"appium-mcp": {
"env": {
"APPIUM_MCP_APPS_ENABLED": "false"
}
}
}This keeps interactive UI enabled but forces the previous embedded viewers. The compatibility mode places viewer data inside inline HTML and therefore uses more result tokens and bandwidth. With a synthetic 95,000-character page source, the static mode reduced the result from approximately 267 KB to 95 KB (about 64%).
NO_UI=true or NO_UI=1 takes precedence over this setting and disables both static and embedded UI.
NO_UI Mode
Set the NO_UI environment variable to true or 1 to disable UI components and improve performance:
{
"appium-mcp": {
"env": {
"NO_UI": "true",
"ANDROID_HOME": "/path/to/android/sdk"
}
}
}Benefits:
Significantly Faster Response Times: UI rendering and data processing are completely skipped, resulting in 50-80% faster tool responses depending on the operation.
Major Token Savings: Eliminates 500-5000+ tokens per request by removing HTML UI components from responses, dramatically reducing LLM API costs.
Massive Bandwidth Reduction:
Screenshots: Saves 1-5MB of base64-encoded image data per screenshot
Page source: Saves 50-200KB+ of duplicated XML data in HTML UI
Locators: Saves 10-100KB+ of element data in interactive UI
Device/App lists: Saves 5-50KB of HTML UI per selection
Lower Memory Usage: Client applications consume less memory without HTML rendering and embedded data.
Perfect for Headless Environments: Ideal for CI/CD pipelines, automated testing scripts, batch operations, or any scenario where visual UI feedback is not required.
Better Scalability: Reduced resource consumption allows handling more concurrent sessions.
Affected Tools:
The following tools return lightweight text-only responses when NO_UI is enabled:
appium_screenshot- Screenshot files are still saved to disk, but base64 data is not embedded in responsesappium_get_page_source- Returns XML as text without interactive inspector UI by default. WithsaveToFile: true, returns the saved XML path and byte size instead;NO_UIdoes not enable file saving.generate_locators- Returns locator data as JSON without interactive UIselect_device- Returns device list as text without picker UIappium_session_management(action=create) - Returns session info as text without dashboard UIappium_context- Returns context list as text withaction=listwithout switcher UIappium_app_lifecycle(action=list) - Returns app list as JSON without interactive UI
When to Enable NO_UI:
✅ Automated test execution in CI/CD pipelines
✅ Batch processing multiple devices/sessions
✅ Cost-sensitive LLM API usage (reduces token consumption by 60-90%)
✅ Network-constrained environments
✅ Scripted automation where human interaction is not needed
❌ Interactive debugging and exploration (keep UI enabled for better experience)
Documentation Tools (opt-in)
The documentation tools — appium_documentation_query (RAG search over the Appium docs) and appium_skills — live in a separate package, @appium/mcp-documentation, that carries a multi-megabyte embeddings cache and pulls in a heavy ML stack (@xenova/transformers, @langchain/*). To keep the default install lean, this package is not a runtime dependency of appium-mcp and is never downloaded unless you opt in. It is declared as an optional peer dependency.
Enabling the tools is a two-step opt-in:
1. Install the optional package (in the same project/environment as appium-mcp):
npm install @appium/mcp-documentationInstalling it with your own package manager dedupes against appium-mcp's existing dependencies, so only the genuinely new code is added.
2. Set APPIUM_MCP_DOCS_ENABLED in your MCP server config:
{
"appium-mcp": {
"env": {
"APPIUM_MCP_DOCS_ENABLED": "true",
"ANDROID_HOME": "/path/to/android/sdk"
}
}
}Behavior:
Unset / not truthy (default): the documentation tools are not registered, and nothing related to them (cache, embeddings, ML dependencies) is loaded.
Truthy (
true/1/yes/on): the server registers the documentation tools if@appium/mcp-documentationis installed. If the flag is set but the package is not installed, the server starts normally without the documentation tools and logs a hint to runnpm install @appium/mcp-documentation.
The gate is governed by the env var, not by mere presence of the package: with APPIUM_MCP_DOCS_ENABLED unset, the tools stay hidden even if the package happens to be installed.
Pre-installing it that way also avoids the first-run download delay.
MCP disconnect behavior
By default (APPIUM_MCP_ON_CLIENT_DISCONNECT unset or delete_all), when the MCP client disconnects, this server deletes every MCP-owned Appium session (the same sessions safeDeleteAllSessions targets) so embedded drivers are not left running after a short-lived assistant run. Attached sessions (ownership=attached) are unchanged by this teardown.
HTTP and streamable MCP clients may disconnect briefly (reconnect, reload, proxy). If that tears down drivers you still need, set APPIUM_MCP_ON_CLIENT_DISCONNECT to skip in your MCP server env (same pattern as NO_UI above). With skip, sessions survive disconnect until you call appium_session_management with action=delete, or you stop the Appium server / process.
Tradeoff: skip can leave orphaned sessions on your Appium server if nothing cleans up — use it when disconnect is not the same as “automation finished.”
Remote server security and trust model
MCP Appium is designed to run as a local, single-user MCP server or as part of a trusted CI job. It is not intended to be exposed as a shared service to untrusted MCP clients.
The remoteServerUrl argument is intentionally configurable because MCP Appium acts as an Appium/WebDriver client and may need to connect to local, remote, private-network, or CI-hosted Appium servers.
Only allow trusted users and trusted workflow configuration to control remoteServerUrl. In particular:
Do not expose the MCP tool surface directly to untrusted users.
In CI, do not construct
remoteServerUrlfrom untrusted pull request content, repository data, prompts, or other externally controlled input.Keep remote server URLs in trusted MCP or CI configuration where possible.
Use
REMOTE_SERVER_URL_ALLOW_REGEXto restrict the supplied Appium server URLs. Trust the permitted servers and their responses as described below.
When REMOTE_SERVER_URL_ALLOW_REGEX is not set, MCP Appium accepts any syntactically valid HTTP or HTTPS destination. Remote server URLs must not contain a query string or fragment. The variable is a regular-expression check against the complete remoteServerUrl value and can only narrow the HTTP(S) destinations accepted by the built-in validation.
Capability discovery for attached sessions does not follow HTTP redirects. This keeps a permitted endpoint from redirecting the initial metadata request to a destination outside the configured URL policy.
REMOTE_SERVER_URL_ALLOW_REGEX validates the supplied server URL only. Subsequent
destinations selected by HTTP redirects, Appium direct-connect metadata, or a
WebDriver BiDi webSocketUrl are handled by the WebDriver client library and are
not checked against this regex. Intercepting or modifying the client library's
internal transport is outside appium-mcp's scope. Operators must therefore trust
the permitted Appium servers and their responses. Set
REMOTE_SERVER_ENABLE_DIRECT_CONNECT=false to disable direct connect through the
client's public option; this does not disable HTTP redirects or BiDi connections.
Deployments that need to restrict all outbound destinations should enforce that
policy through network egress controls.
If a remote URL contains credentials, MCP Appium redacts its userinfo from logs and error responses. Opt-in persisted-session files may still contain credentials and sensitive capabilities because they are needed for reattachment; those files are created with owner-only (0600) permissions, and permissions on existing regular session files are repaired when read. Use a dedicated persistence directory owned by the MCP process.
For example, to permit only a specific Appium server:
REMOTE_SERVER_URL_ALLOW_REGEX='^https://appium\.example\.com:4723(?:/wd/hub)?/?$'To permit Appium servers under a controlled internal domain:
REMOTE_SERVER_URL_ALLOW_REGEX='^https://[a-z0-9-]+\.appium\.example\.internal(?::[0-9]+)?(?:/.*)?$'Treat this setting as an additional deployment safeguard. Network-level controls, CI isolation, and trusted MCP client configuration should remain the primary security boundaries.
🔌 Plugin API
Load plugins from the command line
Pass --plugin to start the standard server with a plugin, without writing a server bootstrap module. Repeat the option to load multiple plugins in order; both --plugin <module> and --plugin=<module> work with stdio and --httpStream:
appium-mcp --plugin ./checkout-plugin.mjs --plugin=@acme/appium-mcp-pluginEach module must default-export either an AppiumMcpPlugin object or a plugin class whose constructor takes no arguments. For example, save this as checkout-plugin.mjs:
export default class CheckoutPlugin {
name = 'checkout-plugin';
version = '1.0.0';
register(registry) {
registry.addTool({
name: 'checkout_status',
description: 'Return the checkout integration status.',
execute: async () => ({content: [{type: 'text', text: 'Checkout plugin ready'}]}),
});
}
}Use an exported object (for example, export default new CheckoutPlugin(options)) when a plugin needs constructor options. TypeScript plugins must be compiled to JavaScript before loading.
Relative paths and installed package names resolve from the working directory where appium-mcp is launched. Package names use Node's CommonJS resolution (createRequire(...).resolve()), including require or default export conditions and legacy main entries. Packages exposing only an import export must be loaded through an explicit file path (for example, --plugin ./node_modules/my-plugin/plugin.mjs) or a file: URL. Loading still uses dynamic import(), so ESM plugin files, including those with top-level await, remain supported.
Absolute paths and file: URLs are also accepted; absolute paths are recommended in MCP client configurations because the client's working directory can vary. The CLI does not install packages: install package plugins in that working directory first.
Plugins execute in the server process, so load only trusted files and packages and keep plugin logs on stderr when using stdio. A missing module or invalid plugin export stops startup with an error instead of silently omitting the plugin. The optional documentation plugin, when enabled, is registered before CLI plugins. The existing duplicate-name and lifecycle rules below apply.
Compose a server programmatically
Use appium-mcp/core to compose the default Appium MCP server with custom business logic without maintaining a fork. Plugins can register MCP tools, prompts, resources, and resource templates, and can wrap tool execution with lifecycle hooks. Call hooks are tool-only: prompts, resources, and resource templates are registered with FastMCP but are not wrapped by beforeCall or afterCall.
createAppiumMcpServer({ policy }) can also hide nonmatching tools and resources from MCP discovery. The factory is async, so await it before starting the returned server. Policy rules are regular expressions matched against tool and resource names exactly as registered. The policy is applied at registration time to both single and batch registration methods. Resource policy matches the resource name only; resources or resource templates without a string name cannot match a non-empty allowResources list.
import { createAppiumMcpServer } from 'appium-mcp/core';
import type {
AppiumMcpPlugin,
McpRegistry,
ToolCallContext,
} from 'appium-mcp/core';
import { z } from 'zod';
class CheckoutPlugin implements AppiumMcpPlugin {
readonly name = 'checkout-plugin';
readonly version = '1.0.0';
register(registry: McpRegistry): void {
const parameters = z.object({ orderId: z.string() });
registry.addTool({
name: 'assert_checkout_summary',
description:
'Assert that the checkout summary screen shows an expected order ID.',
parameters,
execute: async (args) => {
const { orderId } = parameters.parse(args);
return {
content: [
{ type: 'text', text: `Assert checkout order ${orderId}` },
],
};
},
});
}
async beforeCall(ctx: ToolCallContext): Promise<void> {
if (ctx.toolName === 'appium_gesture') {
console.error(`[checkout-plugin] about to call ${ctx.toolName}`);
}
}
}
const server = await createAppiumMcpServer({
plugins: [new CheckoutPlugin()],
additionalInstructions: 'Custom checkout policies are active.',
policy: {
allowTools: [/^appium_session_management$/, /^assert_checkout_summary$/],
allowResources: [/^Generate Code With Locators$/],
},
});
await server.start({ transportType: 'stdio' });Stdio logging
start({ transportType: 'stdio' }) automatically configures Appium and WebDriver logging before the stdio transport starts, keeping stdout reserved for JSON-RPC. You normally do not need to configure logging separately.
In stdio mode, WDIO_LOG_LEVEL values that would write verbose output to stdout (trace, debug, and info) are clamped to warn. Quieter error and silent values are preserved. This behavior only applies to stdio; httpStream logging is unchanged.
For advanced integrations that need to configure logging explicitly, configureStdioTransportLogging() is exported from appium-mcp/core. Call it before starting stdio work; calling server.start({ transportType: 'stdio' }) already invokes it automatically.
Plugin lifecycle:
register(registry, core): called during server construction. Register custom tools, prompts, resources, and resource templates here.initialize(ctx): called lazily on the first MCP client connection. Use it for async setup such as artifact storage or internal service clients.beforeCall(ctx): called before a registered MCP tool executes. Return aToolCallResultto short-circuit the tool. This hook only applies to tools, not prompts, resources, or resource templates.afterCall(ctx, result): called after a registered MCP tool executes. Return a modifiedToolCallResultto decorate or replace the response. This hook only applies to tools, not prompts, resources, or resource templates.destroy(): called after the last MCP client disconnects.
Safe plugin surface
The supported plugin API is intentionally small:
Surface | Safe methods |
|
|
|
|
|
|
|
|
McpRegistry methods delegate to the matching FastMCP registration APIs, so their object shapes follow FastMCP's documented tool, prompt, resource, and resource-template definitions. Appium MCP wraps registered tools with plugin call hooks, but prompts and resources are registered directly with FastMCP.
Each plugin name should be unique within the server. If two plugins use the same name, Appium MCP keeps the first plugin registered for that name and skips later plugins with a warning. Use a stable, package-style or organization-prefixed name, such as acme-checkout-plugin, to avoid collisions when composing plugins from multiple teams.
Each tool name should also be unique across all plugins and the core server. Tool names follow FastMCP behavior, not plugin-name behavior: when a tool is registered with the same name as an existing tool, FastMCP replaces the earlier tool definition with the later one. Appium MCP registers built-in tools before plugin tools, which means a plugin tool that uses the same name as a built-in tool replaces the built-in tool. Appium MCP tools usually have an appium_ prefix, so plugin tool names should use that pattern only when they intentionally override a core tool.
Verify plugin and tool names
Use verifyAppiumMcpNames before publishing or deploying a custom plugin setup. It registers your plugin capabilities into a lightweight collector, registers the Appium MCP core tools, and reports duplicate plugin names, duplicate tool names, and registration errors without starting the MCP server.
The recommended approach is to verify the same plugin array you pass to createAppiumMcpServer({ plugins }). This preserves your real plugin instances and order:
import {
formatVerificationReport,
verifyAppiumMcpNames,
} from 'appium-mcp/core';
import { plugins } from './plugins.js';
const report = verifyAppiumMcpNames({ plugins });
console.log(formatVerificationReport(report));
process.exit(report.ok ? 0 : 1);When you provide multiple plugins, order is preserved. Plugins are verified in array order after the appium-mcp core tools. This matters because Appium MCP keeps the first plugin for a duplicate plugin name and skips later plugins with the same name, while duplicate tool names follow FastMCP's later-registration-wins behavior. Tool names still need to be unique across all loaded plugins and appium-mcp core; the verifier reports any collisions it finds.
The report labels this package's own shipped tools as appium-mcp core. Plugin sources are labeled as plugin:<name> with the plugin version.
Treat anything outside appium-mcp/core as internal. In particular, plugins should not rely on private server internals, internal session-store modules, tool implementation files, or the raw FastMCP server instance. If a plugin needs another stable primitive, open an issue so it can be added to AppiumMcpCore or McpRegistry deliberately.
See examples/plugin-example.ts for a fuller cookbook with tools, prompts, resources, resource templates, call hooks, and lifecycle setup.
🎯 Available Tools
MCP Appium provides a comprehensive set of tools organized into the following categories:
Platform & Device Setup
Tool | Description |
| REQUIRED FIRST: Discover available devices and select one. Auto-selects if only one device found |
| Boot an iOS/tvOS simulator, download WDA (if not cached), and install/launch WDA in a single call. Each step is skipped if already satisfied (iOS/tvOS only). Set |
| Prepare a real iOS device for Appium testing. Two-step flow: (1) call without |
Session Management
Tool | Description |
| Unified session management. |
| Control device behavior: lock/unlock the screen, shake the device, or open the notifications panel ( |
| Read or update Appium driver session settings in one tool. |
The remote server URL in appium_session_management (action=create or action=attach) can be set via the remoteServerUrl parameter.
When remoteServerUrl is omitted, action=create starts an embedded local UiAutomator2 or XCUITest driver for platform=android or platform=ios. platform=general requires remoteServerUrl. When remoteServerUrl is present, action=create calls WebDriver newSession on the remote server, and action=attach connects MCP Appium to an existing remote session without owning its lifecycle.
If REMOTE_SERVER_URL_ALLOW_REGEX is set, the URL must match the provided regex pattern for security reasons.
This allows you to restrict which remote servers can be used with your MCP Appium instance, preventing unauthorized connections.
Without an allow regex, any syntactically valid HTTP(S) URL without a query string or fragment is accepted.
Context Management
Tool | Description |
| Manage contexts in one tool. |
Element Discovery & Interaction
Tool | Description |
| Find a specific element using traditional locator strategies. Strategy priority: |
| Find all matching elements using the same locator strategies. Returns JSON |
| Opt-in (gated by |
| Perform a touch gesture. |
| Perform a drag and drop gesture from a source location to a target location (supports element-to-element, element-to-coordinates, coordinates-to-element, and coordinates-to-coordinates) |
| Execute raw W3C Actions API sequences for custom multi-touch gestures (rotate, three-finger swipe, edge swipes, precise timing). Prefer |
| Enter text into an input field |
| Hide the on-screen keyboard or query visibility. |
| Get text content from an element |
| Read or set device clipboard plain text. |
| Handle alerts with |
Screen & Navigation
Tool | Description |
| Take a screenshot and save as PNG. Optionally provide |
| Get the width and height of the device screen in pixels |
| Return full XML inline by default. Set |
| Get or set device/screen orientation with |
| Get, set, or reset the device GPS coordinates with |
| Start or stop screen recording with |
| Get device information, battery status, or current device time. Use |
App Management
Tool | Action | Description |
|
| Activate (launch/bring to foreground) a specified app by bundle ID or name |
|
| Terminate (close) a specified app |
|
| Install an app on the device from a file path |
|
| Uninstall an app from the device by bundle ID or name |
|
| List all installed apps on the device (Android and iOS) |
|
| Check whether an app is installed. Package name for Android, bundle ID for iOS. |
|
| Query the current state of an app: 0=not installed, 1=not running, 2=background suspended, 3=background, 4=foreground |
|
| Background the current app for a duration (optional; defaults to 5 seconds) |
|
| Clear app data and cache without uninstalling ( |
|
| Open a deep link URL with the default or a specified app |
| Get, update, or reset app permissions in one tool ( | Android: list or change runtime permissions. iOS Simulator: get/set privacy via bundle id; reset ( |
Test Generation & Documentation
Tool | Description |
| Generate intelligent locators for all interactive elements on the current screen |
| Generate automated test code from natural language scenarios |
| Opt-in (gated by |
| Opt-in (gated by |
🤖 Client Support
MCP Appium is designed to be compatible with any MCP-compliant client.
📚 Usage Examples
Amazon Mobile App Checkout Flow
Here's an example prompt to test the Amazon mobile app checkout process:
Open Amazon mobile app, search for "iPhone 15 Pro", select the first search result, add the item to cart, proceed to checkout, sign in with email "test@example.com" and password "testpassword123", select shipping address, choose payment method, review order details, and place the order. Use JAVA + TestNG for test generation.This example demonstrates a complete e-commerce checkout flow that can be automated using MCP Appium's intelligent locator generation and test creation capabilities.
AI-Powered Element Finding Examples
Traditional Mode — prefer stable identifiers:
Try strategies in priority order: accessibility id first, then id, then platform-native predicates (-ios predicate string / -ios class chain on iOS, -android uiautomator on Android). Reach for xpath only when nothing more stable exists.
{
"tool": "appium_find_element",
"arguments": {
"strategy": "accessibility id",
"selector": "search-button"
}
}appium_find_element preserves its existing element ID and success message. When the driver returns additional fields, a JSON text block includes {elementId, attributes} with the original attribute names and values. MCP does not fetch extra attributes or change driver settings automatically.
For drivers that support elementResponseAttributes, enable richer responses for both appium_find_element and appium_find_elements with the existing Settings API. First call appium_driver_settings with action=get to record the current values, then update the settings. Choose attribute names supported by your driver; the following example uses XCUITest attributes:
{
"tool": "appium_driver_settings",
"arguments": {
"action": "update",
"settings": {
"shouldUseCompactResponses": false,
"elementResponseAttributes": "attribute/name,label,enabled,attribute/visible"
}
}
}These settings apply to the session. attribute/name requests the element's name attribute; the name response field can represent its element type. Attribute keys such as attribute/visible are preserved in the MCP response. Supported fields depend on the driver.
Find all matching elements after applying these settings:
{
"tool": "appium_find_elements",
"arguments": {
"strategy": "-ios predicate string",
"selector": "type == 'XCUIElementTypeButton'"
}
}Example response (actual values depend on the app):
{
"elements": [
{
"elementId": "<webdriver-element-id>",
"attributes": {
"attribute/name": "menu",
"label": "Menu",
"enabled": true,
"attribute/visible": true
}
}
]
}Pass the chosen elementId as elementUUID to interaction tools. Each match keeps its own ID and attributes; compact responses omit attributes, and no matches returns {"elements":[]} successfully. Driver failures remain errors. Neither search tool makes additional attribute requests. Restore the recorded settings with action=update when richer responses are no longer needed (shouldUseCompactResponses: true disables the additional fields for drivers supporting this setting).
xpath fallback (when no accessibility id, resource-id, or platform-native predicate works):
{
"tool": "appium_find_element",
"arguments": {
"strategy": "xpath",
"selector": "//android.widget.Button[@text='Search']"
}
}Scroll until element is on screen (appium_gesture / scroll_to_element):
{
"tool": "appium_gesture",
"arguments": {
"action": "scroll_to_element",
"strategy": "xpath",
"selector": "//*[contains(@text,'My header')]",
"direction": "down",
"maxScrollAttempts": 40,
"scrollDistancePreset": "medium"
}
}Use scrollDistance (0.05–1) instead of scrollDistancePreset when you want an exact fraction. Then call appium_find_element with the same strategy / selector to obtain the element id.
AI Mode (Natural Language) — requires AI_VISION_ENABLED=true:
When the AI tool is enabled, use appium_ai (not appium_find_element) for vision-based finding:
{
"tool": "appium_ai",
"arguments": {
"action": "find_element",
"instruction": "yellow search button at the bottom of the screen"
}
}The returned UUID (ai-element:x,y:bbox) flows directly into appium_gesture:
{
"tool": "appium_gesture",
"arguments": {
"action": "tap",
"elementUUID": "ai-element:540,2280:480,2240,600,2320"
}
}More instruction examples:
"username input field at top""settings icon in top-right corner""red delete button next to the item""blue submit button at bottom""profile picture in navigation bar"
When to reach for appium_ai vs appium_find_element:
Prefer
appium_find_elementwhenever a stable accessibility id, resource-id, or unique text exists — faster, free, deterministic.Use
appium_aionly when the element has no stable identifier, the page source is unavailable, or you must locate by visual cues (color, position, icon).See AI Vision Element Finding for setup and configuration.
Working in Your Native Language
MCP Appium works seamlessly in any language - you don't need to know English! The AI assistant understands and responds in your native language. Simply describe what you want to do in your preferred language:
Examples in different languages:
🇪🇸 Spanish: "Abre la aplicación de Amazon, busca 'iPhone 15 Pro' y agrégalo al carrito"
🇨🇳 Chinese: "打开Amazon应用,搜索'iPhone 15 Pro'并添加到购物车"
🇯🇵 Japanese: "Amazonアプリを開いて、'iPhone 15 Pro'を検索してカートに追加する"
🇰🇷 Korean: "Amazon 앱을 열고 'iPhone 15 Pro'를 검색한 후 장바구니에 추가"
🇫🇷 French: "Ouvre l'application Amazon, recherche 'iPhone 15 Pro' et ajoute-le au panier"
🇩🇪 German: "Öffne die Amazon App, suche nach 'iPhone 15 Pro' und füge es zum Warenkorb hinzu"
The AI will handle your requests naturally and generate the appropriate test code, regardless of the language you use.
🙌 Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss any changes.
📄 License
This project is licensed under the Apache-2.0. See the LICENSE file for details.
Behavioral evals
Model-dependent MCP tool-selection and argument evals are available separately from
npm test. See evals/README.md for setup and npm run eval:mcp.
For local evaluation using Codex with ChatGPT login, use npm run eval:codex.
Page source file output and filtered summaries
Argument | Default | Behavior |
|
|
|
| Omitted | XPath selecting elements; requires |
| Omitted | Case-sensitive literal substring of tag names or attribute values; requires |
| Active session | Selects the Appium session. |
appium_get_page_source keeps its existing behavior by default: full XML is returned inline, with the existing inspector behavior. Omit saveToFile or pass saveToFile: false to use this mode; it does not write a file.
To opt into file output, pass saveToFile: true. Each call retrieves a fresh page source and saves a new snapshot; it does not reuse previously saved XML. XML is saved on the MCP server's filesystem and the response is JSON {filepath, bytes}. Set PAGE_SOURCES_DIR to choose a directory (relative paths resolve from the server working directory); otherwise the OS temporary directory is used. Files have unique names and owner-only permissions. Remove saved files when no longer needed.
With NO_UI=true, the default response still contains full XML and omits the additional HTML UI, as before. File output requires saveToFile: true regardless of NO_UI; it does not embed XML or HTML. Use the default inline mode when the client cannot access server files.
Save the full XML without returning its contents:
{
"tool": "appium_get_page_source",
"arguments": {"saveToFile": true}
}Example response (the path and byte count vary):
{"filepath": "/tmp/page-source-<uuid>.xml", "bytes": 41312}To inspect only part of the tree, pass saveToFile: true together with selector (an XPath selecting elements), pattern (a case-sensitive literal substring of tag names or attribute values), or both. Matching nodes include identifying attributes, visibility and bounds when present, plus explicitly visible siblings. Summaries are capped at 100 nodes including siblings and report truncated; the saved XML always contains the full tree. No matches returns matches: []. Filters cannot be combined with saveToFile: false.
{
"tool": "appium_get_page_source",
"arguments": {"saveToFile": true, "selector": "//*[@name='View All']"}
}{
"tool": "appium_get_page_source",
"arguments": {"saveToFile": false}
}Available Tools
32 toolsappium_alertA
Handle system alerts with action=accept|dismiss, or read alert text with action=get_text.
Inputs: action (required), sessionId, buttonLabel.
appium_app_lifecycleC
Manage app lifecycle, installation, state, data, and deep links.
Inputs: action (required), id, url, name, +6 more.
appium_contextA
Manage Appium contexts with one tool. action=list returns all contexts and current context. action=switch changes to a target context.
Inputs: action (required), context, sessionId.
appium_drag_and_dropA
Perform a drag-and-drop gesture from a source location to a target location. The gesture: long press the source (default 600ms), drag to the target (default 1200ms), then release. Source and target can each be specified as either an element UUID or coordinates. Useful for reordering lists, moving items, drag-to-delete.
Inputs: sourceX, sourceY, targetX, targetY, +5 more.
appium_driver_settingsA
Read or update Appium driver session settings (e.g. idle timeouts, selector waits). Use action=get to return JSON settings; action=update merges a map into the session. Works for embedded UiAutomator2/XCUITest sessions and remote WebDriver clients that support Appium settings.
Inputs: action (required), settings, sessionId.
appium_find_elementARead-only
Find an element by strategy and selector. Pass its ID as elementUUID to interaction tools. Returns driver attributes as JSON. For drivers supporting elementResponseAttributes, use appium_driver_settings to configure it with shouldUseCompactResponses=false. Prefer accessibility id > id > platform-native > xpath (last resort: slow/brittle). See strategy for platform-specific guidance. To scroll until a target is found, use appium_gesture action=scroll_to_element with the same strategy and selector, rather than repeatedly calling this tool. Vision fallback: appium_ai action=find_element (if enabled).
Inputs: selector (required), strategy (required), sessionId.
appium_find_elementsARead-only
Find all elements matching a strategy and selector. Returns JSON {elements: [{elementId, attributes?}]}; no matches returns {elements: []}. Pass an elementId as elementUUID to interaction tools. Additional driver attributes are preserved. For drivers supporting elementResponseAttributes, use appium_driver_settings to configure it with shouldUseCompactResponses=false. Use appium_find_element when only one match is needed.
Inputs: selector (required), strategy (required), sessionId.
appium_generate_testsA
Return a workflow to execute the scenario with MCP tools, then generate test code from observed interactions. Prefer appium_find_element; generate_locators is for broad inspection.
Inputs: steps (required).
appium_geolocationA
Get, set, or reset the device geolocation (GPS coordinates). Works on both iOS (simulators and real devices) and Android (emulators and real devices with mock location enabled). Use action=get to read current coordinates, action=set with latitude/longitude (and optional altitude for Android) to simulate a location, or action=reset to restore the system default. Note: On Android emulators, reset is not supported — use action=set to manually restore coordinates instead. On Android real devices, the mocked location may persist until the GPS cache refreshes.
Inputs: action (required), altitude, latitude, longitude, +1 more.
appium_gestureA
Perform a touch gesture. Use 'action' to choose: tap, double_tap, long_press, scroll, swipe, pinch_zoom, scroll_to_element, back. Choose scroll vs swipe by intent: scroll to browse content in a list or feed; swipe to dismiss, switch screens, navigate carousels, or pull-to-refresh (speed=fast). For drag-and-drop use appium_drag_and_drop. For custom multi-touch use appium_perform_actions.
Inputs: action (required), x, y, endX, +13 more.
appium_get_active_elementARead-only
Get the currently active/focused element and return its UUID for follow-up interactions. [PRIORITY 1: Use this first when you need to find what element currently has focus]
Inputs: sessionId.
appium_get_element_attributeARead-only
Get the value of an element attribute. Use this to check element state (enabled, selected, checked, focused, displayed, clickable) or read properties (name, value, label, content-desc, resource-id, class).
Inputs: attribute (required), elementUUID (required), sessionId.
appium_get_page_sourceA
Get current-screen XML. saveToFile=true returns server-local path/bytes and enables selector/pattern summaries.
Inputs: pattern, selector, sessionId, saveToFile.
appium_get_textCRead-only
Get text from an element
Inputs: elementUUID (required), sessionId.
appium_get_window_sizeARead-only
Get the width and height of the device screen in pixels. Useful for calculating coordinates for swipes, taps, and scrolls.
Inputs: sessionId.
appium_mobile_clipboardA
Read or set the device clipboard as plain text (Android UiAutomator2 / iOS XCUITest). action=get returns current text; action=set requires content.
Inputs: action (required), content, sessionId.
appium_mobile_device_controlA
Control device behavior: lock/unlock the screen, shake the device, or open the notifications panel. Use the action parameter to choose what to do.
Inputs: action (required), seconds, sessionId.
appium_mobile_device_infoARead-only
Get device information, battery status, or current device time in a single call. Use the "action" parameter to select which data to retrieve. Works on both iOS and Android.
Inputs: action (required), format, sessionId.
appium_mobile_fileA
Push or pull a file using Appium mobile extensions. action=push uses payloadBase64, action=pull returns contentBase64.
Inputs: action (required), remotePath (required), sessionId, payloadBase64.
appium_mobile_keyboardA
Hide the software keyboard or check if it is visible (Android UiAutomator2 / iOS XCUITest). action=hide uses mobile: hideKeyboard; action=is_shown uses mobile: isKeyboardShown.
Inputs: action (required), keys, sessionId.
appium_mobile_permissionsA
Get/update Android app permissions or iOS Simulator privacy services; reset iOS privacy prompts. See action-specific parameters.
Inputs: action (required), id, name, access, +6 more.
appium_mobile_press_keyA
Press navigation keys (BACK, HOME, APP_SWITCH) on Android or physical buttons (HOME, volume, etc.) on iOS/tvOS.
Inputs: key, keyCode, sessionId, isLongPress.
appium_orientationA
Get or set the device/screen orientation. Supports action=get and action=set (LANDSCAPE or PORTRAIT).
Inputs: action (required), sessionId, orientation.
appium_perform_actionsA
Execute raw W3C Actions API sequences for advanced multi-touch gestures not covered by appium_gesture. Use this for custom multi-finger gestures (rotate, three-finger swipe, edge swipes), complex timing sequences, or any gesture requiring precise control over individual touch points. Prefer appium_gesture for standard gestures (tap, scroll, swipe, pinch) — it handles platform differences automatically.
Inputs: actions (required), sessionId.
appium_prepare_ios_real_deviceA
Prepare signed WDA for a real iOS device. Omit provisioningProfileUuid to list profiles; ask the user to choose, highlighting recommendedForWda. Pass the chosen UUID to download, package, and sign WDA; wildcard profiles use a concrete WDA bundle ID. Downloads/unsigned IPA are cached per version; signing always reruns. Pass capabilitiesHint to appium_session_management action=create to install/launch the signed WDA. Requires macOS, Xcode 16+, and a paired developer-mode device.
Inputs: udid (required), forceRebuild, provisioningProfileUuid.
appium_screen_recordingB
Start or stop screen recording. action=start begins recording; action=stop stops and saves to MP4.
Inputs: action (required), bitRate, videoFps, bugReport, +9 more.
appium_screenshotA
Take a screenshot and save as PNG. Optionally provide elementUUID to capture only that element.
Inputs: maxWidth, sessionId, elementUUID, returnRawBase64.
appium_session_managementADestructive
Manage Appium sessions. Use action=create to start a session, attach to connect to an existing one, detach to forget an attached session, delete to stop one, list to see all active sessions, or select to switch the active session.
Inputs: action (required), platform, sessionId, capabilities, +1 more.
appium_set_valueB
Enter text into an element
Inputs: text (required), sessionId, w3cActions, elementUUID.
generate_locatorsARead-only
Generate current-page locator candidates for inspection. Defaults: controls for UiAutomator2/XCUITest/Web; all elements except hierarchy for other native drivers.
Inputs: query, sessionId, xpathAttributes.
prepare_ios_simulatorA
Boot an iOS/tvOS simulator, download/cache WDA, and launch it on a free per-simulator port. Pass capabilitiesHint (appium:webDriverAgentUrl) to appium_session_management action=create to reuse WDA. skipWda=true only boots. APPIUM_MCP_WDA_APP_PATH can point to an extracted WebDriverAgentRunner-Runner.app (absolute path) to skip download.
Inputs: udid (required), skipWda, platform, forceRefreshWda.
select_deviceA
Discover/select a LOCAL device. Ask for platform if unknown; one device is auto-selected. For multiple devices, ask the user to choose, then pass deviceUdid. Next: prepare_ios_simulator for iOS simulators, then appium_session_management action=create. Skip for REMOTE servers: pass device capabilities (appium:deviceName/appium:udid) and the user-provided remoteServerUrl to session creation.
Inputs: platform (required), deviceUdid, iosDeviceType.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Most tools have clearly distinct purposes, and the descriptions actively resolve the riskiest overlaps (appium_gesture vs appium_perform_actions, appium_find_element vs appium_find_elements, generate_locators vs appium_generate_tests, appium_find_element vs appium_gesture scroll_to_element). Remaining soft spots are appium_get_text vs appium_get_element_attribute (value/property) and the grab-bag appium_app_lifecycle that bundles install, state, deep links, and data clearing behind one name.
The bulk of tools use a predictable appium_<noun>_<verb> snake_case convention, but several break the pattern: prepare_ios_simulator, select_device, and generate_locators lack the appium_ prefix, and prepare_ios_simulator vs appium_prepare_ios_real_device use inconsistent phrasing for parallel operations. The naming is readable but not a single uniform scheme.
At 32 tools this is well past a well-scoped set, and several small single-purpose getters (appium_orientation, appium_get_window_size, appium_mobile_device_info, appium_get_active_element) could be folded into broader grouped tools. Mobile automation is a broad domain, but the surface still reads as accumulated rather than curated.
Coverage is strong across the full mobile automation lifecycle: device prep (simulator and real iOS WDA signing), session management, element location, gestures, text entry, alerts, contexts, files, clipboard, permissions, geolocation, recording, and app lifecycle. Minor gaps and one dangling reference: appium_find_element points to an 'appium_ai' vision tool that is not exposed, and there is no log capture or network-condition tooling.
Maintenance
Related MCP Connectors
Drive real Android & iOS devices and web browsers from natural language for mobile + web QA. 290+ tools across device control, app management, automation sessions, browser automation, and flow recording / replay. Bearer-auth — get a token at robotactions.com → Profile → API Tokens.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to control mobile and desktop devices with natural language, including running automation tasks, taking screenshots, and managing devices.65 npmMIT

MobAI MCP Serverofficial
AlicenseAqualityBmaintenanceEnables AI assistants to automate mobile devices (Android and iOS) through a single DSL interface, supporting actions like tap, type, swipe, and assertions.20717 npm255Apache 2.0- AlicenseBqualityBmaintenanceEnables AI assistants to write and run mobile UI tests on Android and iOS simulators via natural language, supporting native and WebView apps without Appium.38MIT
- AlicenseBqualityBmaintenanceEnables agents and LLMs to automate and develop native iOS and Android apps across simulators, emulators, and real devices through a single platform-agnostic, accessibility-first interface. Provides taps, swipes, text input, app install/launch, screenshots, screen recording, device logs, and crash reports without requiring any iOS- or Android-specific expertise.35Apache 2.0