
mcp perfecto appium converter
一个将Perfecto移动自动化脚本转换为Appium代码的工具,专为Claude Desktop集成设计。
Repository Info
About This Server
一个将Perfecto移动自动化脚本转换为Appium代码的工具,专为Claude Desktop集成设计。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Perfecto-to-Appium Converter
A Model Context Protocol (MCP) server that converts Perfecto mobile automation code to Appium code, designed for seamless integration with Claude Desktop.
Overview
This tool helps mobile automation testers and developers migrate their Perfecto Mobile test scripts to Appium. It automatically converts Perfecto-specific locators, gestures, and device interactions to Appium's equivalent implementations, saving hours of manual code conversion.
Features
- Convert Perfecto element locator strategies to Appium
- Transform Perfecto-specific gestures to Appium W3C Actions
- Support for both Android and iOS platforms
- Convert individual code snippets or entire files
- Validate if code is convertible before attempting conversion
Installation
Prerequisites
- Node.js 14.0.0 or higher
- npm or yarn
- Claude Desktop (for AI-assisted conversions)
Steps
-
Clone the repository
git clone https://github.com/yourusername/mcp-perfecto-appium-converter.git cd mcp-perfecto-appium-converter -
Install dependencies
npm install -
Make the CLI executable (Linux/macOS only)
chmod +x src/cli.js -
Link the package globally
npm link
Claude Desktop Integration
Setting Up Claude Desktop
- Download and install Claude Desktop from Anthropic's website
- Launch Claude Desktop on your computer
Configuring the MCP Server in Claude Desktop
- Open Claude Desktop
- Click the gear icon (⚙️) in the bottom-left corner to open Settings
- Navigate to Advanced → MCP Servers in the sidebar
- Click "Add MCP Server"
- Enter the following details:
- Name: MCP Perfecto-to-Appium Converter
- Command: The command to run your server. You have two options:
- If installed via npm globally:
mcp-perfecto-appium-converter - If running from local directory: Full path to
src/cli.js(e.g.,/path/to/mcp-perfecto-appium-converter/src/cli.jsorC:\path\to\mcp-perfecto-appium-converter\src\cli.js)
- If installed via npm globally:
- Click "Save"
- Verify the connection status shows "Connected" in green
Alternative: Import Configuration
You can also import a pre-configured settings file:
-
Create a configuration file named
claude-desktop-config.json:{ "mcpServers": { "mcp-perfecto-appium-converter": { "command": "npx", "disabled": false, "args": ["mcp-perfecto-appium-converter"], "autoApprove": [], "timeout": 300, "transportType": "stdio" } } } -
In Claude Desktop's MCP Servers settings, click "Import Configuration"
-
Select the
claude-desktop-config.jsonfile
Using the Converter with Claude
Once the MCP server is connected to Claude Desktop, you can ask Claude to convert Perfecto code to Appium using natural language:
Example Prompts
Basic Code Conversion
Convert this Perfecto code to Appium:
driver.findElement(PerfectoMobileBy.id("login-button")).click();
driver.executeScript("mobile:application:open", "{'name':'Calculator'}");
Platform-Specific Conversion
Convert this Perfecto code to Appium for iOS:
driver.findElement(PerfectoMobileBy.accessibilityId("sign-in")).click();
driver.executeScript("mobile:application:open", "{'name':'Settings'}");
File Conversion
I've uploaded a Perfecto test file. Please convert it to Appium code for Android.
Learning About Differences
What's the difference between how Perfecto and Appium handle gestures like swipe and tap?
Standalone Usage
You can also use the converter without Claude Desktop:
-
Start the server
mcp-perfecto-appium-converter -
Use the provided API endpoints to convert code
# Example using curl curl -X POST http://localhost:8000/tools/convertCode \ -H "Content-Type: application/json" \ -d '{"code": "driver.findElement(PerfectoMobileBy.id(\"login-button\")).click();", "platform": "android"}'# Example using curl curl -X POST http://localhost:8000/tools/convertCode \ -H "Content-Type: application/json" \ -d '{"code": "driver.executeScript(\"mobile:touch:tap\", {location: \"50%,50%\"});", "platform": "android"}'
Supported Conversions
Element Locators
PerfectoMobileBy.id→By.idPerfectoMobileBy.accessibilityId→AppiumBy.accessibilityIdPerfectoMobileBy.xpath→By.xpathPerfectoMobileBy.className→By.className
Gestures
mobile:touch:tap→mobile: longClickGestureormobile: tapGesturemobile:touch:swipe→mobile: swipeGesture
Application Management
mobile:application:open→mobile: shell(Android) ormobile: launchApp(iOS)mobile:application:close→terminateAppmobile:application:install→installApp
Troubleshooting
Connection Issues
- Status shows "Disconnected":
- Ensure the command path is correct
- Check if another instance of the server is already running
- Try restarting Claude Desktop
Conversion Errors
-
Claude doesn't recognize code as Perfecto:
- Make sure the code follows standard Perfecto syntax
- Try using more explicit prompting
-
Server doesn't start:
- Check Node.js version (
node -v) - Ensure all required files are present in the project structure
- Check Node.js version (
License
MIT
Contact & Contribution
- Report issues on GitHub
- Pull requests are welcome
- For major changes, please open an issue first to discuss what you would like to change
Acknowledgments
- Inspired by the transition needs of mobile automation testers moving from Perfecto to Appium
- Special thanks to saikrishna321 and SrinivasanTarget for their inspiring work and contributions in the mobile automation space to Appium
Note: This project is not officially affiliated with Perfecto Mobile or Appium.
Quick Start
Clone the repository
git clone https://github.com/lambdapro/mcp-perfecto-appium-converterInstall dependencies
cd mcp-perfecto-appium-converter
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.