@testkase/device-farm-mcp
v0.5.1
Published
MCP server for TestKase DeviceFarm — devices, Automate runs, logs, artifacts, apps and tunnels for AI assistants.
Maintainers
Readme
Works with Claude, GitHub Copilot, Cursor and any MCP client. Pairs with @testkase/test-management-mcp for test cases, cycles and reports.
Quick start
- Get an access key: TestKase > API Keys > Create API Key (starts with
xyz_). - Add it to your assistant (Claude Desktop, Copilot, Cursor: same block in their MCP config file):
{
"mcpServers": {
"testkase-device-farm": {
"command": "npx",
"args": ["-y", "@testkase/device-farm-mcp"],
"env": { "TESTKASE_PAT_TOKEN": "xyz_your_token_here" }
}
}
}Claude Code:
claude mcp add testkase-device-farm -e TESTKASE_PAT_TOKEN=xyz_your_token_here -- npx -y @testkase/device-farm-mcp- Restart your assistant and ask: "Open saucedemo.com in Chrome and log in", "Why did my last run fail?", "Give me Appium settings for a Pixel 8".
Tools
Drive a device
| Tool | What it does |
|------|--------------|
| start_device | Open a phone (platform + an uploaded app or a url) or a browser (browser, os, version, optional url; tunnel: true reaches your localhost through Local Tunnel, on Windows browsers). Without a tunnel, local and private addresses (localhost, 10.x, 192.168.x, .local …) are refused; phones always refuse them. |
| wait_for_device | Keep waiting when start_device answered starting. |
| read_screen | The screen as a numbered list. |
| screenshot | A picture of the screen plus the list. |
| tap / type_text / swipe / press_key | Act on an item by its number (or an x,y point). |
| open_url / app | Go to a page; restart or bring back a phone app. |
| run_steps | Up to 10 actions in one call, plus wait_for some text. |
| end_device | Give the device back. |
Runs, apps and setup
| Tool | What it does |
|------|--------------|
| list_devices / get_device | The phone models and browsers on offer (names only). |
| list_runs / get_run / list_run_tests | Your Automate runs and their tests. |
| get_run_commands / get_run_logs / get_run_artifacts | A run's commands, logs, video and screenshots. |
| analyze_failure | Why a browser run failed, in one call. |
| stop_run | End a stuck browser run. |
| get_connection_config | Hub URL and capabilities for Selenium, Appium or Playwright. |
| list_apps / upload_app | Your app builds (.apk, .ipa, simulator .zip). |
| get_tunnel_status | Is your Local Tunnel connected? |
How driving works
- Every item on screen gets a number that stays while the item stays. The AI says "tap 5" instead of guessing positions.
- After an action, the answer lists only what changed (
new,gone,updated), not the whole screen. - Browsers: type drop-down choices, dates and colours as text (
2026-10-09,#1a2b3c). If a tap by number does nothing, tap itsx,y. - Limits: one device at a time; a session ends after about 3 minutes idle or 60 minutes in total.
Typed text can appear in the run's log and video. Use test accounts.
Your key and privacy
- The key stays on your machine and goes only to TestKase.
- It acts as you: it sees your own runs and apps; the device list is shared in your organisation. Tests you run use your minutes.
- Logs, errors and screenshots you ask about are passed to your AI assistant.
Settings
| Variable | Required | Default |
|----------|----------|---------|
| TESTKASE_PAT_TOKEN | Yes | |
| TESTKASE_HUB_URL | No | https://hub.testkase.com |
Troubleshooting
| Problem | Fix |
|---------|-----|
| "access key isn't valid or has expired" | Create a new key and update TESTKASE_PAT_TOKEN. |
| "TESTKASE_PAT_TOKEN is not set" | Add the env block, then restart your assistant. |
| Tools don't show up | Restart the assistant fully; check the JSON in your config. |
Links
TestKase · Docs · @testkase/test-management-mcp
MIT License
