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.
# 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 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
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
# 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
# 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
Install ADB:
brew install android-platform-tools
sudo apt install adb
(Ubuntu/Debian) or sudo pacman -S android-tools
(Arch)Verify ADB installation:
adb version
Enable USB debugging on your Android device:
Connect Android device and confirm connection:
adb devices -l
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."
When integrated with Claude Desktop or other AI clients, gbox enables:
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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