{"id":51402934,"url":"https://github.com/testingbot/automation-mcp","last_synced_at":"2026-07-04T08:32:51.390Z","repository":{"id":362544004,"uuid":"1259645206","full_name":"testingbot/automation-mcp","owner":"testingbot","description":"Automation MCP","archived":false,"fork":false,"pushed_at":"2026-06-17T14:12:27.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T14:15:54.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testingbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T18:03:25.000Z","updated_at":"2026-06-17T12:58:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/testingbot/automation-mcp","commit_stats":null,"previous_names":["testingbot/automation-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testingbot/automation-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Fautomation-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Fautomation-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Fautomation-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Fautomation-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testingbot","download_url":"https://codeload.github.com/testingbot/automation-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Fautomation-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35115741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-04T08:32:50.876Z","updated_at":"2026-07-04T08:32:51.385Z","avatar_url":"https://github.com/testingbot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @testingbot/automation-mcp\n\nMCP server that lets AI agents drive remote browsers **and real iOS / Android devices** on [TestingBot](https://testingbot.com)'s grid. Real Safari on macOS, Edge on Windows, Firefox, Chrome on any supported OS, plus physical Appium devices — all from one install, no local browser, simulator, or Appium server required. Every session includes a live-view URL so a human can watch the agent drive in real time.\n\n\u003e **Status: alpha.** One install gets you both browser and mobile automation. Mobile is powered by the official [`appium-mcp`](https://github.com/appium/appium-mcp), spawned as a child process and proxied through this server — you never need to install or configure it yourself.\n\n## What's in the box\n\n### Browser automation\n\n| Tool | What it does |\n|---|---|\n| `tb_openBrowser` | Start a remote browser session on TestingBot via WebDriver. Returns a `sessionId` and a `liveViewUrl`. |\n| `tb_navigate` | Navigate to a URL. |\n| `tb_snapshot` | Structured page summary (title, headings, actionable elements, body text). |\n| `tb_screenshot` | PNG of the current page as a base64 image. |\n| `tb_click` | Click by CSS / xpath / id / name / tag / class / linkText / partialLinkText. |\n| `tb_type` | Type into an input (with optional clear / press-Enter). Same `by` strategies. |\n| `tb_getText` | Read the visible text of one element (cheap probe). |\n| `tb_getAttribute` | Read an attribute (`href`, `value`, `aria-label`, `data-*`, …). |\n| `tb_executeScript` | Run a JS snippet in the page. Escape hatch for anything not covered above. |\n| `tb_pressKey` | Press a key/chord on the focused element (`Enter`, `Tab`, `Control+A`, `Meta+Shift+Z`, …). |\n| `tb_closeBrowser` | Close a browser session. |\n| `tb_listSessions` | List active browser sessions managed here. |\n\nEvery active browser session has a built-in idle reaper (4 min default) and a session cap (5 default). Both are configurable via `AutomationOptions`.\n\n### Mobile (iOS / Android)\n\nThe full [`appium-mcp`](https://github.com/appium/appium-mcp) tool surface — ~30 `appium_*` tools including `appium_session_management`, `appium_gesture`, `appium_set_value`, `appium_screenshot`, `appium_find_element`, `appium_app_lifecycle`, `appium_perform_actions`, and more — is proxied straight through. The agent calls them by name; we forward each call to a bundled `appium-mcp` child process over MCP.\n\nWe pre-inject two things for every session-create call:\n\n- **`remoteServerUrl`** = the credentialed TestingBot Appium hub URL (`https://\u003ckey\u003e:\u003csecret\u003e@hub.testingbot.com/wd/hub`)\n- **`REMOTE_SERVER_URL_ALLOW_REGEX`** = a strict regex limiting connections to TestingBot's hub only\n\nSo the agent only needs to call `appium_session_management(action: \"create\", capabilities: { platformName: \"iOS\", ... })`. No URL, no credentials, no setup.\n\n\u003e Mobile tools won't appear if the bundled `appium-mcp` package fails to start (e.g. its native deps can't be loaded). Browser tools work independently.\n\n## Install\n\nOne MCP, two surfaces:\n\n```bash\nnpx @testingbot/automation-mcp\n```\n\nExample Claude Desktop config:\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"testingbot-automation\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@testingbot/automation-mcp\"],\n      \"env\": {\n        \"TESTINGBOT_KEY\": \"your-api-key\",\n        \"TESTINGBOT_SECRET\": \"your-api-secret\"\n      }\n    }\n  }\n}\n```\n\nThat's it. No second MCP, no extra env vars.\n\n\u003e **Heads-up on install size.** Bundling `appium-mcp` brings in its full mobile-driver stack — XCUITest, UiAutomator2, langchain, and a few hundred MB of dependencies. First `npm install` will take longer than a typical MCP server. The cost is paid once.\n\n## Composed as a library\n\nIf you're already running [`@testingbot/mcp-server`](https://github.com/testingbot/mcp-server) for resource management, the automation tools compose into the same server instance — no second MCP entry, no extra process. `@testingbot/mcp-server` does this automatically; the example below is for any other host MCP:\n\n```ts\nimport { addAutomationTools } from \"@testingbot/automation-mcp\";\n\nconst handle = await addAutomationTools(server, testingBotApi, config, {\n  idleTimeoutMs: 4 * 60 * 1000,  // optional, default\n  maxSessions: 5,                 // optional, default\n});\n\n// On shutdown, close any live sessions AND the bundled appium-mcp child:\nawait handle.shutdown();\n```\n\n`addAutomationTools` is async because it spawns and discovers tools from the bundled `appium-mcp` child. The host MUST `await` it before serving its first `tools/list` response, otherwise mobile tools won't be visible to the client.\n\nThe library entry expects the same `server.tool(name, desc, schema, handler)` duck-type used by `@testingbot/mcp-server`'s other tool families.\n\n## Live view (the killer feature)\n\nEvery `tb_openBrowser` response includes:\n\n```\n- **Live view** (open in a browser tab to watch): https://testingbot.com/tests/\u003csessionId\u003e/live?auth=\u003chash\u003e\n```\n\nClick that URL → you see the AI driving in real time. Works for any TestingBot session — Safari, Chrome, iOS, Android, etc. — same URL pattern: `https://testingbot.com/tests/\u003csessionId\u003e/live?auth=\u003cmd5(key:secret:sessionId)\u003e`.\n\nFor mobile sessions, ask the agent to surface the live-view URL after `appium_session_management` returns the sessionId.\n\n## Example prompts\n\n**Browser:**\n\n\u003e Open Safari 17 on macOS Sonoma on TestingBot. Go to news.ycombinator.com, get an ARIA snapshot, summarize the top 5 stories, then close the session.\n\n**Mobile (iOS simulator app):**\n\n\u003e Open an iPhone 15 Pro with iOS 17 on TestingBot, install the app at `tb://abc123`, tap the \"Sign in\" button, take a screenshot, then close the session.\n\n**Mobile (Android web):**\n\n\u003e Open Chrome on a Pixel 8 with Android 14 on TestingBot, browse to wikipedia.org, search for \"Appium\", take a screenshot, then close.\n\nBehind the scenes for mobile, the agent:\n\n1. Calls `appium_session_management({ action: \"create\", capabilities: { platformName: \"iOS\", \"appium:deviceName\": \"iPhone 15 Pro\", ... } })`. We inject the credentialed `remoteServerUrl` automatically.\n2. Uses `appium_gesture` / `appium_set_value` / `appium_screenshot` / `appium_find_element` / etc. to drive the device.\n3. Closes via `appium_session_management({ action: \"delete\", sessionId })`.\n\n## Caveats (read these)\n\n- **Sessions cost money.** Every minute a remote browser or device is alive consumes TestingBot test minutes. The idle reaper closes browser sessions at 4 min by default; for mobile, ask the agent to be explicit about closing.\n- **TestingBot kills sessions at ~5 min idle.** Our reaper closes browser sessions at 4 min so the close is clean instead of disconnect-on-next-call.\n- **WebDriver throughout.** Browser sessions use the same protocol TestingBot is native to, so Chrome, Edge, Safari, and Firefox all work without a per-browser code path. Mobile uses WebDriver too via Appium.\n- **Live view URL leaks an MD5 hash.** Don't paste it in public places — anyone with the URL can watch your session.\n- **Mobile traffic is locked to TestingBot's hub.** We set `REMOTE_SERVER_URL_ALLOW_REGEX` in the appium-mcp child's env to a strict regex; the child will refuse any `remoteServerUrl` pointing elsewhere, even if the agent supplies one.\n\n## Development\n\n```bash\nnpm ci\nnpm run dev          # watch mode\nnpm test             # vitest\nnpm run lint\nnpm run build        # lint + format:check + test + tsc\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Fautomation-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestingbot%2Fautomation-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Fautomation-mcp/lists"}