Invi Labs iPhone MCP

托管式 MCP 服务器,让 AI 智能体能够操控真实 iPhone。它可以截屏、点击、滑动、输入文字、打开应用,并使用自有模型读取屏幕内容。

托管 MCP 服务器

npx add-mcp 'https://api.invilabs.io/mcp'

可安装到 Claude Code、Codex、Cursor 等客户端

文档

Invi Labs for developers and AI agents

Control real iPhones from your AI agent or your Python code. Both work with phones connected by Invi Dongle, phones linked with Invi Link, and hosted rentals.

Hosted MCP server

Address: https://api.invilabs.io/mcp. Every request sends your API key as Authorization: Bearer YOUR_API_KEY. The server has no AI of its own and never spends AI credits: your agent reads the screenshots with its own model and decides where to tap.

Claude Code

claude mcp add --transport http --scope user invilabs https://api.invilabs.io/mcp --header "Authorization: Bearer YOUR_API_KEY"

Cursor, Windsurf and Gemini CLI

Add to ~/.cursor/mcp.json (Cursor, field url), ~/.codeium/windsurf/mcp_config.json (Windsurf, field serverUrl) or ~/.gemini/settings.json (Gemini CLI, field httpUrl):

{
  "mcpServers": {
    "invilabs": {
      "url": "https://api.invilabs.io/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Codex

Add to ~/.codex/config.toml:

[mcp_servers.invilabs]
url = "https://api.invilabs.io/mcp"
http_headers = { Authorization = "Bearer YOUR_API_KEY" }
tool_timeout_sec = 300

Limit phones and tools

  • ?phone=SE001 — only this phone (repeat for more).
  • ?read_only=1 — only tools that change nothing.
  • ?tools=phone_*,devices — only matching tools.
  • ?exclude_tools=jb_* — hide tools.

API keys

In the dashboard (https://panel.invilabs.io), open Resources → AI agents (MCP). It creates a key with the right permission (device.control; add device.edit_proxy to let the agent change proxy and VPN settings) and gives a ready-to-paste setup for your app.

Python SDK

pip install invilabs
from invilabs import Client

client = Client("YOUR_API_KEY")
for device in client.devices():
    print(device["id"], device["name"], device["device_type"])

phone = client.phone("SE001")  # the phone's code from the dashboard
print(phone.details()["online"])
phone.type("hello from Python")
phone.press("enter")

Documentation: https://sdk.invilabs.io · MCP guide: https://sdk.invilabs.io/guides/iphone-ai-agent-mcp/ · Quickstart: https://sdk.invilabs.io/quickstart/