appinventor-claude-mcp
v0.1.0
Published
MCP server for MIT App Inventor .aia projects.
Maintainers
Readme
appinventor-claude-mcp
MCP server for MIT App Inventor .aia projects. It reads and writes screen .scm and .bky files inside the project zip so agents can modify UI and blocks.
Features
- Validate
.aiaprojects - List screens
- Read and write screen
.scm/.bky - REST + MCP stdio transport
Requirements
- Node.js 18+
Installation
Global install:
npm install -g appinventor-claude-mcpLocal dev:
npm install
npm run build
npm run build:mcpUsage
Run the REST server
appinventor-claude-mcpDefaults to port 3070. Override with:
$env:PORT=3071
appinventor-claude-mcpRun the MCP stdio server
node build/mcp.jsMCP client config
{
"mcpServers": {
"appinventor-mcp": {
"command": "node",
"args": ["/absolute/path/to/build/mcp.js"]
}
}
}Tutorial (10 minutes)
- Choose a
.aiafile on disk. - Validate it:
POST /validate- Body:
{ "aiaPath": "/path/to/project.aia" }
- List screens:
POST /list_screens- Body:
{ "aiaPath": "/path/to/project.aia" }
- Read a screen:
POST /read_screen- Body:
{ "aiaPath": "/path/to/project.aia", "screenName": "Screen1" }
- Write an update to a new file:
POST /write_screen- Body:
{ "aiaPath": "/path/to/project.aia", "screenName": "Screen1", "scm": "<xml>...</xml>", "outputPath": "/path/to/project-out.aia" }
REST API
Health
GET /health->{ status: "ok" }
Validate
POST /validatebody:{ aiaPath: string }- Returns
{ valid, screens }
List screens
POST /list_screensbody:{ aiaPath: string }- Returns
{ screens }
Read screen
POST /read_screenbody:{ aiaPath: string, screenName?: string }- Returns
{ screenName, scm, bky }
Write screen
POST /write_screenbody:{ aiaPath: string, screenName?: string, scm?: string, bky?: string, outputPath?: string }- Returns
{ success, outputPath } - If
outputPathis not set, a.bakis created before overwrite
Clawdbot / Moltbot compatibility
This repo ships a skill at skills/appinventor-mcp/SKILL.md.
Enable it in Moltbot:
{
"skills": {
"load": {
"extraDirs": ["~/.clawdbot/skills"],
"watch": true,
"watchDebounceMs": 250
},
"entries": {
"appinventor-mcp": {
"enabled": true,
"env": {}
}
}
}
}Example prompts
- "Open this .aia file and add a Button labeled Start to Screen1."
- "List all screens and summarize their components."
- "Update Screen1 blocks to log when a button is clicked."
Testing
npm testTests generate temporary .aia fixtures on the fly.
Publishing
- Update
package.jsonversion - Build:
npm run build npm run build:mcp - Publish:
npm publish --access public - Tag and push to trigger
.github/workflows/publish.yml
Project structure
src/index.tsREST APIsrc/mcp.tsMCP stdio bridgeskills/appinventor-mcp/SKILL.mdagent skillserver.jsonMCP registry metadata
Contributing
PRs welcome. Please keep changes small and include tests where possible.
License
MIT
