Simulator MCP
Simulator MCP
MCP 프로토콜을 통해 AI가 iOS 시뮬레이터를 제어할 수 있게 합니다. 기기 시작, 스크린샷, 클릭, 텍스트 입력, 패킷 캡처, 인터페이스 Mocking 기능을 제공합니다.
기능 개요
분류 | 도구 | 설명 |
기기 관리 |
| 모든 시뮬레이터 나열 (상태, UDID, 런타임) |
| 시뮬레이터 시작 / 종료 | |
| .app 패키지 설치 | |
| 앱 실행 (네트워크 가로채기 주입을 위한 | |
| URL 또는 딥링크 열기 (실행 중인 시뮬레이터 자동 선택) | |
스크린샷 |
| 스크린샷을 찍어 base64 이미지로 AI에게 반환 (시각적 분석 지원) |
UI 상호작용 |
| 지정된 iOS 좌표 클릭 (길게 누르기 |
| 시작점에서 끝점까지 스와이프 | |
| 현재 포커스된 입력창에 텍스트 입력 | |
| 하드웨어 버튼 누르기 ( | |
| UI 접근성 트리 가져오기 (JSON 형식) | |
| 텍스트로 요소를 매칭하여 중심 좌표 클릭 | |
네트워크 가로채기 |
| mitmproxy 프록시 시작 (기본 8080 포트) |
| 프록시 중지 | |
| 패킷 캡처 기록 확인 (URL, 메서드 필터링 지원) | |
| Mock 규칙 추가 (URL 정규식 매칭) | |
| Mock 규칙 삭제 |
총 18개의 도구가 기기 관리, UI 자동화, 네트워크 가로채기 3대 시나리오를 커버합니다.
Related MCP server: Shotter
사전 요구 사항
의존성 | 용도 | 설치 방법 |
Xcode |
| Mac App Store |
idb-companion | fb-idb의 네이티브 데몬 (UI 자동화) |
|
Python >= 3.11 | 런타임 |
|
uv (권장) | 패키지 관리 |
|
현재 저장소에 내장된
proxy-dylib/libproxy_inject.dylib는arm64사전 컴파일 결과물입니다. Intel Mac의 경우x86_64또는 범용 버전으로 직접 다시 컴파일해야 합니다.
설치
cd simulator-mcp
# 方式一:uv(推荐)
uv venv && uv pip install -e .
# 方式二:pip
python -m venv .venv && source .venv/bin/activate && pip install -e .Python 의존성 (자동 설치):
mcp >= 1.0— MCP 프로토콜 SDK (stdio JSON-RPC)mitmproxy >= 10.0— HTTP(S) 프록시fb-idb— iOS 시뮬레이터 UI 자동화
Claude Code 설정
~/.claude.json의 mcpServers에 다음을 추가하세요:
{
"mcpServers": {
"simulator": {
"command": "/path/to/simulator-mcp/.venv/bin/simulator-mcp"
}
}
}Claude Desktop 설정
~/Library/Application Support/Claude/claude_desktop_config.json에 다음을 추가하세요:
{
"mcpServers": {
"simulator": {
"command": "/path/to/simulator-mcp/.venv/bin/simulator-mcp"
}
}
}
/path/to/simulator-mcp를 실제 프로젝트 절대 경로로 바꾸세요.
사용 예시
설정이 완료되면 AI가 시뮬레이터를 직접 제어할 수 있습니다:
用户: 打开模拟器,截图看看当前页面
AI: 调用 list_devices → boot_device → take_screenshot
"当前页面显示的是 iOS 主屏幕..."
用户: 打开微博,点击注册按钮
AI: 调用 launch_app → take_screenshot → tap_element(text="注册")
"已点击注册按钮,进入了注册页面"
用户: 抓包看看注册接口返回了什么
AI: 调用 start_network_proxy → launch_app(proxy=true) → get_network_log(url_pattern="register")
"注册接口返回了 200,响应体是..."
用户: Mock 掉登录接口,返回自定义数据
AI: 调用 add_mock_rule(url_pattern="api/login", response_body='{"token":"fake"}')
"已添加 Mock 规则 mock_1"네트워크 패킷 캡처 설명
사용 절차
프록시 시작:
start_network_proxy(port=8080)백그라운드 스레드에서 mitmproxy를 자동으로 시작합니다.
현재 booted 상태인 시뮬레이터가 있으면 mitmproxy CA 인증서 설치를 먼저 시도합니다.
프록시와 함께 앱 실행:
launch_app(udid="xxx", bundle_id="com.example.app", proxy=true)DYLD_INSERT_LIBRARIES를 통해libproxy_inject.dylib를 주입합니다.NSURLSessionConfiguration을 Swizzle하여 모든 HTTP(S) 트래픽을 프록시로 전달합니다.대상 시뮬레이터에 CA 인증서를 다시 설치하여 "프록시를 먼저 켜고 시뮬레이터를 나중에 실행"할 때 HTTPS 캡처가 실패하는 문제를 방지합니다.
요청 확인/Mock:
get_network_log(url_pattern="api/user")— URL 부분 문자열로 필터링add_mock_rule(url_pattern="api/login", response_body="...")— URL 정규식 매칭
기술 원리
App 启动 → dylib 注入 → swizzle NSURLSessionConfiguration
→ 所有 NSURLSession 流量 → mitmproxy (127.0.0.1:8080)
→ MockEngine 检查规则 → 命中则返回假数据 / 未命中则转发真实服务器
→ NetworkLog 记录请求/响应(内存环形缓冲,最多 1000 条)
→ 同时落盘:
- `/tmp/proxy_requests.log`:摘要日志
- `/tmp/proxy_requests.jsonl`:结构化明细日志
- `/tmp/proxy_request_bodies/`:超大 body 的分流文件프로젝트 구조
simulator-mcp/
├── pyproject.toml # 项目配置、依赖、入口定义
├── README.md # 本文件
├── ARCHITECTURE.md # 技术架构详细文档
├── diagrams/ # Mermaid 源文件 + PNG 架构图
├── proxy-dylib/
│ ├── proxy_inject.m # DYLD 注入源码 (Objective-C, 95 行)
│ └── libproxy_inject.dylib # 编译产物 (当前为 arm64)
└── src/simulator_mcp/
├── __init__.py # 入口: main() → asyncio.run(server.main())
├── __main__.py # python -m simulator_mcp 入口
├── server.py # MCP Server: 18 个工具注册 + call_tool 分发
├── simulator/
│ ├── simctl.py # xcrun simctl 异步封装 (设备管理 + 截图)
│ └── idb_client.py # fb-idb 异步封装 (UI 交互 + tap_element)
├── tools/
│ ├── device.py # 设备管理工具 (参数解析 + proxy 注入逻辑)
│ ├── screenshot.py # 截图工具 (PNG → base64)
│ ├── ui.py # UI 交互工具 (参数解析 → idb_client)
│ └── network.py # 网络工具 (参数解析 → proxy_server)
└── proxy/
├── proxy_server.py # mitmproxy 生命周期 + ProxyAddon + CA 证书安装
├── network_log.py # 请求日志: 内存环形缓冲 + 结构化落盘
└── mock_engine.py # Mock 规则引擎: 正则匹配, 首条命中dylib 재컴파일 (선택 사항)
proxy_inject.m을 수정했을 경우:
cd proxy-dylib
clang -dynamiclib -framework Foundation \
-arch arm64 -arch x86_64 \
-o libproxy_inject.dylib \
proxy_inject.m아키텍처 문서
상세한 기술 아키텍처 설계는 ARCHITECTURE.md를 참조하세요.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables interaction with iOS simulators by providing tools to inspect UI elements, control UI interactions, and manage simulators through natural language commands.179,7002,136MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to automate iOS Simulator interactions including device management, UI element interaction (tap, swipe, type), screenshot capture, and execution of YAML-defined navigation workflows.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive control of iOS simulators and real devices through AI assistants, supporting app management, UI automation, screenshots, media operations, and location simulation for iOS development and testing workflows.5MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that provides comprehensive tools for managing iOS simulators, including device control, app lifecycle management, and UI automation. It enables developers to boot devices, install apps, capture screenshots, and simulate user interactions through natural language commands.3MIT
Related MCP Connectors
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Live browser debugging for AI assistants — DOM, console, network via MCP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/992429169/simulator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server