Gru Sandbox MCP server

Secure, self-hostable sandbox for running Python, TypeScript, and Bash code in isolated Docker containers with automatic resource management for local command execution.
Back to servers
Setup instructions
Provider
BabelCloud
Release date
Mar 19, 2025
Language
TypeScript
Stats
96 stars

Gbox is a self-hostable sandbox environment that allows AI agents to execute commands, browse the web, and use desktop/mobile functionality. It provides an MCP (Model Context Protocol) server that integrates directly with tools like Claude Desktop and Cursor, giving AI assistants enhanced capabilities to perform tasks on your behalf.

Installation

System Requirements

Installation Steps

# Install via Homebrew
brew tap babelcloud/gru && brew install gbox

# Initialize environment
gbox setup

# Export MCP config and merge into Claude Desktop
gbox mcp export --merge-to claude
# or gbox mcp export --merge-to cursor

# Restart Claude Desktop

Update Steps

# Update gbox to the latest version
brew update && brew upgrade gbox

# Update the environment
gbox setup

# Export and merge latest MCP config into Claude Desktop
gbox mcp export --merge-to claude
# or gbox mcp export --merge-to cursor

# Restart Claude Desktop

Using Gbox

Basic Commands

The gbox command-line tool helps you manage sandbox containers:

# Login to gbox.cloud
gbox login

# Profile management
gbox profile add --key <key> --name <name>     # add profile
gbox profile list                              # list all profiles
gbox profile use [index]                       # switch current profile
gbox profile delete <index>                    # delete profile
gbox profile current                           # show current profile

# Local environment
gbox setup                                     # initialize local runtime environment
gbox cleanup                                   # clean up local runtime environment

Container Management

# Create and manage containers (boxes)
gbox box create linux --label project=myapp    # create a Linux box
gbox box create android --device-type virtual  # create an Android box
gbox box list                                  # list boxes
gbox box terminate <box-id>                    # terminate box
gbox box exec <box-id> -- ls /                 # execute command inside box
gbox box cp <box-id>:<container-path> <local-path>  # file copy
gbox box inspect <box-id>                      # inspect box

MCP Configuration

# Configure MCP integration
gbox mcp export                                # export config only
gbox mcp export --merge-to claude              # integrate Linux MCP server into Claude Desktop
gbox mcp export --merge-to cursor              # integrate Linux MCP server into Cursor
gbox mcp export --merge-to claude-code --type android  # integrate Android MCP server
gbox mcp export --dry-run                      # preview merge result

Android Automation

Prerequisites

  1. An Android device connected via USB or ADB over TCP/IP
  2. ADB (Android Debug Bridge) installed and configured
  3. API key for OpenAI with access to the computer-use-preview model

Setting up ADB

  1. Install ADB:

    • macOS: brew install android-platform-tools
    • Linux: sudo apt install adb (Ubuntu/Debian) or sudo pacman -S android-tools (Arch)
    • Windows: Download Android SDK Platform Tools and extract the ZIP file
  2. Verify ADB installation:

    adb version
    
  3. Enable USB debugging on your Android device:

    • Go to Settings → About phone
    • Tap Build number 7 times to enable Developer options
    • Go to Settings → System → Developer options
    • Enable USB debugging
  4. Connect Android device and confirm connection:

    adb devices -l
    

Using Android Automation

Set your OpenAI API key and run commands:

export OPENAI_API_KEY=YOUR_KEY
gbox cua android "Open Uber and book a ride to The Chinese University of Hong Kong now."

Use Cases

Linux MCP Capabilities

When integrated with Claude Desktop or other AI clients, gbox enables:

  • Generating diagrams - Create charts and visualizations of data
  • Creating PDFs - Generate PDF reports and documents
  • Data analysis - Analyze and compare market data, perform calculations
  • Advanced tasks - Download videos, process files, and perform other complex operations

Android MCP Capabilities

  • App testing - Test Android applications
  • Automated tasks - Navigate apps, input data, and perform actions automatically
  • Interactive assistance - Guide you through using your Android device

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "gru-sandbox" '{"command":"gbox","args":["mcp","serve"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "gru-sandbox": {
            "command": "gbox",
            "args": [
                "mcp",
                "serve"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "gru-sandbox": {
            "command": "gbox",
            "args": [
                "mcp",
                "serve"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later