WebDriverIO MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server that enables AI assistants to interact with web browsers, local Electron applications,
and mobile applications using WebdriverIO. Automate Chrome, Firefox, Edge, Safari, Electron, iOS, and Android through a unified interface.
Installation
Add the following configuration to your MCP client settings:
**Standard config** (works in most clients):
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS),
%APPDATA%\Claude\claude_desktop_config.json (Windows), or ~/.config/Claude/claude_desktop_config.json (Linux):
Claude Code
Cline
Add to your VS Code settings.json or cline_mcp_settings.json file:
Cursor
Go to Cursor Settings → MCP → Add new MCP Server, or create .cursor/mcp.json:
Codex
Use the Codex CLI:
Or edit ~/.codex/config.toml:
Goose
Go to Advanced settings → Extensions → Add custom extension, or run:
Or edit ~/.config/goose/config.yaml:
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
Zed
Edit Zed settings (~/.config/zed/settings.json):
VS Code (Copilot)
----
> ⚠️ **Restart Required**: After adding the configuration, fully restart your MCP client to apply the changes.
Option 2: Global Installation
If you prefer to install globally:
Then use wdio-mcp as the command:
📖 **Need help?** Follow the MCP install guide.
HTTP Transport (for non-subprocess clients)
By default the server uses **stdio** (subprocess) transport. For clients that cannot launch subprocesses (e.g.
llama.cpp, OpenAI Codex secure mode), enable HTTP transport:
| Flag | Default | Description |
|--------------------|------------------------------------|---------------------------------------------------------|
| --http | — | Enable HTTP transport mode |
| --port | 3000 | Port to listen on |
| --allowedHosts | localhost,127.0.0.1,::1 | Allowed Host header values (DNS rebinding protection) |
| --allowedOrigins | _(none — browser clients blocked)_ | Allowed Origin values for CORS. Use * to allow all. |
Then point your MCP client at http://localhost:3000/mcp.
Prerequisites For Mobile App Automation
- **Appium Server**: Install globally with npm install -g appium
- **Platform Drivers**:
- iOS: appium driver install xcuitest (requires Xcode on macOS)
- Android: appium driver install uiautomator2 (requires Android Studio)
- **Devices/Emulators**:
- iOS Simulator (macOS) or physical device
- Android Emulator or physical device
- **For iOS Real Devices**: You'll need the device's UDID (Unique Device Identifier)
- **Find UDID on macOS**: Connect device → Open Finder → Select device → Click device name/model to reveal UDID
- **Find UDID on Windows**: Connect device → iTunes or Apple Devices app → Click device icon → Click "Serial Number"
to reveal UDID
- **Xcode method**: Window → Devices and Simulators → Select device → UDID shown as "Identifier"
Start the Appium server before using mobile features:
Cloud Providers
Run browser and mobile app tests on cloud real devices and browsers without any local setup. Currently supports
BrowserStack, Sauce Labs,
LambdaTest, TestingBot, and
Digital.ai Testing.
Prerequisites
Set your provider credentials as environment variables or in your MCP client config:
BrowserStack
Sauce Labs
| SAUCE_USERNAME | Sauce Labs username (required) |
| SAUCE_ACCESS_KEY | Sauce Labs access key (required) |
The data center is set per-session via the region parameter in start_session (defaults to eu-central-1).
LambdaTest (TestMu)
| TESTMU_USERNAME | LambdaTest username (required) |
| TESTMU_ACCESS_KEY | LambdaTest access key (required) |
TestingBot
| TESTINGBOT_KEY | TestingBot key (required) |
| TESTINGBOT_SECRET | TestingBot secret (required) |
Digital.ai Testing
| DIGITALAI_CLOUD_URL | Digital.ai cloud host, e.g. https://your-cloud.example.com (required) |
| DIGITALAI_ACCESS_KEY | Digital.ai access key (required) |
The access key is sent via the digitalai:options capability (mobile) or the flat digitalai:accessKey capability (web).
**Report pass/fail status:** WebdriverIO defaults to the BiDi protocol, over which Digital.ai's cloud cannot observe command failures — so reports default to "Passed". To make the cloud reflect actual pass/fail, opt in to classic WebDriver per session:
(Pure client-side assertion failures still report as "Passed" — only failures that reach the cloud as WebDriver command errors are detected.)
**Mobile (Appium):** configure your Digital.ai project for **Appium-server execution** and pick its default Appium version via the project's **"Manage default Appium server version"** setting — the version is chosen at the project level (and tracks the versions your cloud supports), so this MCP does not pin one. See Appium Server Test Execution.