MCP server
The MCP server lets a tool that speaks the Model Context Protocol (MCP) read a shop's screens and change drafts. It uses the same API key and scopes as the CLI.
Status: built. It runs as a local program that talks over standard input and output. The official MCP software development kit is not used. The server is a small, hand-written program.
Start it#
Run the appbuilder-mcp launcher from the repository. Set APPBUILDER_API_URL and APPBUILDER_API_KEY, or log in with the CLI first. Then add the launcher to your MCP tool's server list.
The server writes only protocol messages to standard output. Log messages go to standard error.
Tools#
| Tool | What it does | Scope needed |
|---|---|---|
list_screens | List screens and whether they have unpublished changes. | screens:read |
get_screen | Read one screen's draft or live document. | screens:read |
update_screen_draft | Save a screen draft. Needs base_version_id, or force. | screens:write |
validate | Check a screen, the theme, or a custom block. | read scopes |
list_blocks | List block types, including custom blocks. | blocks:read |
publish | Publish all drafts. | publish |
Publishing needs explicit confirmation#
publish refuses to run unless confirm is exactly true. The tool is marked as destructive, because a publish changes what shoppers see. The tool only sends true after a person has clearly agreed to publish. If the shop has an approval rule, the call creates an approval request instead.
Errors#
Tool errors come back as results marked as errors. The tool can read the message and try again. A read-only key cannot change anything, so a write returns an error.
Safety#
- Use a key with the smallest scopes you need.
- Revoke the key when you stop using the tool.
- Do not paste keys into chat logs or shared files.