appinventor-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AI2_ALLOW_EVAL | No | Set to 1 to enable the ai_ui_eval tool, which executes arbitrary JavaScript in the signed-in App Inventor session. Off by default. | 0 |
| APPINVENTOR_MCP_PORT | No | Port for the local MCP listener/relay on 127.0.0.1 (shown as 8766 in the client config example). | 8766 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ai_statusA | Connection and health. action=status shows relay/editor state; selftest verifies the whole server against the live editor; inject returns the snippet that attaches the page relay; state reads the live editor view/selection/components. |
| ai_projectC | Project lifecycle and project-level settings. info/create/open/import/export/properties/removeScreen/delete. |
| ai_screenC | Screens: list/add/switch/remove. Only the screen open in the Designer can be edited. |
| ai_componentC | Designer components: tree/add/remove/rename/select/get/set/types/schema. |
| ai_assetB | Project assets in assets/: list/upload. Upload before referencing an asset in a component. |
| ai_blocksC | Blockly workspace: context/get/set/add/clear/diagnostics/repair. Prefer set over add; the editor is not transactional. |
| ai_layoutB | Layout IR compiler: plan (dry run + fidelity report), apply (build the screen), theme (tokens). |
| ai_validateB | Validate the project: unknown component types, missing assets, broken component references, duplicate handlers, variable scoping, block errors, empty launcher screen, legacy theme. |
| ai_buildA | Compile: apk/aab/status. Refuses to build while the editor reports block errors (pass skipPreflight to force). |
| ai_testC | Device testing: devices/install/run/buildAndTest/screenshot/logs. |
| ai_downloadB | Download a URL (for example a build link) to a local file. |
| ai_ui_evalA | Escape hatch: evaluate JavaScript in the App Inventor page. Disabled unless the server was started with AI2_ALLOW_EVAL=1, because it runs arbitrary code in a signed-in session. |
| ai_batchA | Run several tool calls in one request, in order. Stops at the first failure and reports which call failed. Accepts both consolidated names (ai_component) and the internal ones (ai_component_add). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| app_from_brief | End-to-end: read a brief and sources, plan screens, upload assets, build layout + blocks, validate, compile and test. |
| screen_from_design | Compile a design bundle into a screen: assets first, dry-run plan, apply, then report fidelity. |
| restyle_screen | Apply colour and type tokens to an existing screen and report what cannot be automated. |
| fix_runtime_crash | Classify a runtime error from the device, apply the smallest safe fix, rebuild and retest. |
| ship_apk | Validate, compile, verify the package, install and run a UI scenario on a device. |
| audit_app | Read-only review: structure, blocks, validation, compile, launch, design drift. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| docs/architecture | How the server, relay and editor fit together |
| docs/mcp-tools | Every tool and what it is for |
| docs/designer | Designer automation: add/remove/rename/properties/screens |
| docs/blocks | Blockly authoring rules and recipes |
| docs/build-and-test | Compiling and device testing |
| docs/troubleshooting | Failure catalogue and release-drift checks |
| component catalog | Component types, events, methods and properties from the live editor |
| current project tree | Component tree of the open project, read from the saved .scm |
| current workspace blocks | Blockly XML of the active screen |
| editor state | Live project/view/selection/component report |
TDQS
Scored across 13 tools
Each tool owns a distinct domain (project, screen, component, asset, blocks, layout, build, test), so an agent can generally pick the right namespace. There are a few genuine overlaps: ai_status's 'state' reads editor view/selection/components, which duplicates ai_component get/select and ai_screen list, and ai_validate overlaps ai_blocks diagnostics and ai_build preflight. ai_ui_eval is a deliberate catch-all escape hatch that could absorb anything, but its description clearly marks it as a last resort.
All 13 tools use a uniform ai_ prefix with snake_case, so the format is highly predictable. The only inconsistency is semantic: most names are domain nouns (ai_project, ai_screen, ai_blocks) while a few are verbs/adjectives (ai_validate, ai_ui_eval), and actions live inside parameters rather than in the tool name.
13 tools is well within a healthy range for a complex IDE-automation surface. Each tool corresponds to a real subsystem of App Inventor (screens, components, assets, blocks, layout, build, device test), and the consolidated action-parameter design keeps the count down without losing capability.
Coverage is broad: project lifecycle, screen management, component CRUD, block workspace, layout compilation, validation, build, device testing, and a batch runner. Minor gaps remain, notably asset management is list/upload only (no delete or rename), and there is no signing/keystore or version-control surface, but agents can work around these.