{"_id":"@asagakosho/serve-sim-mcp","_rev":"3-785c93a96b3195d1a7b75c82ea45d882","name":"@asagakosho/serve-sim-mcp","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@asagakosho/serve-sim-mcp","version":"0.1.0","license":"Apache-2.0","_id":"@asagakosho/serve-sim-mcp@0.1.0","maintainers":[{"name":"asagakosho","email":"kosho@asaga.jp"}],"os":["darwin"],"bin":{"serve-sim-mcp":"dist/index.js"},"dist":{"shasum":"fc6db47f23f8a45ffe4aff08d1bd5dbeb4c3749d","tarball":"https://registry.npmjs.org/@asagakosho/serve-sim-mcp/-/serve-sim-mcp-0.1.0.tgz","fileCount":4,"integrity":"sha512-Zzab6qnBituRira0MKqvcHZEcWKvLXI5T6w8eJ3K/St/XeyZ5d5Nwz6g8TEu++Y3FDhoWCPKZJyKFDavfqYTPw==","signatures":[{"sig":"MEUCIHRtzHhYbd7wv7Eu5fjbIKUljwtNHD9zwr7Cw4MVQD61AiEAoFaL0qLzwYbxgshpawo8OMgrobn8iE3/5CqVELNncfE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16639},"type":"module","engines":{"node":">=18"},"gitHead":"a8817e828241a23d6556d51316ae0482333a8852","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"asagakosho","email":"kosho@asaga.jp"},"_npmVersion":"11.10.1","description":"MCP server that exposes serve-sim as agent-callable tools (screenshot, tap, swipe, button, open_url, list_devices, camera).","directories":{},"_nodeVersion":"23.10.0","dependencies":{"zod":"^3.23.8","execa":"^9.5.2","serve-sim":"^0.1.28","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/serve-sim-mcp_0.1.0_1778727083078_0.6448063944503821","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@asagakosho/serve-sim-mcp","version":"0.2.0","license":"Apache-2.0","_id":"@asagakosho/serve-sim-mcp@0.2.0","maintainers":[{"name":"asagakosho","email":"kosho@asaga.jp"}],"os":["darwin"],"bin":{"serve-sim-mcp":"dist/index.js"},"dist":{"shasum":"3b3b3a413433d27766cbf640b5eefe1bef96e797","tarball":"https://registry.npmjs.org/@asagakosho/serve-sim-mcp/-/serve-sim-mcp-0.2.0.tgz","fileCount":9,"integrity":"sha512-uZru9PKF8wXlwYTvLEMjEtfswzIElvF52II3Jjclqogazwv2T7A/H25Bopb6lFdVJdyoa8oZxrtURF85/l153w==","signatures":[{"sig":"MEUCIADlQfGETxaPmb/ZB+CpB8hfw3DuVi01qYj2D9RoWd5sAiEAraE+Ur90K7NFtsKaucd1apjAoQtS3d2yIK/RrumhqB4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47346},"type":"module","engines":{"node":">=18"},"gitHead":"f2b5edfb9f0101038ba18918ba0f0b60489e54cd","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"asagakosho","email":"kosho@asaga.jp"},"_npmVersion":"11.10.1","description":"MCP server that exposes serve-sim as agent-callable tools (screenshot, tap, swipe, button, open_url, list_devices, camera).","directories":{},"_nodeVersion":"23.10.0","dependencies":{"zod":"^3.23.8","execa":"^9.5.2","serve-sim":"^0.1.28","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/serve-sim-mcp_0.2.0_1778729026197_0.3377729350276206","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@asagakosho/serve-sim-mcp","version":"0.2.1","description":"MCP server that exposes serve-sim as agent-callable tools (screenshot, tap, swipe, button, open_url, list_devices, camera).","license":"Apache-2.0","type":"module","bin":{"serve-sim-mcp":"dist/index.js"},"engines":{"node":">=18"},"os":["darwin"],"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","execa":"^9.5.2","serve-sim":"^0.1.28","zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.7.0"},"gitHead":"5673ce52afb7e88884260e05b5bf123cdb01cc14","_id":"@asagakosho/serve-sim-mcp@0.2.1","_nodeVersion":"23.10.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-uZlvU+13YA32Dnw6hMm0leBc9pPSVIdaWiCPUOCSURcvB3Z5hkcorAVfcVzNilvoEkKi0Re1YPq9RVkLIQTe6A==","shasum":"7bb86f1be313c21b65044a3d7899c7054af2c77b","tarball":"https://registry.npmjs.org/@asagakosho/serve-sim-mcp/-/serve-sim-mcp-0.2.1.tgz","fileCount":9,"unpackedSize":47590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGudi5PCIeewwau9pJCPOzhM45FbCYAfB/LSjHQdYl8AAiACj8scqIgXrWOjGHiS3LwxfhVO+K9NmS7NbOJSqZEUcw=="}]},"_npmUser":{"name":"asagakosho","email":"kosho@asaga.jp"},"directories":{},"maintainers":[{"name":"asagakosho","email":"kosho@asaga.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/serve-sim-mcp_0.2.1_1778729427510_0.7159852508872331"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-14T02:51:22.974Z","modified":"2026-05-14T03:30:27.769Z","0.1.0":"2026-05-14T02:51:23.225Z","0.2.0":"2026-05-14T03:23:46.367Z","0.2.1":"2026-05-14T03:30:27.661Z"},"license":"Apache-2.0","description":"MCP server that exposes serve-sim as agent-callable tools (screenshot, tap, swipe, button, open_url, list_devices, camera).","maintainers":[{"name":"asagakosho","email":"kosho@asaga.jp"}],"readme":"# @asagakosho/serve-sim-mcp\n\nMCP server that exposes [`serve-sim`](../serve-sim) as agent-callable tools, so LLMs (Claude Code, Claude Desktop, Cursor, etc.) can drive an iOS Simulator with structured tool calls instead of free-form shell commands.\n\n> Not affiliated with the upstream — this is a thin wrapper that shells out to the `serve-sim` CLI and `xcrun simctl`.\n\n## Why\n\n- LLMs are bad at writing gesture JSON by hand. This package exposes high-level intents (`sim_tap`, `sim_swipe`, `sim_button`) so the agent never sees raw protocol details.\n- Screenshots come back inline as image content, making the screenshot → reason → act loop trivial.\n- Multi-device handling is uniform: every tool takes an optional `udid`.\n\n## Install / run\n\nRequires macOS with Xcode command-line tools (`xcrun simctl`) and Node.js 18+.\n`serve-sim` itself is pulled in as a dependency — no separate install needed.\n\n### Claude Code / Claude Desktop / Cursor\n\nDrop this into your client's MCP config (`.mcp.json` for Claude Code):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"serve-sim\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@asagakosho/serve-sim-mcp\"]\n    }\n  }\n}\n```\n\nThat's it — first run downloads the package, subsequent runs are cached. Restart the client so it picks up the new server.\n\n### Manual / global install\n\n```sh\nnpm install -g @asagakosho/serve-sim-mcp\nserve-sim-mcp   # speaks MCP over stdio\n```\n\n## Tools (38)\n\n### Input\n| Tool | What it does |\n| --- | --- |\n| `sim_tap` | Tap at normalized (0..1) coords |\n| `sim_swipe` | Swipe between two normalized coords |\n| `sim_long_press` | Press and hold at a coord for N ms |\n| `sim_pinch` | (stub — multi-touch CLI not yet exposed upstream) |\n| `sim_gesture` | Raw gesture event passthrough |\n| `sim_button` | home / lock / side-button / siri / apple-pay / volume-up / volume-down |\n| `sim_rotate` | portrait / portrait_upside_down / landscape_left / landscape_right |\n| `sim_type_text` | Type text via osascript (Simulator must be focused; ASCII-friendly) |\n| `sim_open_url` | Open URL or deep link |\n\n### Screen / device\n| Tool | What it does |\n| --- | --- |\n| `sim_screenshot` | PNG inline as MCP image content |\n| `sim_list_devices` | Booted simulators (UDID, name, runtime) |\n| `sim_boot` | Boot by UDID or name |\n| `sim_shutdown` | Shut down one or all |\n| `sim_erase` | DESTRUCTIVE factory reset |\n| `sim_status_bar` | Override time / battery / wifi / cellular for clean screenshots |\n| `sim_status_bar_clear` | Remove overrides |\n| `sim_memory_warning` | Simulate low memory |\n| `sim_ca_debug` | CoreAnimation overlay (blended / copies / misaligned / offscreen / slow-animations) |\n\n### Apps / logs\n| Tool | What it does |\n| --- | --- |\n| `sim_app_launch` | Launch by bundle id with optional args |\n| `sim_app_terminate` | Kill by bundle id |\n| `sim_app_install` | Install a `.app` bundle |\n| `sim_app_uninstall` | Uninstall by bundle id |\n| `sim_app_container` | Resolve app/data/groups container path |\n| `sim_log_stream` | Capture `log stream` for a bounded duration (default 5s) |\n\n### Privacy / push / media\n| Tool | What it does |\n| --- | --- |\n| `sim_grant_permission` | Grant camera / photos / location / etc. without dialog |\n| `sim_reset_permission` | Reset so the dialog shows again |\n| `sim_push` | Deliver an APNs payload via `simctl push` |\n| `sim_add_media` | Add photos / videos to the Photos library |\n\n### Camera injection (wraps `serve-sim camera`)\n| Tool | What it does |\n| --- | --- |\n| `sim_camera_inject` | Inject placeholder / file / webcam and (re)launch the app |\n| `sim_camera_switch` | Hot-swap source (no relaunch) |\n| `sim_camera_mirror` | auto / on / off |\n| `sim_camera_status` | JSON state of the helper |\n| `sim_camera_list_webcams` | Host cameras |\n| `sim_camera_stop` | Stop the helper |\n\n### Helper lifecycle\n| Tool | What it does |\n| --- | --- |\n| `sim_serve_start` | `serve-sim --detach` (operation tools auto-start if needed) |\n| `sim_serve_stop` | `serve-sim --kill` |\n| `sim_serve_status` | `{ running: bool }` |\n| `sim_list_streams` | Raw `serve-sim --list` output |\n\nAll tools accept an optional `udid` — omit when only one simulator is booted.\n\n## Recommended agent loop\n\n1. `sim_list_devices` once at start (or rely on auto-detect with a single booted device).\n2. `sim_screenshot` to see current state.\n3. Decide next action; call `sim_tap` / `sim_swipe` / `sim_open_url`.\n4. Wait a moment (animations), then go back to step 2.\n\n## Env\n\n| Var | Default | Purpose |\n| --- | --- | --- |\n| `SERVE_SIM_BIN` | `serve-sim` | Override path to the `serve-sim` binary (e.g. when using a local checkout) |\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}