MCP Mobile Automation Server
Enables AI assistants to execute mobile automation tests using Cucumber.js, including device management, test scenarios, and APK uploads.
README
MCP Mobile Automation Server
A Model Context Protocol (MCP) server that provides mobile automation testing capabilities through integration with Cucumber.js framework. This server exposes mobile testing tools to AI assistants, enabling automated testing of mobile applications.
🚀 Features
- Calculator App Testing - Execute comprehensive calculator functionality tests
- Device Management - Get information about available devices and configurations
- Test Execution - Run specific Cucumber scenarios with custom parameters
- APK Management - Upload APK files to BrowserStack for testing
- Multilingual Support - Demonstrate multilingual device parsing capabilities
- Project Status - Get current project configuration and status
📋 Available Tools
1. run_calculator_test
Execute calculator app tests using the Cucumber.js framework.
Parameters:
scenario(optional): Specific scenario to run (e.g., "Basic Calculator Addition")device(optional): Device to test on (e.g., "iPhone 12")os_version(optional): OS version (e.g., "14")
2. get_test_scenarios
Get a list of available test scenarios from feature files.
3. get_device_info
Get information about available devices and configurations.
4. execute_cucumber_scenario
Run a specific Cucumber scenario with custom parameters.
Parameters:
feature: Feature file name (e.g., "calculator.feature")scenario_name(optional): Specific scenario name to rundevice(optional): Device to test onplatform(optional): Platform to test on (iOS/Android)
5. upload_apk
Upload APK file to BrowserStack for testing.
Parameters:
apk_path: Path to APK file (relative to project root)
6. get_project_status
Get current status and configuration of the mobile automation project.
7. run_multilingual_demo
Execute multilingual device parsing demonstration.
Parameters:
language(optional): Language to demo (english/portuguese/spanish/all)
🛠 Installation
-
Clone the repository:
git clone <repository-url> cd mcp-cucumber-js-mobile-automation -
Install dependencies:
npm install -
Build the project:
npm run build
🔧 Configuration
Prerequisites
- Node.js 16 or higher
- TypeScript
- The parent Cucumber.js project: https://github.com/lucascortazz/cucumber-js-mobile-automation
Environment Variables
You can configure the MCP server using environment variables:
| Variable | Description | Default |
|---|---|---|
CUCUMBER_PROJECT_PATH |
Path to the parent cucumber-js-mobile-automation project | ../cucumber-js-mobile-automation |
Example:
# Set custom path to parent project
export CUCUMBER_PROJECT_PATH="/path/to/cucumber-js-mobile-automation"
npm start
Project Path Configuration
The MCP server automatically looks for the parent project in these locations:
- Environment variable:
CUCUMBER_PROJECT_PATH - Default relative path:
../cucumber-js-mobile-automation
If the parent project is not found, the server will display helpful error messages with setup instructions.
- TypeScript
- Access to the parent Cucumber.js mobile automation project at:
/Users/lucascortazzo/code/cucumber-js-mobile-automation
VS Code Integration
The server includes a VS Code MCP configuration file at .vscode/mcp.json. This allows you to debug and test the MCP server directly in VS Code.
Claude Desktop Integration
To use this server with Claude Desktop, add the following to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
{
"mcpServers": {
"mobile-automation": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-cucumber-js-mobile-automation/build/index.js"]
}
}
}
🚦 Usage
Running the Server
# Start the server
npm start
# Or run in development mode
npm run dev
Example Commands
Once connected to an MCP client (like Claude Desktop), you can use these commands:
- "Run calculator tests on iPhone 12"
- "Show me available test scenarios"
- "Execute the Basic Calculator Addition scenario"
- "Get device information"
- "Upload the Calculator.apk file"
- "Show project status"
- "Run multilingual demo in Portuguese"
🔗 Integration & Setup
This MCP server integrates with the Cucumber.js mobile automation framework available at: https://github.com/lucascortazz/cucumber-js-mobile-automation
📋 Complete Setup Guide
Follow these steps to set up both the parent project and this MCP server:
Step 1: Set Up the Parent Mobile Automation Project
-
Clone the parent project:
git clone https://github.com/lucascortazz/cucumber-js-mobile-automation.git cd cucumber-js-mobile-automation -
Install dependencies:
npm install -
Configure environment variables:
# Copy the example environment file cp .env.example .env # Edit .env with your BrowserStack credentials # BROWSERSTACK_USERNAME=your_username # BROWSERSTACK_ACCESS_KEY=your_access_key -
Test the setup:
npm test
Step 2: Set Up the MCP Server
-
Clone this MCP server project:
git clone https://github.com/lucascortazz/mcp-cucumber-js-mobile-automation.git cd mcp-cucumber-js-mobile-automation -
Install dependencies:
npm install -
Update the parent project path:
Edit
src/index.tsand update theCUCUMBER_PROJECT_PATHconstant:// Update this path to match your parent project location const CUCUMBER_PROJECT_PATH = "/your/path/to/cucumber-js-mobile-automation"; -
Build the MCP server:
npm run build
Step 3: Configure Claude Desktop
-
Install Claude Desktop from https://claude.ai/download
-
Configure MCP integration:
macOS: Edit
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: Edit%APPDATA%\Claude\claude_desktop_config.json{ "mcpServers": { "mobile-automation": { "command": "node", "args": ["/absolute/path/to/mcp-cucumber-js-mobile-automation/build/index.js"] } } } -
Restart Claude Desktop completely
Step 4: Test the Integration
- Start Claude Desktop and look for the MCP tools indicator
- Try these commands:
- "Show me available test scenarios"
- "Run calculator tests on iPhone 12"
- "Get device information"
- "What's the current project status?"
🔧 Project Structure Requirements
Your directory structure should look like this:
your-projects/
├── cucumber-js-mobile-automation/ # Parent project
│ ├── features/
│ │ ├── calculator.feature
│ │ └── openReminders.feature
│ ├── app/
│ │ └── Calculator.apk
│ ├── utils/
│ └── package.json
└── mcp-cucumber-js-mobile-automation/ # This MCP server
├── src/
│ └── index.ts
├── build/
└── package.json
🚀 Bridge Capabilities
The MCP server provides a bridge between MCP clients and the mobile automation testing capabilities, allowing AI assistants to:
- Execute mobile tests from the parent project
- Manage test scenarios dynamically
- Handle device configurations
- Process test results and provide insights
- Upload APK files to BrowserStack
- Run multilingual demos and parsing tests
📝 Development
Project Structure
mcp-cucumber-js-mobile-automation/
├── src/
│ └── index.ts # Main MCP server implementation
├── build/ # Compiled JavaScript output
├── .vscode/
│ └── mcp.json # VS Code MCP configuration
├── .github/
│ └── copilot-instructions.md
├── package.json
├── tsconfig.json
└── README.md
Scripts
npm run build- Compile TypeScript to JavaScriptnpm start- Start the MCP servernpm run dev- Build and start in development mode
Debugging
You can debug this MCP server using VS Code with the included MCP configuration. The server logs to stderr, so you can monitor its activity during development.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Build and test the server
- Submit a pull request
📄 License
This project is licensed under the ISC License.
Built with ❤️ using the Model Context Protocol SDK and TypeScript.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。