Skip to main content
Glama

iPhone MCP Server

by Lakr233

iPhone MCP Server

A Model Context Protocol (MCP) server for automating iPhone tasks with Appium. Supports app control, UI interactions, and screenshot capture via streamable HTTP.

Screenshot on Cherry Studio

We recommend Cherry Studio as an MCP client for iPhone automation.

Features

  • Retrieve device info and list installed apps
  • Capture screenshots (JPEG, around 500KB)
  • List UI elements and perform touch operations
  • Launch or switch apps using bundle IDs
  • Optimized XML output to minimize token usage

Installation

Prerequisites

  • Python 3.8 or later
  • Node.js and npm
  • iPhone with UDID
  • Xcode

Steps

  1. Clone the repo: git clone https://github.com/Lakr233/iphone-mcp.git && cd iphone-mcp
  2. Set up virtual environment: python -m venv .venv && source .venv/bin/activate
  3. Install dependencies: pip install -r requirements.txt
  4. Install Appium: npm install -g appium && appium driver install xcuitest
  5. Set up WebDriver Agent: Follow the WebDriver Agent Guide
  6. Configure: Edit start.sh with your DEVICE_UDID

Usage

Run ./start.sh to start Appium and the MCP server. Access it at http://127.0.0.1:8765/mcp with default settings.

Tools

  • iphone_device_info: Get device details
  • iphone_device_apps: List installed apps
  • iphone_interface_snapshot: Capture screenshot and XML
  • iphone_interface_elements: List UI elements
  • iphone_operate_click: Perform tap
  • iphone_operate_swipe: Perform swipe
  • iphone_operate_text_input: Input text
  • iphone_operate_app_launch: Launch app
  • iphone_operate_get_current_bundle_id: Get current bundle ID

Configuration

Set environment variables in start.sh (defaults in src/utils.py):

  • DEVICE_UDID (required)
  • APPIUM_HOST/PORT
  • SERVER_HOST/PORT/PATH
  • LOG_LEVEL

Development

  • Run tests: pytest
  • Code style: Python 3.8+ with type hints

Contributing

Fork the repo, create a branch, and submit a pull request. Report bugs or suggest features via issues.

License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables iPhone automation through Appium integration, allowing users to control apps, capture screenshots, interact with UI elements, and perform touch operations via natural language commands.

  1. Features
    1. Installation
      1. Prerequisites
      2. Steps
    2. Usage
      1. Tools
        1. Configuration
          1. Development
            1. Contributing
              1. License

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  Enables interaction with iOS simulators by providing tools to inspect UI elements, control UI interactions, and manage simulators through natural language commands.
                  Last updated -
                  10
                  2,190
                  936
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol (MCP) server that enables mobile app automation using Appium, supporting various device interactions, element operations, and app management through a standardized protocol.
                  Last updated -
                  110
                  8
                  22
                  Apache 2.0
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  Provides programmatic access to Xcode functionality, enabling AI assistants to create, build, test, and manage iOS/macOS projects directly.
                  Last updated -
                  27
                  20
                  2
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  Enables AI assistants to build, test, run, and manage Apple platform projects (iOS, macOS, tvOS, watchOS, visionOS) directly through Xcode. Provides comprehensive control over Xcode projects, Swift packages, simulators, and development workflows without leaving your editor.
                  Last updated -
                  21
                  67
                  1
                  MIT License
                  • Apple

                View all related MCP servers

                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/Lakr233/iphone-mcp'

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