Simctl Mcp
概覽
什麼是 simctl-mcp?
simctl-mcp 是一個在 GitHub 上託管的公共儲存庫,由用戶 ### ambar 創建。這個項目旨在提供一個命令行介面,用於管理和控制 iOS 模擬器。它簡化了與模擬器的互動過程,使開發者能夠自動化任務並簡化開發工作流程。
simctl-mcp 的特點
- 命令行介面:提供一個用戶友好的命令行介面來管理 iOS 模擬器。
- 自動化:能夠自動化常見任務,如啟動模擬器、安裝應用程序和運行測試。
- 跨平台兼容性:在不同操作系統之間無縫運作,使所有開發者都能輕鬆使用。
- 開源:作為一個公共儲存庫,允許開發者根據自己的需求貢獻、修改和增強這個工具。
- 文檔:提供全面的文檔,幫助用戶有效地利用這個工具。
如何使用 simctl-mcp
- 安裝:使用以下命令從 GitHub 克隆儲存庫:
git clone https://github.com/ambar/simctl-mcp.git
- 進入目錄:切換到項目目錄:
cd simctl-mcp
- 執行命令:使用命令行介面來管理模擬器。例如,要列出所有可用的模擬器,可以運行:
./simctl list
- 自動化任務:使用 simctl-mcp 提供的命令創建腳本來自動化重複性任務。
常見問題
simctl-mcp 是用什麼編程語言編寫的?
simctl-mcp 主要是用 Python 編寫的,這使得熟悉該語言的開發者能夠輕鬆貢獻。
simctl-mcp 是否與所有版本的 iOS 兼容?
是的,simctl-mcp 設計用於與各種版本的 iOS 模擬器配合使用,確保在不同的開發環境中兼容。
我可以為 simctl-mcp 貢獻嗎?
當然可以!由於這是一個開源項目,歡迎貢獻。您可以分叉儲存庫,進行更改,然後提交拉取請求。
我可以在哪裡找到 simctl-mcp 的文檔?
文檔通常在儲存庫內部提供,通常位於 README.md
文件或專門的 docs
文件夾中。
我該如何報告 simctl-mcp 的問題或錯誤?
您可以通過導航到 GitHub 儲存庫中的「問題」標籤,提交一個新問題,並詳細說明您遇到的問題。
詳細
simctl-mcp
A Model Context Protocol server implementation for iOS Simulator control.
Config
.cursor/mcp.json
or .vscode/mcp.json
:
{
"mcpServers": {
"simctl-mcp": {
"command": "npx",
"args": ["-y", "simctl-mcp"]
}
}
}
Prompts
Some examples of prompts:
- What operations does the simulator support?
- Open shortcuts://
- What is the bundle ID of the "Settings" app?
- Set clipboard content to: Hello
- What is the simulator SDK version?
- Generate an Appium connection string for the "Settings" app
Usage
The server can be started in two modes:
- STDIO Mode (default)
- HTTP Server Mode
STDIO Mode
In STDIO mode, the server communicates through standard input/output streams.
npx simctl-mcp
HTTP Server Mode
In HTTP server mode, the server listens for HTTP connections on a specified port.
### Start with default port (8081)
npx simctl-mcp --http
### Start with custom port using --port flag
npx simctl-mcp --http --port 3000
### Start with custom port using environment variable
PORT=3000 npx simctl-mcp --http
Tools
Device Management:
- Create new simulator devices
- Delete existing devices
- Boot devices
- Shutdown devices
- List all available devices
- List available device types
- List available runtimes
App Management:
- Install apps
- Uninstall apps
- Launch apps
- Terminate running apps
- Get app container path
- Get app information
- List installed apps
App Permissions:
- Grant permissions to apps
- Revoke app permissions
- Reset all app permissions
System Features:
- Open URLs in simulator
- Add media files
- Get/Set environment variables
- Get/Set appearance (light/dark mode)
- Send simulated push notifications
Certificate & Security:
- Add root certificates
- Add regular certificates
- Reset keychain
Media & Content:
- Take screenshots
- Get/Set pasteboard content (clipboard)
伺服器配置
{
"mcpServers": {
"simctl-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--ambar--simctl-mcp--simctl-mcp",
"pnpm run start"
],
"env": {}
}
}
}