Mobile automation iOS MCP serverのロゴ

Mobile automation iOS MCP server

コミュニティ
iHackSubhodip

A production-ready iOS automation MCP server built with FastMCP 2.0, featuring clean modular architecture with complete platform segregation. Ready for cross-platform expansion with iOS-specific and shared components properly separated.

公開者iHackSubhodip
リポジトリmobile-automation-mcp-server
言語Python
フォーク
8
スター
32
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Mobile automation iOS MCP serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには32件のスターと8件のフォークがあります。

Mobile automation iOS MCP server

Modern iOS automation server built with FastMCP 2.0 and clean architecture

License: MIT Python 3.11+ Platform: macOS FastMCP Architecture

A production-ready iOS automation MCP server built with FastMCP 2.0, featuring clean modular architecture with complete platform segregation. Ready for cross-platform expansion with iOS-specific and shared components properly separated.

📺 Demo Video

Mobile automation iOS MCP server Demo

🎬 Watch the Complete Demo: Mobile automation iOS MCP server in Action

✨ Features

  • 🚀 FastMCP 2.0 - Modern Python-first MCP implementation
  • 🌐 Cloud Deployment - Ready for Railway, Heroku, or other platforms
  • 📱 Real iOS Automation - Appium + WebDriverAgent integration
  • 🏗️ Clean Modular Architecture - Complete platform segregation & SOLID principles
  • 🔄 Cross-Platform Ready - Shared utilities for future Android/other platforms
  • 🎨 Beautiful Logging - Colored console output with emojis
  • 🔧 Type-Safe - Comprehensive type hints throughout
  • 🔌 Extensible - Plugin-style tool system with modular configuration
  • 📦 Zero Code Duplication - DRY principles with shared utilities

🚀 Quick Start

Option 1: Remote Server (Recommended)

Use the hosted version on Railway - no local setup required:

json
{
  "mcpServers": {
    "ios-automation-railway": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp-server-demo-production.up.railway.app/sse/"
      ]
    }
  }
}

Option 2: Local Development

  1. Prerequisites

    • macOS (required for iOS automation)
    • Python 3.11+
    • uv (recommended) or pip
    • Xcode with iOS Simulator
    • Node.js (for Appium)
  2. Installation

    bash
    git clone https://github.com/iHackSubhodip/mcp-server-demo.git
    cd mcp-server-demo
    
    # Using uv (recommended)
    uv sync
    
    # Or using pip (legacy)
    pip install -e .
  3. Claude Desktop Configuration

    json
    {
      "mcpServers": {
        "ios-automation-local": {
          "command": "uv",
          "args": ["run", "python", "mobile-automation-mcp-server/fastmcp_server.py"],
          "cwd": "/path/to/mcp-server-demo"
        }
      }
    }

🏗️ Architecture

The Mobile automation iOS MCP server features a clean, modular architecture with complete platform segregation achieved through a comprehensive 6-phase refactoring. This design enables maximum maintainability, zero code duplication, and seamless cross-platform expansion.

✨ Architecture Achievements

🎯 Complete Platform Segregation

  • Cross-platform utilities isolated in shared/ package
  • iOS-specific code contained in platforms/ios/ package
  • Clean separation of concerns across all components
  • Future-ready for Android in platforms/android/

🔄 DRY Principles Applied

  • Shared utilities: Logger, exceptions, command runner
  • Base configuration: AppiumConfig, ServerConfig for reuse
  • Platform configs: iOS-specific settings separate
  • Zero duplication between current/future platforms

🛡️ Maintainable & Extensible

  • Self-contained platforms: Each platform completely independent
  • Unified interface: Single configuration entry point
  • Backward compatible: All existing interfaces preserved
  • Professional structure: Enterprise-grade organization

Directory Structure

mobile-automation-mcp-server/
├── fastmcp_server.py          # 🚀 FastMCP 2.0 server (main entry)
├── config/
│   └── settings.py           # 🔧 Unified configuration interface
├── shared/                   # 🌐 Cross-platform utilities & config
│   ├── utils/               # 🛠️ Platform-agnostic utilities  
│   │   ├── logger.py       # 📝 Colored logging with emojis
│   │   ├── exceptions.py   # ⚠️ Exception hierarchy
│   │   └── command_runner.py # 💻 Shell command execution
│   └── config/             # ⚙️ Base configuration classes
│       └── base_settings.py # 📋 AppiumConfig, ServerConfig
├── platforms/ios/          # 🍎 iOS-specific platform code
│   ├── automation/         # 🤖 iOS automation services
│   │   ├── appium_client.py # 📱 iOS automation client
│   │   ├── screenshot_service.py # 📸 Screenshot handling
│   │   └── simulator_manager.py # 🎮 Simulator management
│   ├── tools/             # 🔨 iOS-specific MCP tools
│   │   ├── appium_tap_type_tool.py # ⌨️ Text field automation
│   │   ├── find_and_tap_tool.py    # 👆 Advanced element finding
│   │   ├── launch_app_tool.py      # 🚀 App launching
│   │   └── screenshot_tool.py      # 📷 Screenshot capture
│   └── config/            # ⚙️ iOS-specific configuration
│       └── ios_settings.py # 🍎 iOSConfig (XCUITest, iPhone)
├── screenshots/             # 📁 Screenshot storage
├── Dockerfile              # 🐳 Container deployment
├── Procfile                # 🚂 Railway deployment
└── pyproject.toml          # 📦 Dependencies & project config

🎯 Benefits Achieved

AspectBefore RefactoringAfter Refactoring
StructureMixed iOS/shared codeClean platform segregation
MaintainabilityMonolithicModular & self-contained
ExtensibilityiOS-onlyCross-platform ready
Code ReuseDuplication likelyShared utilities for all platforms
ConfigurationSingle settings fileModular config hierarchy
OrganizationFlat structureProfessional enterprise structure

🔧 Available Tools

take_screenshot

Capture iOS simulator screenshots

json
{
  "filename": "optional_name.png",
  "device_id": "booted"
}

launch_app

Launch iOS applications

json
{
  "bundle_id": "com.apple.mobilesafari",
  "device_id": "booted"
}

find_and_tap

Find and tap UI elements with smart automation

json
{
  "accessibility_id": "submitButton",
  "take_screenshot": true,
  "dismiss_after_screenshot": false
}

appium_tap_and_type

Enhanced text input with element finding

json
{
  "text": "Hello World!",
  "element_type": "textField",
  "timeout": 10
}

list_simulators

List available iOS simulators

json
{}

get_server_status

Check server and Appium status

json
{}

🛠️ Development

Local Development Commands

bash
# Run FastMCP server locally (with uv)
uv run python mobile-automation-mcp-server/fastmcp_server.py

# Install dependencies (if needed)
uv sync

# Development mode (with dev dependencies)
uv sync --dev

Appium Setup

bash
# Install Appium
npm install -g appium
appium driver install xcuitest

# Start Appium server
appium server --port 4723

Architecture Development

bash
# The modular structure makes development easier:

# Work on shared utilities (affects all platforms)
cd shared/utils/

# Work on iOS-specific features  
cd platforms/ios/

# Work on configuration
cd config/

# Add new platforms (future)
mkdir platforms/android/

🌐 Cloud Deployment

This server is deployed on Railway and accessible via:

  • HTTP Endpoint: https://mcp-server-demo-production.up.railway.app/
  • SSE Endpoint: https://mcp-server-demo-production.up.railway.app/sse/

The cloud deployment simulates iOS automation responses for demonstration purposes.

📊 Key Improvements

FeatureTraditional MCPFastMCP 2.0 + Clean Architecture
SetupComplex configurationSimple Python decorators
ArchitectureMonolithicModular platform segregation
Code ReuseManual duplicationShared utilities package
Type SafetyManual validationBuilt-in Pydantic models
Error HandlingBasic try-catchRich context and logging
DeploymentLocal onlyCloud-ready with Railway
ExtensibilityHard to extendEasy platform addition
MaintainabilityComplexClean separation of concerns

🔍 Troubleshooting

Simulator Issues

bash
# List available simulators
xcrun simctl list devices

# Boot a simulator
xcrun simctl boot "iPhone 16 Pro"

Appium Connection

bash
# Check Appium status
curl http://localhost:4723/status

# Restart Appium
pkill -f appium && appium server --port 4723

📝 Dependencies

Core dependencies managed via pyproject.toml:

  • fastmcp>=2.9.2 - FastMCP 2.0 framework
  • mcp>=1.0.0 - Traditional MCP protocol
  • aiohttp>=3.9.0 - HTTP client for automation
  • appium-python-client>=3.0.0 - iOS automation
  • pydantic>=2.4.0 - Data validation

Install with:

bash
# Using uv (recommended)
uv sync

# Or using pip
pip install -e .

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow the clean architecture patterns:
    • Shared utilities go in shared/
    • Platform-specific code goes in platforms/{platform}/
    • Configuration follows the modular hierarchy
  4. Add comprehensive error handling
  5. Submit a pull request

🚀 Future Expansion

Thanks to the clean architecture, adding new platforms is straightforward:

bash
# Add Android platform (example)
mkdir -p platforms/android/{automation,tools,config}

# Reuse shared utilities
from shared.utils import get_logger, AutomationMCPError
from shared.config import AppiumConfig, ServerConfig

# Create Android-specific config
from platforms.android.config import AndroidConfig

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "ihacksubhodip-mobile-automation-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Mobile automation iOS MCP serverのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Mobile automation iOS MCP serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Mobile automation iOS MCP serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Mobile automation iOS MCP serverのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "ihacksubhodip-mobile-automation-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mobile-automation-mcp-server"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてMobile automation iOS MCP serverのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Mobile automation iOS MCP serverのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Mobile automation iOS MCP serverを使ってこのタスクを手伝ってもらえますか?
Mobile automation iOS MCP server
はい、読みました。
Mobile automation iOS MCP serverで調べた結果をお伝えします。

よくある質問

Mobile automation iOS MCP server MCPサーバーは何に使いますか?

Mobile automation iOS MCP serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでMobile automation iOS MCP server MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでMobile automation iOS MCP serverを利用できます。

TypingMindでMobile automation iOS MCP server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。Mobile automation iOS MCP serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Mobile automation iOS MCP server MCPをTypingMindに接続するにはどうすればよいですか?

Mobile automation iOS MCP serverはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでMobile automation iOS MCP server MCPのどのようなツールを利用できますか?

Mobile automation iOS MCP serverはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Mobile automation iOS MCP server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Mobile automation iOS MCP serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇