Skip to main content
Glama
MCP Appium

MCP Appium

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NO_UINoSet to true or 1 to disable HTML UI components for faster responses and fewer tokens.false
ANDROID_HOMENoPath to the Android SDK. Needed for embedded local Android sessions.
WDIO_LOG_LEVELNoWebDriver logging level. In stdio mode, trace, debug, and info are clamped to warn.
AI_VISION_MODELNoVision model name.Qwen3-VL-235B-A22B-Instruct
SCREENSHOTS_DIRNoDirectory where screenshots and screen recordings are saved. Defaults to the system temp directory.
PAGE_SOURCES_DIRNoDirectory for saved XML page-source snapshots when saveToFile is true. Defaults to the OS temp directory.
AI_VISION_API_KEYNoAPI key for the vision model provider. Required when AI_VISION_ENABLED=true.
AI_VISION_ENABLEDNoSet to true to register the appium_ai vision-based element finding tool.false
OTEL_SERVICE_NAMENoService name reported to the OpenTelemetry collector.
APPIUM_MCP_EVIDENCENoSet to true or 1 to attach structured action evidence records to find-element and gesture responses.false
CAPABILITIES_CONFIGNoAbsolute path to a capabilities.json file with per-platform capability presets.
OTEL_TRACES_SAMPLERNoOpenTelemetry trace sampling strategy, for example parentbased_always_on.
AI_VISION_COORD_TYPENoCoordinate type: normalized or absolute.normalized
ALLOW_REMOTE_APP_URLSNoSet to false to reject HTTP(S) app URLs for embedded-driver installation and session creation.true
AI_VISION_API_BASE_URLNoBase URL of the OpenAI-compatible vision model API. Required when AI_VISION_ENABLED=true.
APPIUM_MCP_TOOL_GROUPSNoComma-separated tool groups to register, such as default,qa,providers or all.
AI_VISION_IMAGE_QUALITYNoJPEG quality from 1 to 100 for compressed screenshots sent to the vision API.80
APPIUM_MCP_APPS_ENABLEDNoSet to false or 0 to force the embedded MCP Apps UI compatibility fallback.true
APPIUM_MCP_DOCS_ENABLEDNoSet to true, 1, yes, or on to register opt-in documentation tools when @appium/mcp-documentation is installed.false
APPIUM_MCP_OTEL_ENABLEDNoSet to true to enable OpenTelemetry tracing.false
APPIUM_MCP_TRUSTED_MODENoOpt-in trusted automation mode that skips destructive-operation confirmation for explicitly listed operations and apps.
APPIUM_MCP_WDA_APP_PATHNoAbsolute path to a pre-extracted WebDriverAgentRunner-Runner.app bundle for iOS simulator preparation.
OTEL_RESOURCE_ATTRIBUTESNoComma-separated key=value resource attributes attached to every OpenTelemetry span.
AI_VISION_IMAGE_MAX_WIDTHNoMax image width in pixels before compression.1080
APPIUM_MCP_ALLOWED_ORIGINSNoComma-separated exact HTTP(S) origins allowed to access the HTTP transport from browser clients.
APPIUM_MCP_TRUSTED_MODE_OPSNoOperations allowed by APPIUM_MCP_TRUSTED_MODE.
OTEL_EXPORTER_OTLP_ENDPOINTNoFallback OpenTelemetry endpoint overridden by OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.
OTEL_EXPORTER_OTLP_PROTOCOLNoOpenTelemetry trace export protocol: http/json or grpc.http/json
SENTENCE_TRANSFORMERS_MODELNoHugging Face model used for semantic search in Appium documentation queries.Xenova/all-MiniLM-L6-v2
APPIUM_MCP_TRUSTED_MODE_APPSNoApps allowed by APPIUM_MCP_TRUSTED_MODE.
REMOTE_SERVER_URL_ALLOW_REGEXNoRegular expression applied to the complete remoteServerUrl before connecting to a remote Appium/WebDriver server.
APPIUM_MCP_TRUSTED_MODE_REASONNoReason recorded when trusted automation mode is enabled.
APPIUM_MCP_ON_CLIENT_DISCONNECTNoControls cleanup when the MCP client disconnects: delete_all deletes MCP-owned sessions; skip keeps them.delete_all
OTEL_EXPORTER_OTLP_TRACES_HEADERSNoOpenTelemetry trace exporter headers, for example for authentication metadata.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTNoOpenTelemetry traces endpoint. Includes /v1/traces for HTTP/JSON; gRPC endpoints omit it.
OTEL_EXPORTER_OTLP_TRACES_PROTOCOLNoTrace-specific OpenTelemetry protocol; overrides OTEL_EXPORTER_OTLP_PROTOCOL.
REMOTE_SERVER_ENABLE_DIRECT_CONNECTNoSet to false to disable the WebDriver client's enableDirectConnect behavior for remote sessions.true
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATENoPath to a custom CA certificate file for the gRPC trace exporter.
APPIUM_MCP_OTEL_INCLUDE_ARGUMENT_VALUESNoSet to true to include sanitized non-sensitive argument values in OpenTelemetry spans.false
APPIUM_MCP_PERSIST_REMOTE_SESSIONS_PATHNoDirectory path where attached remote session information is persisted as JSON files.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Appium mobile automation through MCP. Defaults that avoid broken flows:

  • Establish a driver session first: select_device and appium_session_management (action=create) for local/embedded mode, or attach to a remote session when the user supplies a server URL.

  • Call only tools this server actually registers (appium_find_element, appium_gesture, appium_session_management, etc.); do not invent tool names or aliases.

  • Prefer stable locators: accessibility id and id before long xpath; use xpath only when nothing else works.

  • Use appium_gesture for taps and drags; when something is off-screen, use action=scroll_to_element instead of spamming appium_find_element alone.

  • For local install, doctor, or smoke tests, use appium_skills if registered.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
resources
{
  "subscribe": true,
  "listChanged": true
}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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.

appium_session_managementA

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.

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.

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.

appium_mobile_device_infoB

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.

appium_mobile_fileA

Push or pull a file using Appium mobile extensions. action=push uses payloadBase64, action=pull returns contentBase64.

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.

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.

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.

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.

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.

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.

appium_find_elementA

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).

appium_find_elementsA

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.

appium_mobile_press_keyA

Press navigation keys (BACK, HOME, APP_SWITCH) on Android or physical buttons (HOME, volume, etc.) on iOS/tvOS.

appium_set_valueB

Enter text into an element

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.

appium_get_textC

Get text from an element

appium_get_element_attributeA

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).

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.

appium_get_active_elementA

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]

appium_get_page_sourceB

Get current-screen XML. saveToFile=true returns server-local path/bytes and enables selector/pattern summaries.

appium_orientationA

Get or set the device/screen orientation. Supports action=get and action=set (LANDSCAPE or PORTRAIT).

appium_alertA

Handle system alerts with action=accept|dismiss, or read alert text with action=get_text.

appium_screenshotA

Take a screenshot and save as PNG. Optionally provide elementUUID to capture only that element.

appium_get_window_sizeA

Get the width and height of the device screen in pixels. Useful for calculating coordinates for swipes, taps, and scrolls.

appium_screen_recordingB

Start or stop screen recording. action=start begins recording; action=stop stops and saves to MP4.

appium_app_lifecycleC

Manage app lifecycle, installation, state, data, and deep links.

appium_mobile_permissionsB

Get/update Android app permissions or iOS Simulator privacy services; reset iOS privacy prompts. See action-specific parameters.

appium_contextA

Manage Appium contexts with one tool. action=list returns all contexts and current context. action=switch changes to a target context.

appium_observeA

Compact one-line-per-element view of the current screen (class, id, desc, text, flags, center). Far cheaper than page source or generate_locators. Use diff=true after an action.

appium_wait_forA

Poll until a locator is present (or gone). Use instead of retrying find_element after navigation.

appium_verify_locatorA

Count matches for each locator on the live screen. Only a count of exactly 1 is safe to put in test code; >1 is ambiguous, 0 is absent.

appium_batchA

Run up to 25 steps (tap, type, wait, read, back, pause) in ONE call and return per-step results plus a compact screen summary. Locators: id=, desc=, text=, xpath=, uia=, pred=. Taps/types wait up to 10s for the element by default.

appium_screen_intelA

Classify the current screen (form, list, dialog, login...) and summarise inputs, buttons, navigation, keyboard/dialog state, below-the-fold content and suggested next actions. One call replaces page source + several finds.

appium_locator_intelA

Find target element(s) by description and return validated locator candidates, each with live match count (1 = unique), a 0-100 stability score and warnings (value-dependent ids, positional xpath, hidden target). Recommended locator is first. Counts come from the current screen, so re-verify after navigation.

appium_diagnoseA

Failure intelligence: after a step fails, checks session liveness, app state, current screen (dialog, keyboard, hidden/ambiguous/disabled target) and logcat crash/ANR/network signals, then returns evidence, likely causes with confidence, next steps and safe recovery. Read-only; never retries or changes state.

appium_session_healthA

Diagnose a session: device state (adb), Appium server (remote), session liveness, app state and foreground, ANR dialog. Returns the failure kind with signals and whether replacing the session would help. With recover=true and only for a recoverable failure (dead session or driver), replaces the session once, bounded to 2 attempts per 10 minutes, never touches other sessions, never resets app data, relaunches the app and verifies the new session. Cloud and attached sessions are not replaced.

generate_locatorsA

Generate current-page locator candidates for inspection. Defaults: controls for UiAutomator2/XCUITest/Web; all elements except hierarchy for other native drivers.

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.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Generate Code With LocatorsGenerate code for the current page with locators which was retrieved from generate_locators tool. The code should be generated in the same priorty order as the locators were generated. Always use the actions API code from the template for the gestures. For iOS the priority order is: 'id', 'accessibility id', '-ios predicate string', '-ios class chain', 'xpath', 'class name', For Android the priority order is: 'id', 'accessibility id', 'xpath', '-android uiautomator', 'class name', which follows the page factory pattern. Dont not strictly create test cases, just generate the code for locators.
Appium Page Source InspectorInteractive inspector for appium_get_page_source results
Appium Screenshot ViewerInteractive viewer for appium_screenshot results
Appium Locator GeneratorInteractive viewer for generate_locators results

TDQS

B3.2/5.0

Scored across 40 tools

Disambiguation3/5

Many tools have distinct purposes, but there are notable overlapping clusters: screen inspection (appium_observe, appium_screen_intel, appium_get_page_source, generate_locators), element finding (appium_find_element, appium_find_elements, appium_wait_for, appium_verify_locator), and diagnostics/recovery (appium_diagnose, appium_session_health, appium_session_management). Descriptions often clarify intended use, but the volume and overlap still create meaningful misselection risk.

Naming Consistency3/5

Most names are snake_case and readable, but the appium_ prefix is inconsistent: select_device, prepare_ios_simulator, and generate_locators lack it while most others include it. Verb style also varies between action-oriented names and noun-like names such as appium_screen_intel, appium_alert, and appium_context.

Tool Count2/5

With 40 tools, the surface is well beyond a typical focused tool set for mobile automation and includes several overlapping inspection, locator, and diagnostic tools. While the domain is broad, many tools could be consolidated, making the count excessive for practical selection.

Completeness4/5

The set covers a wide Appium lifecycle: device selection/preparation, session management, gestures, element interaction, app lifecycle, files, permissions, geolocation, diagnostics, and test generation. Minor gaps remain around explicit log/network/performance retrieval, but the core mobile automation surface is largely complete.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues