
WebDriverIO MCP Server
Drive Chrome, Firefox, Edge, Safari and iOS/Android apps with WebDriverIO, locally or on cloud devices.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @wdio/mcp@latestPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"webdriverio-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wdio/mcp@latest"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js with npx (the server runs via `npx -y @wdio/mcp@latest`)
- A supported browser installed for web automation (Chrome, Firefox, Edge, or Safari; Safari requires macOS)
- For mobile automation: Appium server (`npm install -g appium`) plus platform drivers (xcuitest for iOS, uiautomator2 for Android) and a running emulator/simulator or connected device
- iOS automation requires macOS with Xcode; Android requires Android Studio
- Optional cloud testing requires provider credentials (BrowserStack, Sauce Labs, LambdaTest, TestingBot, or Digital.ai)
About WebDriverIO MCP Server
A Model Context Protocol server from the WebDriverIO project that gives AI assistants a unified interface to automate web browsers (Chrome, Firefox, Edge, Safari) and native mobile apps (iOS/Android via Appium). It supports local execution as well as cloud real devices and browsers on BrowserStack, Sauce Labs, LambdaTest, TestingBot and Digital.ai. The server records every tool call and can export the session as runnable WebdriverIO JavaScript, and it exposes session state (elements, accessibility tree, screenshots, cookies, tabs, logs, generated code) through read-only MCP resources.
Tools & capabilities (30)
start_sessionStart a browser or app session. Use platform: 'browser' for web, platform: 'ios'/'android' for mobile, or attach: true to connect to a running Chrome instance.
launch_chromeLaunch a new Chrome instance with remote debugging enabled, for use with start_session({ attach: true }).
close_sessionClose or detach from the current session (supports detach: true to disconnect without terminating).
emulate_deviceEmulate a mobile/tablet device preset (viewport, DPR, UA, touch); requires a BiDi session.
open_web_extensionInstall a web extension through WebDriver BiDi and open one of its extension pages so normal page tools can drive its UI.
navigateNavigate to a URL.
get_elementsGet visible, interactable elements on the page. Supports inViewportOnly (default true) and includeContainers (default false) to include layout containers on mobile.
get_accessibility_treeGet the page accessibility tree with roles, names, and selectors. Supports filtering by role and pagination. Browser-only.
get_screenshotTake a screenshot of the current page or screen (base64-encoded, auto-resized to max 2000px / 1MB).
get_tabsList all open browser tabs with handle, title, URL, and active status. Browser-only.
scrollScroll in a direction (up/down) by a specified number of pixels. Browser-only.
execute_scriptExecute arbitrary JavaScript in the browser, or Appium mobile commands on devices.
switch_tabSwitch to a different browser tab by handle or 0-based index. Browser-only.
switch_frameSwitch into an iframe by CSS/XPath selector, or back to the top-level frame if no selector is given. Browser-only.
click_elementClick an element.
set_valueType text into input fields.
get_cookiesGet all cookies for the current session, or a single cookie by name.
set_cookieSet a cookie with name, value, and optional attributes.
delete_cookiesDelete all cookies or a specific cookie.
tap_elementTap an element by selector or coordinates (mobile).
swipeSwipe in a direction (up/down/left/right) (mobile).
drag_and_dropDrag from one location to another (mobile).
get_contextsList available automation contexts (NATIVE_APP, WEBVIEW_*) and the currently active one.
switch_contextSwitch between native and webview contexts.
get_app_stateGet the current lifecycle state of a mobile app (not installed / not running / background / foreground).
rotate_deviceRotate the device to portrait or landscape.
hide_keyboardHide the on-screen keyboard.
set_geolocationSet device GPS location.
upload_appUpload a local .apk or .ipa to a cloud provider; returns an app URL/reference. Requires a provider parameter.
list_appsList apps previously uploaded to a cloud provider's app storage. Requires a provider parameter.
What this server can do
WebDriverIO MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Let an AI agent run end-to-end web tests across Chrome, Firefox, Edge and Safari, then export the run as runnable WebdriverIO JavaScript
- Automate and test native iOS and Android apps (including hybrid apps with native/webview context switching) via Appium
- Attach to an already-running Chrome instance to test authenticated or pre-configured sessions
- Run browser and mobile tests on cloud real devices via BrowserStack, Sauce Labs, LambdaTest, TestingBot or Digital.ai without local setup
- Inspect pages via accessibility tree, visible elements and screenshots so an assistant can reason about and drive a UI
Security notes
Cloud-provider testing requires provider credentials (e.g. BROWSERSTACK_USERNAME / BROWSERSTACK_ACCESS_KEY, SAUCE_USERNAME / SAUCE_ACCESS_KEY) set as environment variables or in the MCP client config. The server can execute arbitrary JavaScript via execute_script and drive browsers/devices, so run it only against targets you trust. HTTP transport mode includes DNS-rebinding protection via --allowedHosts and blocks browser clients unless --allowedOrigins is set.
WebDriverIO MCP Server FAQ
Do I need cloud credentials to use it?
No. Local browser and mobile automation work without any credentials. Provider credentials (e.g. BROWSERSTACK_USERNAME / BROWSERSTACK_ACCESS_KEY) are only needed when running tests on cloud real devices via BrowserStack, Sauce Labs, LambdaTest, TestingBot or Digital.ai.
What's required for mobile app automation?
An Appium server (`npm install -g appium`) plus the platform driver (xcuitest for iOS, uiautomator2 for Android), and a running emulator/simulator or connected device. iOS requires macOS with Xcode; Android requires Android Studio. Start the Appium server before launching mobile sessions.
Can it run without launching a subprocess?
Yes. By default it uses stdio (subprocess) transport, but for clients that cannot spawn subprocesses you can enable HTTP transport with `npx @wdio/mcp --http --port 3000` and point the client at http://localhost:3000/mcp.
Can multiple sessions run at once?
No. Only one session (browser OR app) can be active at a time. To switch between browser and mobile, close the current session first.
Can I export the automation as code?
Yes. Every tool call is recorded, and the wdio://session/current/code (and per-session) MCP resources return a standalone runnable WebdriverIO JavaScript file reconstructing the session, including capabilities, navigation, clicks and inputs.
Alternatives to WebDriverIO MCP Server
Compare all alternatives →Automate your existing browser with AI using your real profile, logged-in sessions, and stealth fingerprint.
All-in-one web access MCP — Web Unlocker, SERP, Scraper API, and a cloud Scraping Browser.
macOS screen capture, AI visual analysis, and full GUI automation for AI agents.
Compare WebDriverIO MCP Server with: