Skip to main content
Glama
williamcorrea23

AndroidBuilder MCP Server

AndroidBuilder MCP Server

An official Model Context Protocol (MCP) server that connects to running instances of MIT App Inventor, AndroidBuilder, Kodular, or Niotron, allowing LLMs to interact with the Designer and Blocks workspace in real-time via the Chrome DevTools Protocol.


Features

Tool

Description

get_project_info

Project name, active screen, view mode, IDE type, URL

get_component_tree

Full component hierarchy (name, type, uid, children) from Designer

get_component_properties

All property values for a specific component

update_component_property

Set a property using 3-strategy fallback (GWT API → top-frame → DOM)

add_blocks

Inject validated Blockly XML into the Blocks workspace

get_blocks_xml

Export the current workspace as Blockly XML

clear_blocks

Clear all blocks from the workspace

switch_screen

Navigate to a different screen

list_screens

List all screens in the project

click_element

Click an arbitrary CSS selector on the IDE page


Related MCP server: Chrome DevTools MCP

Prerequisites

  1. Node.js ≥ 18

  2. Google Chrome / Chromium launched with remote debugging enabled


Setup

1. Launch Chrome with Debugging Port

Windows (PowerShell / CMD):

chrome.exe --remote-debugging-port=9222

macOS:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

Open your IDE (androidbuilder.in, App Inventor, etc.) and load your project.

2. Configure MCP Client

Add this server to your MCP client configuration (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "androidbuilder-mcp": {
      "command": "node",
      "args": [
        "C:/Users/User/.gemini/antigravity-ide/scratch/androidbuilder-mcp/dist/index.js"
      ],
      "env": {
        "BROWSER_DEBUG_PORT": "9222",
        "ANDROIDBUILDER_DEBUG": "0"
      }
    }
  }
}

Environment Variables

Variable

Default

Description

BROWSER_DEBUG_PORT

9222

Chrome remote debugging port

EVAL_TIMEOUT_MS

15000

Max ms to wait for page evaluation

ANDROIDBUILDER_DEBUG

0

Set to 1 to enable verbose stderr logging


Tool Reference

get_project_info

No parameters required.

Returns:

{
  "projectName": "MyApp",
  "activeScreen": "Screen1",
  "isBlocksView": false,
  "isDesignerView": true,
  "ideType": "AndroidBuilder",
  "url": "https://androidbuilder.in/ode/..."
}

get_component_tree

Parameter

Type

Required

Description

screenName

string

No

Screen to inspect (default: active screen)

Returns:

{
  "screen": "Screen1",
  "tree": [
    {
      "name": "Screen1",
      "type": "Form",
      "children": [
        { "name": "Button1", "type": "Button" },
        { "name": "Label1", "type": "Label" }
      ]
    }
  ]
}

get_component_properties

Parameter

Type

Required

Description

componentName

string

Yes

Component name (e.g. Button1)

Note: Click the component in Designer view first to populate the Properties panel.


update_component_property

Parameter

Type

Required

Description

screenName

string

Yes

Screen owning the component (e.g. Screen1)

componentName

string

Yes

Component name (e.g. Button1)

propName

string

Yes

Property name (e.g. Text, BackgroundColor)

propValue

string

Yes

New value (e.g. Hello, #FF0000)


add_blocks

Parameter

Type

Required

Description

xmlString

string

Yes

Valid Blockly XML (must start with <)

Requires: Blocks view


get_blocks_xml

No parameters. Exports current workspace as XML.


clear_blocks

No parameters. Clears all blocks (irreversible via MCP).


switch_screen

Parameter

Type

Required

Description

screenName

string

Yes

Target screen (e.g. Screen2)


list_screens

No parameters. Returns all screen names in the project.


click_element

Parameter

Type

Required

Description

selector

string

Yes

CSS selector of element to click


Troubleshooting

Failed to connect to Chrome CDP

  • Chrome was not started with --remote-debugging-port=9222

  • Another process is using port 9222

  • Check BROWSER_DEBUG_PORT env var

No active AndroidBuilder/App Inventor tab found

  • Open a project in the IDE before calling any tool

  • The IDE page must be fully loaded, not just navigated to

Component tree (.gwt-Tree) not found

  • You are in Blocks view — switch to Designer view

Blockly is not available

  • You are in Designer view — switch to Blocks view

Tools hang / timeout

  • Increase EVAL_TIMEOUT_MS (default 15000ms)

  • Reload the IDE page and try again


Development

# Build
npm run build

# Run with debug logging
ANDROIDBUILDER_DEBUG=1 node dist/index.js

# Run with custom port
BROWSER_DEBUG_PORT=9223 node dist/index.js

Supported IDEs


License

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/williamcorrea23/androidbuilder-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server