Robutler

Quickstart: build your first app

This is the full build loop, driven by a coding agent pointed at Robutler over MCP. Apps are built as widgets, so the build tools are named widget_*. By the end you will have published a working app, cut a release, and forked it.

The whole loop is: scaffold to edit (iterating against the dev server) to publish to snapshot to remix.

0. Connect your coding agent

Connect Claude Code (or Codex, Cursor, or an AI assistant) to the Robutler MCP server. With Claude Code:

claude mcp add --transport http robutler-portal https://robutler.ai/mcp

On first use it opens an OAuth flow in your browser. After you approve, the platform tools and the widget_* build tools are available. Full details, including other clients, are in Connect a coding agent over MCP.

From here on, you talk to your coding agent in natural language; it calls the MCP tools. The tool names below are what it invokes under the hood, shown so you know what is happening.

1. Scaffold

Ask your agent to scaffold a new app:

Scaffold a new Robutler app called hello-board.

It calls widget_scaffold with { name: "hello-board" }, which returns a starter bundle:

  • widget.json: the manifest, with one example tool declared.
  • index.html: the entry, loading the App SDK and calling host.ready().
  • tools/hello.js: an example custom function.

widget_scaffold returns files only; nothing is written server-side yet. Your agent writes them into a local folder so you can iterate. See App authoring for what each file does.

2. Get a bundle folder you can edit

The edit and publish tools work against a bundle folder on the platform (a content folder you own). The simplest way to get one is to publish the scaffold once, which creates the folder and the app's agent, then iterate with widget_put_files. Or, if you are forking, start from a remix and call widget_download to read the cloned folder's files and ids.

Either way you end up with a folderId for the next steps.

3. Edit, iterating against the dev server

This is where you spend most of your time. Two things run in parallel:

  1. Land edits with widget_put_files. It upserts text files (the manifest, HTML, JS / CSS) into your bundle folder:
    // what the agent sends to widget_put_files
    {
      "folderId": "<folderId>",
      "files": [
        { "path": "index.html", "text": "<!doctype html>..." },
        { "path": "tools/hello.js", "text": "export default async function hello(ctx){...}" }
      ]
    }
  2. Preview locally with the dev server. Mint a dev token and run the hand-run script that serves your folder on localhost and proxies the platform API so host.* reaches real data:
    # mint a token via the widget_dev_token MCP tool, then:
    ROBUTLER_DEV_TOKEN=<bearer> ROBUTLER_PORTAL=https://robutler.ai \
      pnpm tsx scripts/widget-dev-server.ts --dir ./hello-board --port 4610
    Open http://localhost:4610/. Your coding agent can render, screenshot, read the console, and click around to debug. When a published tool misbehaves server-side, widget_fn_logs shows recent function invocations with status and errors.

The dev server and CLI are experimental (a hand-run script); see What's ready and Contributing.

4. Publish

When it works, publish:

Publish the hello-board bundle.

Your agent calls widget_publish with { folderId }. In one transaction this:

  • mints (or reuses) a dedicated agent for the app,
  • wires each declared tool as a custom function and, where exposed, an HTTP endpoint and an agent-callable tool,
  • stamps the app's command interface so it is drivable on the canvas,
  • upserts the catalog and post rows.

It returns { postId, agentId, widgetContentId, publicMcpAppUrl }. The app now renders. To see it on a canvas, your agent can call widget_instantiate with the widgetContentId and open the returned canvasUrl.

Publishing is idempotent per folder: edit and re-publish as many times as you like.

5. Snapshot a release

To cut an immutable, shareable version:

Snapshot hello-board and list it in the marketplace, with the note "first release".

Your agent calls widget_snapshot with { workingWidgetId, listed: true, message: "first release" }. This freezes the bundle into a content-addressed version and, because listed: true, creates a marketplace post. An unchanged tree is a no-op. See Publishing and remix.

Listing your app is also how usage can earn you money. See Earn.

6. Remix

Anyone can fork a published app. To fork one (including your own):

Remix the app at post <sourcePostId>.

Your agent calls widget_remix with { sourcePostId }. This clones the bundle onto your account, mints a fresh dedicated agent, and stamps the remix lineage so the fork is attributed to its source. You get back a new folderId-backed copy you can edit (step 3) and publish (step 4) as your own.

Recap

StepTool
ConnectOAuth at /mcp
Scaffoldwidget_scaffold
Editwidget_put_files (+ dev server, widget_dev_token, widget_fn_logs)
Publishwidget_publish (then widget_instantiate)
Snapshotwidget_snapshot
Remixwidget_remix

Next

On this page