iHackSubhodip/mcp-server-demo
If you are the rightful owner of mcp-server-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A production-ready iOS automation MCP server that transforms monolithic automation scripts into maintainable, extensible architecture.
iOS MCP Server
Modern iOS automation server built with FastMCP 2.0 and clean architecture
A production-ready iOS automation MCP server built with FastMCP 2.0, offering both local and cloud deployment options. Features clean architecture, comprehensive error handling, and professional logging.
šŗ Demo Video
š¬ Watch the Complete Demo: 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 Architecture - SOLID principles and design patterns
- šØ Beautiful Logging - Colored console output with emojis
- š§ Type-Safe - Comprehensive type hints throughout
- š Extensible - Plugin-style tool system
š Quick Start
Option 1: Remote Server (Recommended)
Use the hosted version on Railway - no local setup required:
{
"mcpServers": {
"ios-automation-railway": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp-server-demo-production.up.railway.app/sse/"
]
}
}
}
Option 2: Local Development
-
Prerequisites
- macOS (required for iOS automation)
- Python 3.11+
- Xcode with iOS Simulator
- Node.js (for Appium)
-
Installation
git clone https://github.com/iHackSubhodip/mcp-server-demo.git cd mcp-server-demo pip install -r ios_mcp_server/requirements.txt
-
Claude Desktop Configuration
{ "mcpServers": { "ios-automation-local": { "command": "python", "args": ["-m", "ios_mcp_server.main"], "cwd": "/path/to/mcp-server-demo" } } }
šļø Architecture
Directory Structure
ios_mcp_server/
āāā main.py # Entry point
āāā fastmcp_server.py # FastMCP 2.0 server
āāā config/
ā āāā settings.py # Configuration management
āāā automation/ # Core automation services
ā āāā appium_client.py # iOS automation client
ā āāā screenshot_service.py # Screenshot handling
ā āāā simulator_manager.py # Simulator management
āāā tools/ # MCP tools
ā āāā base_tool.py # Abstract base class
ā āāā tool_registry.py # Tool management
ā āāā appium_tap_type_tool.py
ā āāā find_and_tap_tool.py
ā āāā launch_app_tool.py
ā āāā screenshot_tool.py
āāā utils/ # Shared utilities
ā āāā logger.py # Colored logging
ā āāā exceptions.py # Custom exceptions
ā āāā command_runner.py # Async command execution
āāā server/ # Traditional MCP server
āāā screenshots/ # Screenshot storage
āāā Dockerfile # Container deployment
āāā Procfile # Railway deployment
āāā requirements.txt # Dependencies
š§ Available Tools
take_screenshot
Capture iOS simulator screenshots
{
"filename": "optional_name.png",
"device_id": "booted"
}
launch_app
Launch iOS applications
{
"bundle_id": "com.apple.mobilesafari",
"device_id": "booted"
}
find_and_tap
Find and tap UI elements with smart automation
{
"accessibility_id": "submitButton",
"take_screenshot": true,
"dismiss_after_screenshot": false
}
appium_tap_and_type
Enhanced text input with element finding
{
"text": "Hello World!",
"element_type": "textField",
"timeout": 10
}
list_simulators
List available iOS simulators
{}
get_server_status
Check server and Appium status
{}
š ļø Development
Local FastMCP Development
# Install dependencies
pip install -r ios_mcp_server/requirements.txt
# Run FastMCP server
python ios_mcp_server/fastmcp_server.py
Traditional MCP Development
# Run traditional MCP server
python -m ios_mcp_server.main
Appium Setup
# Install Appium
npm install -g appium
appium driver install xcuitest
# Start Appium server
appium server --port 4723
š 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
Feature | Traditional MCP | FastMCP 2.0 |
---|---|---|
Setup | Complex configuration | Simple Python decorators |
Type Safety | Manual validation | Built-in Pydantic models |
Error Handling | Basic try-catch | Rich context and logging |
Deployment | Local only | Cloud-ready with Railway |
Development | Boilerplate heavy | Clean, intuitive API |
š Troubleshooting
Simulator Issues
# List available simulators
xcrun simctl list devices
# Boot a simulator
xcrun simctl boot "iPhone 16 Pro"
Appium Connection
# Check Appium status
curl http://localhost:4723/status
# Restart Appium
pkill -f appium && appium server --port 4723
š Dependencies
Core dependencies:
fastmcp>=2.9.2
- FastMCP 2.0 frameworkmcp>=1.0.0
- Traditional MCP protocolaiohttp>=3.9.0
- HTTP client for automationappium-python-client>=3.0.0
- iOS automationpydantic>=2.4.0
- Data validation
š¤ Contributing
- Fork the repository
- Create a feature branch
- Follow the existing architecture patterns
- Add comprehensive error handling
- Submit a pull request
š License
This project is licensed under the MIT License - see the file for details.