Run your phone farm by talking to Claude
Paste one block of settings into Claude, and it can create phones, boot them, tap and scroll through apps on them, and shut them down. You describe the job in your own words; it does the clicking. Setup takes about five minutes and you only do it once.
That file contains this whole page plus the complete API reference. If you would rather not follow the steps below, download it, drop it into any AI assistant, and ask it to set everything up for you.
Before you start
You need the Claude desktop app, and Node.js 18 or newer on your computer. To check Node, open a terminal and run node --version. If it prints something below v18, or nothing at all, install it from nodejs.org first. There is nothing else to install — Claude fetches the DeviceFarm connector by itself the first time it runs.
Setup, step by step
- 1
Create an API key
Go to API keys in your dashboard, type any name, and click Create key. It appears once — copy it straight away. It looks like
df_live_a1b2c3… - 2
Open Claude's settings file
In the Claude desktop app, open Settings, go to the Developer tab and click Edit config. That opens a file called
claude_desktop_config.json. If you prefer opening it yourself, it lives here:macOS ~/Library/Application Support/Claude/claude_desktop_config.json Windows %APPDATA%\Claude\claude_desktop_config.json - 3
Paste this in, with your key
Replace everything in the file with the block below, then swap
df_live_…for the key you just copied. If the file already had other entries inmcpServers, keep them and add only the"devicefarm"block. Save the file.claude_desktop_config.json{ "mcpServers": { "devicefarm": { "command": "npx", "args": [ "-y", "--package=https://devicefarm.io/mcp/devicefarm-mcp-0.1.4.tgz", "devicefarm-mcp" ], "env": { "DEVICEFARM_API_KEY": "df_live_…" } } } }Your dashboard shows this same block with your key already filled in, right after you create it.
- 4
Restart Claude, and check
Quit Claude completely and reopen it — on macOS, closing the window is not enough. Then type this. If it answers with your phones, you are done.
List my DeviceFarm phones.
Using Claude Code instead?
One command replaces steps 2 to 4. Paste your key in place of the placeholder.
claude mcp add devicefarm \
--env DEVICEFARM_API_KEY=df_live_… \
-- npx -y --package=https://devicefarm.io/mcp/devicefarm-mcp-0.1.4.tgz devicefarm-mcpWhat to say
Plain sentences work. You do not need special wording, and you never write code.
List my DeviceFarm phones.Start my first phone, wait until it's running, install the automation
library on it, then open Settings and scroll through it like a person
would. Stop the phone when you're done.Create a phone called "worker-01" on a Samsung Galaxy A55 using this
proxy: socks5, host gate.myprovider.net, port 1080, user U, password P.
Then boot it and show me what's on screen.What Claude can do
list_phonesYour phones, with their id and current status.
create_phoneProvision a device with your proxy. Brand and model are required — pass proxy credentials inline, or the id of a proxy saved in the dashboard.
start_phoneBoot a device. Returns immediately; Claude polls until it is running.
stop_phoneShut it down and stop the per-minute billing. Safe to call twice.
prepare_phoneInstall the human-input library on a running phone, and mask the accessibility flag for the apps you are about to automate.
shellRun one command on the device. No ADB, nothing to store.
run_scriptRun a whole flow detached — no ten-second ceiling, and the phone shuts down by itself when the flow ends.
script_statusPoll a run's progress and output until it finishes.
delete_phoneRelease a phone for good and free its plan slot. Permanent, with no undo — Claude asks before using it.
The connector also carries the automation guide. Claude reads it before writing any script, which is why it drives the screen with synthetic touch events instead of input tap — the latter produces no kernel input events at all, and any app on the device can tell.
Two things that cost money
A running phone bills by the minute
Always end your request with "stop the phone when you're done". For anything long, ask Claude to run it as a script — those shut the device down by themselves the moment the flow ends. If a session is interrupted mid-run, check the dashboard and stop the phone there.
Deleting a phone is permanent
There is no undo — not here, and not from the dashboard button either. Claude asks before it deletes anything. A deleted phone frees its plan slot immediately, and the accounts you created on it stay in your dashboard.
If something does not work
The config was not picked up. Quit Claude completely and reopen it — closing the window is not enough on macOS. Then check the JSON is valid: a missing comma or brace makes Claude skip the whole file silently.
The key in the config is wrong, was revoked, or still contains the placeholder text. Create a fresh one and paste it in full — it starts with df_live_.
Node is missing or too old. Run node --version in a terminal; it must print v18 or higher. Install it from nodejs.org and restart Claude.
Commands and scripts only run on a phone that is already booted. Ask Claude to start it and wait until the status is running — booting takes tens of seconds.
A run was interrupted before it could shut the phone down. Stop it from the dashboard, and next time ask Claude to run the flow as a script — those shut the phone down on their own when they finish.
Still stuck? Message us on Telegram — send the error exactly as it appears.
What it cannot do
The connector is a thin adapter over our public API — it adds no privilege of its own. Every request carries your key and lands on the same checks your dashboard clicks go through.
It sees your account only
The connector holds your key and nothing else. Ask it about a phone that is not yours and the answer is "no such phone" — the same answer as for an id that never existed.
It cannot outgrow your plan
Ask for twenty phones on a plan that allows ten and it creates ten, then stops. The cap is enforced where the phone is created, not in the assistant.
It cannot spend minutes you have not bought
Every boot reserves runtime up front and carries an automatic shutdown deadline. With no minutes funded, the phone simply does not start.
The REST API underneath
Everything above is nine HTTPS endpoints and a bearer token. If you are wiring DeviceFarm into your own backend rather than into an assistant, go straight there.
Read the API reference