Documentation

Hosted remote MCP

Swipe Pilot MCP for agents

Connect an MCP-compatible agent to your workspace. It sees your iPhones, uploads slideshows, schedules posts, runs your scripts and sets up routines, then reads what went out. You allow it in your browser, and you can revoke it at any time.

Connect

Let your AI set it up for you

Copy one prompt containing the MCP URL, client setup commands, iPhone setup checklist, all 34 tools, and operating rules, then paste it into your AI.

Preview the full prompt (Claude Code)
Prompt for your AI
Set up and connect the **Swipe Pilot** MCP server so you can inspect and pilot my real iPhones, media, scripts, zones, routines, and posting queue.

## 1. Connection details
Target client selected by the user: Claude Code.
- **MCP Server URL (Streamable HTTP):** `https://swipepilot.app/mcp`
- **Server name:** `swipepilot`
- **REST API base (for large local uploads):** `https://swipepilot.app/api/v1`
- **Auth:** No live API key was embedded yet (placeholder: `YOUR_API_KEY`). If your client supports OAuth (Claude Code, Codex, ChatGPT, Claude app), connect with OAuth directly using the server URL. Otherwise, ask the user for a key created in Swipe Pilot › Settings › API & MCP (it starts with `sp_`).

Configure the `swipepilot` MCP server in your own environment now (using the matching method below, or tell me what UI step to click if your environment forbids editing config files automatically):

### Claude Code
- **With API key (no browser step):**
  `claude mcp add --transport http swipepilot https://swipepilot.app/mcp --header "Authorization: Bearer YOUR_API_KEY"`
- **With OAuth (recommended when no key is set):**
  `claude mcp add --transport http swipepilot https://swipepilot.app/mcp`
  Then inside Claude Code run `/mcp`, select `swipepilot`, and choose **Authenticate**.

### Codex
- **With OAuth:** `codex mcp add swipepilot --url https://swipepilot.app/mcp` then `codex mcp login swipepilot`
- **With API key (`~/.codex/config.toml`):** set `url = "https://swipepilot.app/mcp"` and `bearer_token_env_var = "SWIPE_PILOT_KEY"`

### Cursor / Windsurf / Antigravity / JSON config
Add `"swipepilot": { "type": "http", "url": "https://swipepilot.app/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } }` under `mcpServers`.

### ChatGPT / Claude app
- Add a custom remote MCP connector pointing to `https://swipepilot.app/mcp` with OAuth.

---

## 2. First check after connecting
As soon as the `swipepilot` MCP tools are available (restart/reload the MCP session if needed), run these read-only checks and report a concise status summary to me:
1. `list_iphones` — connected iPhones (`online`, `paused`, `canPost`, `openAccount`, `voiceMode`, `esp32Paired`, `companionBundleId`, `exitCountry`, `lastExit`, `accounts`).
2. `list_scripts` — workspace scripts (`tags`, `installedOn`, `upToDate`) and installed commands on each iPhone.
3. `list_zones` — calibrated screen packs and zone names/regions per iPhone.
4. `list_routines` — scheduled recurring posts and scripts.
5. `list_queue` — latest 50 tasks and their current states.

If any iPhone is missing, offline, or has `canPost: false`, walk me through finishing its setup using Section 3.

---

## 3. End-to-end iPhone & Swipe Pilot setup guide
Use this checklist when setting up a new iPhone or fixing an incomplete one (or call `setup_iphone({ action: "status" })` anytime to inspect every step):
1. **Mac & Companion app downloads + pairing:** Call `companion_download` (or `setup_iphone({ action: "status" })`) to get the latest HTTPS links for the unsigned iPhone companion (`SwipePilotCompanion.ipa` for sideloading via AltStore/Sideloadly/SideStore), the full Xcode project (`PhonePilotCompanion-Xcode.zip`), and `SwipePilot.zip` (macOS app), plus the USB `xcodebuild` + `ios install` commands. Call `setup_iphone({ action: "pair" })` to generate a 10-minute pairing code and QR URL (`https://swipepilot.app/pair?code=…`). If re-installing on an existing iPhone, use `setup_iphone({ action: "assign", iphone: "<duplicate>", target_iphone: "<existing>" })`.
2. **Name & configure each iPhone:** Call `configure_iphone` (with `name` or `auto_name: true` to assign distinct NATO phonetic names like `Alpha`, `Bravo`, `Charlie`), set `voice_locale`, `phone_language`, `exit_country`, `task_gap_minutes`, and `vc_during_runs`. Set iOS **Auto-Lock** to **Never**.
3. **First Voice Control script & shortcuts:** Call `setup_iphone({ action: "send_first_script", iphone })` to stage the bootstrap file, import it once in `Settings › Accessibility › Voice Control › Commands › Import Custom Commands`, then call `setup_iphone({ action: "confirm_first_script", iphone })`. Install the 3 Voice Control shortcuts (`VC ON`, `VC OFF`, `VC RESTART`) with `install_shortcuts({ iphone, shortcuts: ["on", "off", "restart"] })` (automated script for `on`/`off` once confirmed, or direct companion open with `mode: "open"` / for `VC RESTART`).
4. **Install the TikTok setup pack:** Call `setup_iphone({ action: "install_pack", iphone })` to apply the screen zones pack and install the setup scripts in a single bundle.
5. **Voice mode:** Check `voiceMode` from `list_iphones`. Available modes for `set_voice_mode`: `console` (browser console open with sound on), `phones` (an idle companion iPhone speaks for another), `esp32-pc` (browser console + USB ESP32 bridge), `esp32-phones` (each companion talks to its paired BLE ESP32 bridge; verify `esp32Paired: true`).
6. **Screens & zones calibration:** Call `list_zones`. Every touch block targets a zone name. Never guess coordinates if zones or screens are missing: ask the owner for screenshots (or capture them in Swipe Pilot for Mac › Screens & zones) and save them with `set_zone` using `0..1` screen fractions.
7. **Installing scripts:** Use `install_scripts` to batch up to 30 workspace scripts into a single Voice Control file (one iOS import confirmation instead of one per script). For full cleanup/reinstalls, install `Delete ALL Voice Control Scripts reimport EN` first so `reinstall_iphone` works.

---

## 4. Complete Swipe Pilot MCP tools reference (46 tools)
- **Workspace, Setup & Devices:** `list_iphones`, `configure_iphone({ iphone?, name?, auto_name?, voice_locale?, phone_language?, exit_country?, task_gap_minutes?, vc_during_runs?, companion_bundle_id?, post_command?, import_command?, bootstrap_confirmed?, paused? })`, `setup_iphone({ action, iphone?, target_iphone?, kind?, key? })`, `install_shortcuts({ iphone, shortcuts?, mode?, run?, key? })`, `daily_summary({ hours? })`, `companion_download`
- **Media, Posts & Queue:**
  - `upload_media({ url?, data_base64?, name?, mime? })` — up to 50 MB (JPEG, PNG, WebP, HEIC, MP4, MOV)
  - `upload_command` — generates `upload.sh` to upload large local files via `POST https://swipepilot.app/api/v1/assets` + `PUT` using `SWIPEPILOT_KEY`
  - `list_media({ kind?, name?, limit? })`
  - `queue_post({ media?, media_ids?, iphone?, account?, caption?, title?, script?, at?, key?, delete_after? })`
  - `list_queue({ iphone? })`
  - `cancel_task({ id, force? })`
- **Scripts & Zones:**
  - `list_scripts({ iphone? })`, `get_script({ script })`
  - `script_blocks({ kind? })` — returns block schemas, examples, and "Patterns that work"
  - `list_zones({ iphone? })`
  - `set_zone({ iphone, screen, name, region: { x0, y0, x1, y1 }, distribution? })`
- **Seeing the screen (needs Swipe Pilot for Mac open, iPhone on USB):**
  - `screenshot({ iphone, since?, image? })` — the screen read by the Mac with the Instruments screenshot service (no screen recording: safe while TikTok is open), with its text and a capture id
  - `find_zones({ iphone, targets, capture?, screen?, distribution? })` — the vision model proposes touch zones; with `screen` it saves them in the pack
  - `name_zones({ iphone, capture, without?, only?, screen?, prefix? })` — turns Voice Control's « Show names » labels into zones (build a routine from scratch: show names, screenshot, name_zones, tap a name, repeat)
  - `check_screen({ iphone, question?, options?, niche?, account?, expect_text?, since?, capture? })` — decides from the screen between two steps: popup, right account, did the tap change anything; with `niche` or `account` and no question, answers yes/no to « is this video in the niche? » (supervised warm-up)
  - `await_task({ task, timeout_seconds? })` — waits for a task to end before checking the screen
- **Memory:** `remember({ topic, note })`, `recall({ search? })` — what the agent learnt about each iPhone and app, kept between runs
- **Hands (inside TikTok/Instagram only Voice Control; outside, the keyboard):**
  - `install_tap_grid({ iphone })` — once per iPhone: ~300 one-tap Voice Control commands covering the screen
  - `tap_at({ iphone, x, y })` — taps a point at once with a real finger's gesture through the grid (safe in TikTok)
  - `say_command({ iphone, phrase })` — says one Voice Control command at once (« Open TikTok », « Go home », « Show names », an installed script's command)
  - `keyboard({ iphone, text? | key? })` — the Mac as Bluetooth keyboard with Full Keyboard Access, outside TikTok/Instagram only
  - `connect_esp32({ iphone, seconds?, status? })` — pairs the iPhone with the ESP32 bridge plugged into the Mac: the Mac sets the key and opens pairing, the owner taps the bridge in the iPhone's Settings › Bluetooth, the link is saved by itself
  - `create_script({ name, blocks, note?, tags? })`
  - `update_script({ script, name?, note?, tags?, add_tags?, blocks? })`
  - `delete_script({ script })`
  - `install_scripts({ iphone, scripts, reinstall?, confirm?, key? })`
  - `run_script({ iphone, script, at?, reinstall?, confirm?, key? })`
  - `reinstall_iphone({ iphone, confirm: true, update_import?, scripts?, add_scripts?, key? })`
- **Routines:** `list_routines({ iphone? })`, `create_routine({ name, first_at, iphone?, every_hours?, window_minutes?, media_ids?, caption?, title?, account?, script? })`, `update_routine({ id, ... })`, `delete_routine({ id })`
- **Accounts, Voice Control & Niches:**
  - `switch_account({ account, iphone?, at? })`
  - `set_open_account({ account, iphone? })`
  - `voice_control({ iphone, action, minutes? })` (`on` | `off` | `restart` | `bridge` | `session` | `session-end`: an ESP32 microphone session keeps Voice Control listening for step-by-step runs)
  - `set_voice_mode({ mode })` (`console` | `phones` | `esp32-pc` | `esp32-phones`)
  - `list_niches()`, `set_account_niche({ account, niche })`, `set_niche_keywords({ niche, keywords })`

---

## 5. Critical operating rules
1. **Always re-read state:** The owner also edits things in the web UI. Re-read `list_iphones`, `list_scripts`, and `list_queue` before acting and after any state-changing step.
2. **Posting & Drafts:** Pass `media` inline (`url` or `data_base64`) to `queue_post` for one-call upload, post, and auto-cleanup—or `media_ids` from `upload_media` / `upload_command`. To save a post as a TikTok draft, install `Post Tiktok v2 · Draft` first and pass `script: "Post Tiktok v2 · Draft"` to `queue_post`.
3. **Account switching:** Always queue/run `Account tiktok sync` (`run_script`) before `switch_account` so Swipe Pilot knows the live order of TikTok's account list. Use `set_open_account` only to fix a stale `openAccount` status in Swipe Pilot without running Voice Control.
4. **Writing & updating scripts:** Always call `script_blocks` and `list_zones` before `create_script` or `update_script`, and read all returned warnings. Installed copies on an iPhone do not update automatically after `update_script` or `set_zone`—pass `reinstall: true, confirm: true` to `run_script` or `install_scripts` (warning: this purges and re-imports all installed scripts on that iPhone in one file).
5. **Confirmations & troubleshooting:** A task marked `posted` or `done` means the iPhone returned to the companion and confirmed completion, not visual proof of TikTok's UI; ask the owner to check the screen when it matters. If `companionBundleId` is `null` in `list_iphones`, runs cannot return to confirm completion. If Voice Control stops hearing commands, call `voice_control` with `action: "restart"`.
  1. Pick your AI tool

    The steps below follow your choice.

  2. Add the Swipe Pilot server

    In a terminal:

    Terminal
    claude mcp add --transport http swipepilot https://swipepilot.app/mcp
  3. Open the MCP menu

    Start Claude Code, run /mcp, pick swipepilot and choose Authenticate.

    Claude Code
    /mcp
  4. Allow it

    Your browser opens Swipe Pilot. Sign in if it asks, read what the connection will be able to do, and click Allow.
  5. You're set

    Ready to use

    Try: “List my iPhones and their accounts.”

Prefer a key? Create one in Settings, then API & MCP, and add --header "Authorization: Bearer sp_your_key" to the command: there is no browser step then.

Available tools

ToolPurposeAccess
list_iphonesYour iPhones: online or paused, the country their traffic must leave from, their accountsRead
upload_mediaStores a photo or a video from a public https address or base64, and returns its idWrite
list_mediaThe photos and videos already uploaded, with their idsRead
queue_postQueues a post on an iPhone or for an account: media in slide order, caption, title, now or at a timeWrite
list_queueThe 50 latest tasks with their state: scheduled, running, posted, failed, to checkRead
cancel_taskCancels a task that has not startedWrite
list_scriptsYour scripts, and those installed on each iPhone with the command that runs themRead
run_scriptRuns a script on an iPhone, now or at a time, importing it first when it is not installedWrite
script_blocksHow to write a script: what each block does, its fields, an exampleRead
list_zonesThe zone names a touch block can aim at on each iPhoneRead
get_scriptReads a script's blocks, its revision and where it is installedRead
create_scriptCreates a script from blocks, checked by the editor's rulesWrite
update_scriptChanges a script's blocks, name or note; reinstall it to update the iPhonesWrite
delete_scriptDeletes a script from the workspaceWrite
list_routinesYour routines: what they run, where, their next run, how oftenRead
create_routineRepeats a post or a script every so many hours, each run at a random moment in its windowWrite
update_routinePauses, resumes, moves or changes a routineWrite
delete_routineDeletes a routineWrite
daily_summaryPosts each iPhone confirmed over the last hours, per account, failures and quiet iPhonesRead

Each tool's arguments, answers and limits are in the MCP tools reference.

What to ask

  • “List my iPhones and their accounts.”
  • “Upload these three images and post them on @mybrand tomorrow at 9:00 with this caption.”
  • “Run Morning scroll on every iPhone at 8:00, a few minutes apart.”
  • “Post this slideshow on @mybrand every day around 18:00, within a 45-minute window.”
  • “What did my iPhones post in the last 24 hours? Which one went quiet?”
  • “Pause the routines on Alpha until Monday.”

Your own files

upload_media takes a public https address, or the file in base64 for small ones. For large files on your computer, have the agent upload them with the REST API and pass the returned ids to queue_post. Files are 50 MB at most: JPEG, PNG, WebP, HEIC, MP4 or MOV.

When a post counts as done

Every post script ends with a double tap on the companion, after its Post step. When the iPhone confirms that end, the post shows as posted in list_queue and counts in daily_summary. Swipe Pilot never opens TikTok to check it.

An iPhone that had posts due and confirmed none for 18 hours is flagged as quiet in the summary: worth a look.

Security

Allowed in your browser. The connection uses OAuth with PKCE: you sign in to Swipe Pilot and click Allow. The code it gets lasts five minutes and works once.

A key you can revoke. What the agent receives is an API key named after it, listed in Settings, then API & MCP, with when it was last used. Revoke it there and the agent is cut off.

Limited on purpose. A connection reads your iPhones, accounts and scripts, uploads media, runs scripts, and manages the queue and routines. It cannot edit your scripts, change your plan or your settings, set up or purge an iPhone, or delete media.

Each workspace keeps at most ten keys, and requests are limited to 120 a minute.