AndroidViewClient ================= **AndroidViewClient/culebra** was initially conceived as an extension to [monkeyrunner](http://developer.android.com/tools/help/monkeyrunner_concepts.html) but has since evolved into a versatile pure Python tool. It streamlines test script creation for Android applications by automating tasks and simplifying interactions. This test framework: **🛎** |A new Kotlin backend is under development to provide more functionality and improve performance.
Take a look at [CulebraTester2](https://github.com/dtmilano/CulebraTester2-public) and 20.x.y-series prerelease. | ---|----------------------------------------------------------------------------------------------| [![Latest Version](https://img.shields.io/pypi/v/androidviewclient.svg)](https://pypi.python.org/pypi/androidviewclient/) ![Release](https://img.shields.io/github/v/release/dtmilano/AndroidViewClient?include_prereleases&label=release) ![Upload Python Package](https://github.com/dtmilano/AndroidViewClient/workflows/Upload%20Python%20Package/badge.svg) [![Downloads](https://static.pepy.tech/badge/androidviewclient)](https://pepy.tech/project/androidviewclient) **NOTE**: Pypi statistics are broken see [here](https://github.com/aclark4life/vanity/issues/22). The new statistics can be obtained from [BigQuery](https://bigquery.cloud.google.com/queries/culebra-tester). As of November 2026 we have reached:

culebra 3 million downloads

Thanks to all who made it possible. # Installation ``` pip3 install androidviewclient --upgrade ``` Or check the wiki for more alternatives. # AI-Powered Testing with MCP **NEW!** AndroidViewClient now includes a Model Context Protocol (MCP) server that enables AI assistants like Claude Code and Kiro to interact with Android devices through natural language. ## Quick Start with MCP 1. **Install with MCP support:** ```bash pip3 install androidviewclient --upgrade ``` 2. **Start CulebraTester2 on your device:** Check the details at [How to run CulebraTester2 ?](https://github.com/dtmilano/CulebraTester2-public?tab=readme-ov-file#how-to-run-culebratester2-) 3. **Configure your AI assistant:** **Claude Code** — register the server with one command: ```bash claude mcp add culebratester2 --env CULEBRATESTER2_URL=http://localhost:9987 -- culebra-mcp ``` Or add it to `.mcp.json` in your project root, so everyone who clones the project gets it: ```json { "mcpServers": { "culebratester2": { "command": "culebra-mcp", "env": { "CULEBRATESTER2_URL": "http://localhost:9987" } } } } ``` **Kiro** — add the same entry to `.kiro/settings/mcp.json` or `~/.kiro/settings/mcp.json`. 4. **Start testing with natural language:** - "_Get the device screen size_" - "_Launch the Calculator app_" - "_Find the button with text Submit and click it_" - "_Take a screenshot_" - "_Swipe up to scroll_" ## MCP Tools Available The MCP server provides 20 tools for Android automation: **Element-based interactions:** - Find elements by text or resource ID - Click, long-click, enter text, clear text - Navigate with back/home buttons - Launch applications **Coordinate-based interactions:** - Click/long-click at coordinates - Swipe gestures **Device actions:** - Wake/sleep device - Get current app - Force stop apps - Take screenshots ## Configuration For detailed MCP configuration options, see the [MCP Configuration Guide](docs/MCP_CONFIGURATION.md). Quick reference: | | Claude Code | Kiro | |---|---|---| | **Project config** | `.mcp.json` (repository root) | `.kiro/settings/mcp.json` | | **User config** | `~/.claude.json` (via `claude mcp add --scope user`) | `~/.kiro/settings/mcp.json` | | **Tool pre-approval** | `permissions.allow` in `.claude/settings.json` | `autoApprove` in the server entry | | **Example** | `examples/mcp_config.json` | `examples/mcp_config_kiro.json` | - **Usage examples:** `examples/test_calculator_mcp.py` ## Environment Variables - `CULEBRATESTER2_URL`: Base URL for CulebraTester2 (default: `http://localhost:9987`) - `CULEBRATESTER2_TIMEOUT`: HTTP timeout in seconds (default: `30`) - `CULEBRATESTER2_DEBUG`: Enable debug logging (`1`, `true`, or `yes`) # Want to learn more? > 🚀 Check [Examples](https://github.com/dtmilano/AndroidViewClient/wiki/Resources#examples) and [Screencasts and videos](https://github.com/dtmilano/AndroidViewClient/wiki/Resources#screencasts-and-videos) page to see it in action. > Detailed information can be found in the [AndroidViewClient/culebra wiki](https://github.com/dtmilano/AndroidViewClient/wiki)