شعار 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
الروابط
  • اربط الأدوات بمسارات عمل الذكاء الاصطناعي

    يتيح Mobile automation iOS MCP server إمكانات 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": []
    }
  }
}

استخدم MCP الخاص بـ Mobile automation iOS MCP server مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Mobile automation iOS MCP server، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal مفتوحة واترك العملية قيد التشغيل أثناء استخدام أدوات MCP.
3

إضافة Mobile automation iOS MCP server كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Mobile automation iOS MCP server.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "ihacksubhodip-mobile-automation-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mobile-automation-mcp-server"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Mobile automation iOS MCP server، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Mobile automation iOS MCP server.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Mobile automation iOS MCP server لمساعدتي في هذه المهمة؟
Mobile automation iOS MCP server
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Mobile automation iOS MCP server.

الأسئلة الشائعة

ما استخدامات خادم MCP Mobile automation iOS MCP server؟

Mobile automation iOS MCP server هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Mobile automation iOS MCP server مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Mobile automation iOS MCP server مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم خادم MCP Mobile automation iOS MCP server مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Mobile automation iOS MCP server، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Mobile automation iOS MCP server بـ TypingMind؟

يعمل Mobile automation iOS MCP server عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Mobile automation iOS MCP server في TypingMind؟

يتيح Mobile automation iOS MCP server إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Mobile automation iOS MCP server؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويتيح لك التحكم بنفسك في مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP. إذا كان Mobile automation iOS MCP server يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇