This guide provides detailed instructions for configuring the CulebraTester2 MCP server with Kiro.
- Overview
- Configuration File Locations
- Basic Configuration
- Configuration Options
- Environment Variables
- Auto-Approve Settings
- Debug Logging
- Complete Examples
- Troubleshooting
The CulebraTester2 MCP server integrates with Kiro (IDE or CLI) through MCP (Model Context Protocol) configuration files. These JSON files tell Kiro how to start and communicate with the MCP server.
Location: .kiro/settings/mcp.json (in your project workspace)
Use when:
- Working on a specific project
- Want different settings per project
- Developing or testing the MCP server itself
Scope: Only active when the workspace is open
Location: ~/.kiro/settings/mcp.json (in your home directory)
Use when:
- Using
kiro-cli(command-line interface) - Want the MCP server available across all projects
- Using the installed package globally
Scope: Active everywhere, across all workspaces
When both exist, workspace-level settings override user-level settings for that workspace.
For kiro-cli or global use after installing via pip:
{
"mcpServers": {
"culebratester2-mcp": {
"command": "culebra-mcp",
"args": []
}
}
}This assumes:
- AndroidViewClient is installed via
pip install androidviewclient - CulebraTester2 is running on
http://localhost:9987(default) - Default timeout of 30 seconds
For development or when working in the AndroidViewClient repository:
{
"mcpServers": {
"culebratester2-mcp": {
"command": "python3",
"args": ["-m", "com.dtmilano.android.mcp.server"],
"env": {
"ANDROID_VIEW_CLIENT_HOME": "${workspaceFolder}",
"PYTHONPATH": "${workspaceFolder}/src"
}
}
}
}{
"mcpServers": {
"culebratester2-mcp": { // ← This is the server name
...
}
}
}The server name (culebratester2-mcp) is how you reference this MCP server in Kiro. You can change it, but keep it descriptive.
Option 1: Using the installed command-line tool
{
"command": "culebra-mcp",
"args": []
}Option 2: Using Python module directly
{
"command": "python3",
"args": ["-m", "com.dtmilano.android.mcp.server"]
}Option 3: Using absolute path to script
{
"command": "/path/to/AndroidViewClient/tools/culebra-mcp",
"args": []
}Temporarily disable the server without removing the configuration:
{
"disabled": true // Set to false or remove to enable
}All environment variables are optional and have sensible defaults.
Purpose: URL where CulebraTester2 service is running
Default: http://localhost:9987
Examples:
{
"env": {
"CULEBRATESTER2_URL": "http://localhost:9987"
}
}{
"env": {
"CULEBRATESTER2_URL": "http://192.168.1.100:9987"
}
}Purpose: HTTP request timeout in seconds
Default: 30
Example:
{
"env": {
"CULEBRATESTER2_TIMEOUT": "60"
}
}Purpose: Enable debug logging for troubleshooting
Default: 0 (disabled)
Values: 1, true, yes (enable) or 0, false, no (disable)
Example:
{
"env": {
"CULEBRATESTER2_DEBUG": "1"
}
}Debug output includes:
- Server startup information
- Connection validation details
- Tool call parameters and results
- Error details and stack traces
Purpose: Path to AndroidViewClient repository (for development)
Required: Only when running from source (not installed package)
Example:
{
"env": {
"ANDROID_VIEW_CLIENT_HOME": "${workspaceFolder}"
}
}Purpose: Add source directory to Python path (for development)
Required: Only when running from source (not installed package)
Example:
{
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
}
}The autoApprove list specifies which tools can run without user confirmation. This is useful for read-only operations that are safe to execute automatically.
{
"autoApprove": [
"getDeviceInfo",
"dumpUiHierarchy",
"takeScreenshot",
"getCurrentPackage"
]
}You can auto-approve any of these 20 tools:
Device Information:
getDeviceInfo- Get screen dimensionsgetCurrentPackage- Get current app package name
UI Inspection:
dumpUiHierarchy- Get UI element treetakeScreenshot- Capture screen image
Element Finding:
findElementByText- Find element by textfindElementByResourceId- Find element by resource ID
Element Interaction:
clickElement- Click on elementlongClickElement- Long click on elemententerText- Enter text into elementclearText- Clear text from element
Coordinate-Based Interaction:
clickAtCoordinates- Click at X,Y positionlongClickAtCoordinates- Long click at X,Y positionswipeGesture- Swipe from one point to another
Hardware Keys:
pressBack- Press BACK buttonpressHome- Press HOME buttonpressRecentApps- Press Recent Apps button
App Management:
startApp- Launch an applicationforceStopApp- Force stop an application
Device Power:
wakeDevice- Turn screen onsleepDevice- Turn screen off
Safe to auto-approve (read-only):
getDeviceInfodumpUiHierarchytakeScreenshotgetCurrentPackage
Use caution (modifies device state):
- All click/tap operations
- Text entry operations
- App launching/stopping
- Hardware key presses
Recommendation: Only auto-approve tools you trust and understand.
Add to your configuration:
{
"env": {
"CULEBRATESTER2_DEBUG": "1"
}
}Logs are written to stderr and include:
[2025-12-20 16:24:39,576] INFO [culebratester2-mcp] Starting CulebraTester2 MCP Server
[2025-12-20 16:24:39,576] INFO [culebratester2-mcp] Base URL: http://localhost:9987
[2025-12-20 16:24:39,576] INFO [culebratester2-mcp] Timeout: 30s
[2025-12-20 16:24:39,576] INFO [culebratester2-mcp] Debug mode: True
[2025-12-20 16:24:39,624] INFO [culebratester2-mcp] Connected to CulebraTester2 at http://localhost:9987
[2025-12-20 16:24:39,624] INFO [culebratester2-mcp] Version: 2.0.75-alpha (code: 20075)
[2025-12-20 16:24:39,624] INFO [culebratester2-mcp] MCP server ready, starting event loop...
In Kiro IDE:
- Open the MCP Server panel
- View logs in the server output
With kiro-cli:
- Logs appear in the terminal where you run
kiro-cli
File: ~/.kiro/settings/mcp.json
{
"mcpServers": {
"culebratester2-mcp": {
"command": "culebra-mcp",
"args": [],
"env": {
"CULEBRATESTER2_URL": "http://localhost:9987",
"CULEBRATESTER2_TIMEOUT": "30"
},
"disabled": false,
"autoApprove": [
"getDeviceInfo",
"dumpUiHierarchy",
"takeScreenshot",
"getCurrentPackage"
]
}
}
}Use case: Daily use with kiro-cli for Android automation
File: .kiro/settings/mcp.json (in AndroidViewClient workspace)
{
"mcpServers": {
"culebratester2-mcp": {
"command": "python3",
"args": ["-m", "com.dtmilano.android.mcp.server"],
"env": {
"ANDROID_VIEW_CLIENT_HOME": "${workspaceFolder}",
"PYTHONPATH": "${workspaceFolder}/src",
"CULEBRATESTER2_URL": "http://localhost:9987",
"CULEBRATESTER2_TIMEOUT": "30",
"CULEBRATESTER2_DEBUG": "1"
},
"disabled": false,
"autoApprove": [
"getDeviceInfo",
"dumpUiHierarchy",
"getCurrentPackage"
]
}
}
}Use case: Developing or debugging the MCP server itself
File: ~/.kiro/settings/mcp.json
{
"mcpServers": {
"culebratester2-mcp": {
"command": "culebra-mcp",
"args": [],
"env": {
"CULEBRATESTER2_URL": "http://192.168.1.100:9987",
"CULEBRATESTER2_TIMEOUT": "60"
},
"disabled": false,
"autoApprove": [
"getDeviceInfo",
"getCurrentPackage"
]
}
}
}Use case: Connecting to CulebraTester2 running on a remote device or emulator
You can configure multiple MCP servers for different devices:
File: ~/.kiro/settings/mcp.json
{
"mcpServers": {
"culebratester2-device1": {
"command": "culebra-mcp",
"args": [],
"env": {
"CULEBRATESTER2_URL": "http://localhost:9987"
},
"disabled": false
},
"culebratester2-device2": {
"command": "culebra-mcp",
"args": [],
"env": {
"CULEBRATESTER2_URL": "http://localhost:9988"
},
"disabled": false
}
}
}Use case: Testing on multiple devices simultaneously
File: ~/.kiro/settings/mcp.json
{
"mcpServers": {
"culebratester2-mcp": {
"command": "culebra-mcp",
"env": {
"CULEBRATESTER2_DEBUG": "1"
}
}
}
}Use case: Quick troubleshooting with debug logs enabled
Check:
- JSON syntax is valid (use a JSON validator)
- File is in the correct location
- Restart Kiro or reconnect the MCP server
Solution:
# Validate JSON
cat ~/.kiro/settings/mcp.json | python3 -m json.toolError: Could not connect to CulebraTester2
Check:
- CulebraTester2 is running on the device
- URL is correct in
CULEBRATESTER2_URL - Device is accessible from your machine
- Firewall isn't blocking the connection
Test connection:
curl http://localhost:9987/v2/culebra/infoExpected output:
{"versionCode":20075,"versionName":"2.0.75-alpha"}Error: culebra-mcp: command not found
Solution:
- Install AndroidViewClient:
pip install androidviewclient - Or use Python module:
"command": "python3", "args": ["-m", "com.dtmilano.android.mcp.server"]
Error: ModuleNotFoundError: No module named 'com.dtmilano.android.mcp'
Solution: Add to configuration:
{
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
}
}Check:
- Enable debug logging:
"CULEBRATESTER2_DEBUG": "1" - Check logs for error messages
- Verify CulebraTester2 version is compatible (>= 2.0.73)
- Test CulebraTester2 directly with curl
Error: Requests timing out
Solution: Increase timeout:
{
"env": {
"CULEBRATESTER2_TIMEOUT": "60"
}
}- CulebraTester2 Documentation: https://github.com/dtmilano/CulebraTester2-public
- AndroidViewClient Documentation: https://github.com/dtmilano/AndroidViewClient
- MCP Protocol Specification: https://modelcontextprotocol.io/
- Kiro Documentation: https://kiro.ai/docs
If you encounter issues:
- Enable debug logging
- Check the troubleshooting section
- Review the logs for error messages
- Open an issue on GitHub with:
- Your configuration file (sanitized)
- Error messages from logs
- CulebraTester2 version
- AndroidViewClient version
- Operating system
- v24.1.0 (2024-12-20): Initial MCP server release
- 20 MCP tools for Android automation
- Support for official culebratester-client
- Debug logging support
- Comprehensive configuration options