Control a real USB-connected iPhone from Linux (no Mac, no paid developer account) and expose it to AI agents as MCP tools
Rust ai-agentautomationclaudeclaude-codedockeriosiphonelinuxmcpmcp-servermodel-context-protocolrustwebdriveragent
release: 0.2.4 (#87)
Qinghe Lic0259b21ae09
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d272d8d..1d7a8f9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,13 @@ All notable changes to this project are documented here. The format is based on## [Unreleased]+## [0.2.4] - 2026-11-14++### Upgrade notes++- The control page (`iphone-control viewer`) and its `/mcp` now need a login, on this machine too. After upgrading, run `iphone-control viewer token` and open the link it prints; a browser stays logged in for 30 days. MCP clients connected to `/mcp` over HTTP need `Authorization: Bearer <token>` (`viewer token` prints the `claude mcp add` line). The CLI, `iphone-control mcp` over stdio and `task run` are unaffected.+- With `--lan` (`IPHONE_CONTROL_VIEWER_LAN=1`) the page is HTTPS on the local network: open `https://<address>:<port>/` and check the certificate's fingerprint the first time (`iphone-control service status`).+### Added- `iphone-control mcp --url https://<that machine>:8200` bridges stdio to another machine's viewer `/mcp`, so an MCP client that only starts a command can control the phone connected there. With a task's token only that is sent, otherwise the login from `IPHONE_CONTROL_VIEWER_TOKEN`; a command under `task run --url` has `IPHONE_CONTROL_URL` set, so a plain `iphone-control mcp` in it bridges by itself.@@ -271,7 +278,8 @@ First public release.- Docker image (single binary plus Debian's usbmuxd, not privileged) with a generated third-party license list, published to `ghcr.io/derrors/iphone-control` for linux/amd64 and linux/arm64.- Running without Docker, from source or from the prebuilt Linux binaries (x86_64, aarch64): as a regular user with the system usbmuxd, XDG data and socket paths, the unsigned WebDriverAgent downloaded and checksum-verified before the first signing, `mcp-config` printing a direct command, and a systemd user service.-[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.2.3...HEAD+[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.2.4...HEAD+[0.2.4]: https://github.com/Derrors/iphone-control/compare/v0.2.3...v0.2.4[0.2.3]: https://github.com/Derrors/iphone-control/compare/v0.2.2...v0.2.3[0.2.2]: https://github.com/Derrors/iphone-control/compare/v0.2.1...v0.2.2[0.2.1]: https://github.com/Derrors/iphone-control/compare/v0.2.0...v0.2.1diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.mdindex f901451..8bd2b4c 100644--- a/CHANGELOG.zh-CN.md+++ b/CHANGELOG.zh-CN.md@@ -6,6 +6,13 @@## [Unreleased]+## [0.2.4] - 2026-11-14++### 升级注意事项++- 控制台(`iphone-control viewer`)和它的 `/mcp` 现在要登录,本机也一样。升级后运行 `iphone-control viewer token`,点开它打印的链接;浏览器登录一次记住 30 天。经 HTTP 接入 `/mcp` 的 MCP 客户端要带 `Authorization: Bearer <令牌>`(`viewer token` 会打印 `claude mcp add` 命令)。命令行、stdio 方式的 `iphone-control mcp` 和 `task run` 不受影响。+- 开了 `--lan`(`IPHONE_CONTROL_VIEWER_LAN=1`)时,局域网里用 HTTPS:打开 `https://<地址>:<端口>/`,第一次核对证书指纹(`iphone-control service status` 显示)。+### 新增- `iphone-control mcp --url https://<那台机器>:8200`:把 stdio 转到另一台机器控制台的 `/mcp`,只能填命令的 MCP 客户端也能操作接在那台机器上的手机。有任务口令就只带它,否则用 `IPHONE_CONTROL_VIEWER_TOKEN` 登录;`task run --url` 启动的命令已经设好 `IPHONE_CONTROL_URL`,里面照常配置的 `iphone-control mcp` 自动转接。@@ -269,7 +276,8 @@- `setup`、`doctor`、`status`、`mcp-config`、`wda-bridge`、`notify-test` 命令。- Docker 镜像(非 privileged,linux/amd64、linux/arm64);也可不用 Docker,从源码或预编译二进制以普通用户运行,附 systemd 用户服务。-[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.2.3...HEAD+[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.2.4...HEAD+[0.2.4]: https://github.com/Derrors/iphone-control/compare/v0.2.3...v0.2.4[0.2.3]: https://github.com/Derrors/iphone-control/compare/v0.2.2...v0.2.3[0.2.2]: https://github.com/Derrors/iphone-control/compare/v0.2.1...v0.2.2[0.2.1]: https://github.com/Derrors/iphone-control/compare/v0.2.0...v0.2.1diff --git a/Cargo.lock b/Cargo.lockindex 99d67a3..ab08ea2 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1956,7 +1956,7 @@ dependencies = [[[package]]name = "ictl-daemon"-version = "0.2.3"+version = "0.2.4"dependencies = ["anyhow","base64 0.23.1",@@ -1980,7 +1980,7 @@ dependencies = [[[package]]name = "ictl-device"-version = "0.2.3"+version = "0.2.4"dependencies = ["ictl-l10n","ictl-webinspector",@@ -1996,14 +1996,14 @@ dependencies = [[[package]]name = "ictl-l10n"-version = "0.2.3"+version = "0.2.4"dependencies = ["tokio",][[package]]name = "ictl-mcp"-version = "0.2.3"+version = "0.2.4"dependencies = ["anyhow","http",@@ -2016,7 +2016,7 @@ dependencies = [[[package]]name = "ictl-protocol"-version = "0.2.3"+version = "0.2.4"dependencies = ["ictl-l10n","libc",@@ -2027,7 +2027,7 @@ dependencies = [[[package]]name = "ictl-sign"-version = "0.2.3"+version = "0.2.4"dependencies = ["ictl-l10n","plist",@@ -2043,7 +2043,7 @@ dependencies = [[[package]]name = "ictl-unlock"-version = "0.2.3"+version = "0.2.4"dependencies = ["ictl-l10n","ictl-wda",@@ -2056,7 +2056,7 @@ dependencies = [[[package]]name = "ictl-wda"-version = "0.2.3"+version = "0.2.4"dependencies = ["base64 0.23.1","ictl-device",@@ -2072,7 +2072,7 @@ dependencies = [[[package]]name = "ictl-webinspector"-version = "0.2.3"+version = "0.2.4"dependencies = ["idevice","plist",@@ -2282,7 +2282,7 @@ dependencies = [[[package]]name = "iphone-control"-version = "0.2.3"+version = "0.2.4"dependencies = ["anyhow","bytes",diff --git a/Cargo.toml b/Cargo.tomlindex ea6ad61..af81164 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -17,7 +17,7 @@ members = [exclude = ["vendor"][workspace.package]-version = "0.2.3"+version = "0.2.4"edition = "2024"# rmcp 3.8 要求 1.88;Impactor/idevice 用 edition 2024rust-version = "1.88"