Skip to main content
Glama
appium

MCP Appium

Official
by appium

appium_session_management

Destructive

Create, attach, detach, delete, list, or select Appium sessions to manage mobile test automation lifecycles. Switch active sessions and control iOS/Android testing connections.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform. create: Create a new Appium session with Android, iOS or any device/driver Appium supports. DEFAULT MODE (no remoteServerUrl) — USE THIS UNLESS THE USER EXPLICITLY PROVIDES A SERVER URL: - Drivers run embedded inside this MCP server; no separate Appium process is needed - Use select_device tool FIRST to discover devices and let the user choose platform and device - Then call action=create with the selected platform (do NOT pass remoteServerUrl) - For iOS simulators, call prepare_ios_simulator before action=create - DO NOT assume or default to any platform - NEVER invent a localhost URL (e.g. http://localhost:4723) — omitting remoteServerUrl IS the local/embedded mode REMOTE SERVER MODE (only when user explicitly provides a URL like http://localhost:4723): - SKIP select_device tool entirely - Infer the platform from the user's request (e.g., 'ios', 'android', or 'general') - If platform is 'general', treat the provided capabilities as a pass-through W3C/Appium capability set (useful for non-Android/iOS drivers like Windows, macOS, or custom drivers) - Infer device type from context when possible (e.g., 'simulator', 'real device') - Call session with action=create directly with platform, remoteServerUrl, and any other capabilities from the user's request - Example: User says 'start session with http://localhost:4723 for ios with iphone 17' → infer platform='ios' and call session(action=create) with remoteServerUrl and platform parametersattach: Attach MCP Appium to an existing remote Appium session without taking ownership of its lifecycle. Requires remoteServerUrl and sessionId. Always pass capabilities with at least platformName (e.g. '{"platformName":"iOS"}' or '{"platformName":"Android"}') so the client is configured with the correct protocol commands.detach: Remove an attached Appium session from MCP Appium without deleting the real remote session. Defaults to the active session.delete: Delete a mobile session and clean up resources. If sessionId is omitted, deletes the active session.list: List all active Appium sessions managed by this MCP server, including active flag, ownership, and current context.select: Set an existing Appium session as the active session for subsequent tool calls (requires sessionId).
platformNoRequired for create. For local servers, must match the platform selected via select_device. Use "general" for non-Android/iOS drivers (Windows, macOS, custom). For remote servers, infer from context.
sessionIdNoFor attach: existing session to connect to. For delete: session to remove (defaults to active). For detach: attached session to remove from MCP (defaults to active). For select: session to activate. Required for attach and select.
capabilitiesNoOptional W3C capabilities for create. Provide as a JSON string (e.g. '{"appium:app":"/path/to/app","appium:platformVersion":"17.0"}'). For create: applied on top of defaults for ios/android, or used as-is for general. Common: appium:app, appium:deviceName, appium:platformVersion, appium:bundleId. When passing from a capabilitiesHint result, serialize the full object to JSON — do NOT drop boolean or numeric values. For attach: always include platformName ("iOS" or "Android") so the WebDriver client loads the correct Appium protocol commands (e.g. '{"platformName":"iOS"}').
remoteServerUrlNoRemote Appium server URL for create or attach (e.g. http://localhost:4723). Omit to use local server for create.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=false and destructiveHint=true, so the agent knows this tool can mutate state. The description adds a small behavioral distinction between detach ('forget') and delete ('stop'), which is useful. However, it does not disclose important traits such as attach not taking ownership of the remote session lifecycle or detach leaving the real remote session intact—details that would prevent misuse and are only found in the parameter schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the general purpose and enumerates all actions without filler. It is compact and easily scannable. It is slightly run-on, but every clause earns its place, so the efficiency is strong.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-action tool with five parameters, the full definition is quite complete: the action parameter description covers local vs remote modes, prerequisites (select_device, prepare_ios_simulator), explicit prohibitions ('NEVER invent a localhost URL'), and examples. The tool description alone is thin, but the schema richness compensates. The absence of an output schema is partially mitigated by the list action describing its returned fields, though create/select return shapes are not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The complete parameter descriptions in the schema (modes, examples, JSON serialization, required capabilities for attach) already carry the full semantic load. The tool description itself does not add parameter meaning, but given the high coverage, no further description contribution is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (Appium sessions) and lists six concrete actions (create, attach, detach, delete, list, select), so the tool's scope is clear and visibly distinct from device-control, element, and file siblings. The verb 'Manage' is generic, but the action enumeration compensates and gives the agent a precise idea of what the tool does. It does not explicitly name an alternative sibling, so a 5 is not warranted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus siblings like select_device, prepare_ios_simulator, or the appium_* device-control tools. It only implies that session management is its job. Although the action=create parameter description later provides rich workflow rules (e.g., 'Use select_device tool FIRST', 'SKIP select_device tool entirely'), that guidance is not in the tool description itself, and the description carries no exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/appium/appium-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server