Skip to main content
Glama
App Inventor MCP

App Inventor MCP

by SirHumza

App Inventor MCP

An MCP (Model Context Protocol) server that lets AI agents build and edit MIT App Inventor projects. The agent creates real .aia files on disk, which you then import into App Inventor via Projects > Import (.aia).

Part of the AIA Stitch family. Sister project: aia-stitch (web UI for merging projects).

Why

App Inventor is a visual drag-and-drop tool, which historically locked out AI agents. But an .aia file is just a zip: screens are JSON documents (*.scm), blocks are XML (*.bky), assets are plain files. This server exposes those facts as tools any MCP client can call, so an agent can scaffold an entire multi-screen app for you before you ever open the designer.

Related MCP server: Prowpt MCP Server

Setup

Requires Node 18+.

npm install
node server.mjs

Add to your MCP client config (Claude Desktop, opencode, etc.):

{
  "mcpServers": {
    "app-inventor": {
      "command": "node",
      "args": ["/absolute/path/to/app-inventor-mcp/server.mjs"]
    }
  }
}

Tools

Tool

What it does

aia_create_project

New .aia with a Screen1, valid properties

aia_add_screen

Add a screen

aia_inspect

List screens, components, assets, properties

aia_get_screen

Read one screen's components, properties and blocks XML

aia_add_component

Add a component, optionally nested in a parent arrangement

aia_set_property

Set a property on the screen or a component

aia_set_blocks

Replace a screen's blocks XML

aia_add_event_handlers

Generate event handlers (when Click do...) without knowing Blockly XML

aia_add_asset

Embed a local file (image, sound) into the project

aia_merge

Merge multiple .aia files into one

Testing

node test.mjs    # library roundtrip: create, author, merge
node smoke.mjs   # full MCP protocol handshake + tool calls over stdio
node stress.mjs  # scale (25 screens / 120 components), concurrency, abuse, recovery

Honest limits

Components and screen properties are fully supported. Blocks authoring works at two levels: generated event handlers via aia_add_event_handlers (property setters and screen navigation), or raw Blockly XML via aia_get_screen / aia_set_blocks. There is no high-level vocabulary for every block type yet. UI-first apps work end to end today; exotic logic may want finishing touches inside App Inventor.

All file operations are serialized per path inside the process, so pipelined/concurrent calls from an agent are safe. Cross-process access to the same .aia at the same time is not guarded; don't edit one file from two servers at once.

Available Tools

10 tools
aia_add_assetA

Copy a local file (image, sound, font...) into the project's assets folder

Inputs: path (required), source_file (required), name.

aia_add_componentB

Add a UI component to a screen, optionally nested inside a parent arrangement/component

Inputs: name (required), path (required), type (required), screen_name (required), +2 more.

aia_add_event_handlersB

Generate and append event handlers (e.g. 'when Button.Click do...') to a screen's blocks without touching existing ones. Each action is either {set, component, componentType, to} to set a property or {openScreen} to switch screens.

Inputs: path (required), events (required), screen_name (required).

aia_add_screenA

Add a new screen to an existing .aia project

Inputs: path (required), screen_name (required), title.

aia_create_projectA

Create a new empty .aia project with a Screen1. Name is sanitized to letters/digits/underscore.

Inputs: path (required), project_name (required).

aia_get_screenB

Read one screen: its component list, screen properties and blocks XML

Inputs: path (required), screen_name (required).

aia_inspectB

List screens (with their components), assets and properties of an .aia project

Inputs: path (required).

aia_mergeA

Merge multiple .aia files into one (same engine as AIA Stitch). Later colliding screens get prefixed with their source project tag.

Inputs: out_path (required), input_paths (required), project_name (required).

aia_set_blocksA

Replace a screen's blocks XML (.bky). Must contain an root element.

Inputs: path (required), blocks_xml (required), screen_name (required).

aia_set_propertyC

Set one property on the screen itself (omit component_name) or on one of its components. Value may be string, number or boolean.

Inputs: path (required), prop (required), value (required), screen_name (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tools has a distinct resources (project, screen, component, blocks, asset), so selection is usually clear. However, aia_inspect and aia_get_screen both surface components and properties, and aia_set_property overlaps with property-setting actions inside aia_add_event_handlers.

    Naming Consistency4/5

    All tool names share the aia_ prefix and follow a predictable verb-first style, such as create_project, add_screen, and set_property. A couple of bare verbs like aia_inspect and aia_merge break the verb_noun rhythm slightly.

    Tool Count5/5

    Ten tools is a well-scoped set for manipulating .aia projects. Each tool has a clear role in the creation, inspection, and editing workflow, with no obvious filler or redundancy.

    Completeness3/5

    The set covers project creation, screen/component management, property editing, blocks, event handlers, assets, and merging. Significant gaps are missing delete/remove operations for screens, components, or assets, which would limit full lifecycle editing.

    Related MCP Connectors

    Related MCP Servers