# Let AI assistants control your iPhone or iPad

> Turn on Settings › AI assistants in the Cloak Proxy app for iPhone and iPad, and Claude Code, Claude Desktop and other MCP clients on your network can read the traffic and use the API client, over HTTPS with a token.

Source: https://docs.subcloak.com/cloak-proxy/ipad/ai-assistants/

Claude Code, Claude Desktop and other MCP clients on your network can drive Cloak Proxy on your iPhone or iPad the way they drive it on a Mac: read the traffic, change tools and rules, and use the API client. Turn it on in **Settings › AI assistants**. It's off by default, and it works only while Cloak Proxy is on screen.

In version 1.1 of the iPhone and iPad app, the app serves MCP over **HTTPS**, with a certificate for its network addresses from its own certificate authority (the one it decrypts traffic with). The connection is encrypted, so the bearer token can't be read by anyone else on the Wi-Fi. Your assistant's computer has to trust that certificate authority once.

## Connect an assistant

1. On the iPhone or iPad, open **Settings › AI assistants** and turn on **Let AI assistants control this iPad** (**this iPhone** on iPhone).
2. Under **Security**, tap **Share certificate** and AirDrop **Cloak Proxy iPad CA.pem** to your Mac (the file has this name on iPhone too). It lands in **Downloads**.
3. On the Mac, check it's the device's certificate: `openssl x509 -in ~/Downloads/"Cloak Proxy iPad CA.pem" -noout -fingerprint -sha256` prints the same **SHA-256 fingerprint** the app shows.
4. Copy the setup for your assistant from **Connect an assistant** and run or paste it. For Claude Code, the first line adds the server and the second starts Claude Code trusting the certificate:

   ```sh
   claude mcp add --transport http cloak-ipad https://192.168.1.20:9092/mcp --header "Authorization: Bearer <token>"
   NODE_EXTRA_CA_CERTS="$HOME/Downloads/Cloak Proxy iPad CA.pem" claude
   ```

   To trust it every time, add `export NODE_EXTRA_CA_CERTS="$HOME/Downloads/Cloak Proxy iPad CA.pem"` to `~/.zshrc`. Claude Desktop's setup (through the `mcp-remote` bridge) sets `NODE_EXTRA_CA_CERTS` in its `env`; put your user name in the path.

The assistant gets the same tools as Cloak Proxy's [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) on a Mac, so prompts written for the Mac work here.

## Settings

| Setting | Default | What it does |
|---|---|---|
| **Use HTTPS** | On | Serves MCP over HTTPS with the device's certificate. Off serves plain HTTP, as version 1.0 did: the token then crosses the network in the clear, so anyone watching your Wi-Fi could read it and use it. Use plain HTTP only on a network you trust, for a client that can't be given a certificate. |
| **Certificate** | | The certificate authority the HTTPS certificate comes from, its SHA-256 fingerprint, **Share certificate** and **Copy PEM**. |

An assistant still set up for `http://` gets **This MCP server uses HTTPS. Change http:// to https:// in the assistant's settings.**, and the activity log shows **Refused a plain HTTP request: the assistant still uses http://**. Every request still needs the bearer token, and requests from web pages are refused.

> **Updating from version 1.0:**
> Version 1.0 served plain HTTP. After the update, the address starts with `https://`: copy the new setup into your assistant and share the certificate to its computer, or turn off **Use HTTPS** to keep the old setup working.

## Limits

- It works only while Cloak Proxy is on screen: iOS and iPadOS pause apps in the background, and the server stops with the app.
- Anyone with the token on your network can control Cloak Proxy on the device, so share it only with your own assistants.
- The app can't run stdio MCP servers for other apps, and there's no `cloakctl` on iPhone or iPad. On a Mac, see [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/).
