Overview

Claude Code is an AI-powered development environment that enhances your coding workflow with intelligent assistance and automated testing capabilities. By integrating Gbox with Claude Code, you can leverage AI agents to automatically test and validate your Android applications in cloud-based Android environments. This integration enables you to:
  • Automated Testing - Let AI agents test your Android apps on real or virtual devices
  • Seamless Development - Test your code changes directly from your IDE
  • Cloud-Based Testing - No need for local Android device setup
  • AI-Powered Workflow - Intelligent test generation and execution

Prerequisites

Before setting up the Claude Code integration, ensure you have:
  • Claude Code installed on your system
  • An Android project for testing (we’ve prepared a Demo repository that you can use to get started quickly)

Getting Started

1

Install Gbox CLI

Install the Gbox CLI tool to manage your Gbox configuration.
sudo npm install -g @gbox.ai/cli
2

Login and Configure Gbox

Authenticate with your Gbox account and set up the configuration.
gbox login
This command will prompt you to enter your Gbox API key and configure your account.
3

Configure MCP Server with Claude Code

Set up the Model Context Protocol (MCP) server to enable communication between Claude Code and Gbox.
claude mcp add gbox-android -e MODE=stdio -s user -- npx -y @gbox.ai/mcp-android-server@latest
This command registers the gbox-android MCP server with Claude Code. After successful execution, verify that the server is enabled and all tools are listed correctly.MCP Server Configuration
4

Add Metadata to CLAUDE.md (Optional)

Create a CLAUDE.md file in your project root to provide context and useful metadata. Claude Code can help auto-generate this file.You may include:
  • Test account credentials
  • Project guidelines or usage instructions
  • API specs or known limitations
5

Pre-authorize MCP Tools (Optional)

To streamline execution, you can pre-authorize Claude to use specific tools and commands:
{
  "permissions": {
    "allow": [
      "Bash(mkdir:*)",
      "Bash(chmod:*)",
      "Bash(./gradlew build:*)",
      "Bash(./gradlew:*)",
      "Bash(find:*)",
      "mcp__gbox-android__create_android_box",
      "mcp__gbox-android__open_live_view",
      "mcp__gbox-android__install_apk",
      "mcp__gbox-android__get_screenshot",
      "mcp__gbox-android__ui_action",
      "mcp__gbox-android__type_text",
      "mcp__gbox-android__press_key",
      "WebFetch(domain:34.121.157.227)",
      "WebFetch(domain:docs.anthropic.com)",
      "mcp__gbox-android__list_boxes",
      "mcp__gbox-android__open_app",
      "Bash(ls:*)",
      "mcp__gbox-android__logcat",
      "mcp__gbox-android__adb_shell",
      "mcp__gbox-android__close_app",
      "Bash(curl:*)"
    ],
    "deny": []
  }
}
This avoids permission prompts during interaction and ensures smooth automation.
6

Develop and Test Your Android App

Now you can use Claude Code’s interface to test your Android applications.
  1. Open Claude Code and start a new conversation
  2. Use the Gbox MCP tools to create Android boxes and test your applications
  3. Monitor the testing process through the live view interface
Claude Code Interface 1Claude Code Interface 2The AI agent will now be able to:
  • Create Android boxes on demand
  • Install and test your applications
  • Perform automated UI testing
  • Handle device management automatically

Ready to Build Your Android App!

Congratulations! You’ve successfully set up the Claude Code + Gbox integration. Now you can leverage the power of AI to develop and test your Android applications seamlessly. With this setup, you can:
  • Create new Android projects from scratch with AI assistance
  • Build and test your apps in cloud-based Android environments
  • Automate UI testing without managing physical devices
  • Iterate quickly with instant feedback from AI agents
Start by creating a new Android project or using our demo repository as a reference, then let the AI agent help you build, test, and refine your Android applications!