MCP for coding agents

Run your automations from Claude Code and Cursor

Every worklet and every organization in Autoworklet is an MCP server. Mint an API key, register the server with your agent, and it can read the script, run the worklet, read back the result and repair what failed. Available on every plan, Free included.

Set up in three steps

  1. 1. Create an API key

    Open a worklet in Autoworklet, go to its Triggers tab and find the API Access section. Create a key with read and write so the agent can explore and run the worklet; add script if it should also edit and publish the script. The key is shown once. For every worklet and workflow in an organization at once, an org admin or manager can create an organization key from the same section. Either way, the section then prints the commands below with your ids and key filled in.

    No account yet? Start free and teach your first automation; the key form is on the worklet page.

  2. 2. Register the server

    Claude Code: run this in the project you want the worklet available in. Add --scope user to reach it from every project.

    claude mcp add --transport http your_org_invoice_sync \
      https://api.autoworklet.com/v1/worklets/WORKLET_ID/mcp \
      --header "x-api-key: YOUR_API_KEY"

    Cursor: put this in .cursor/mcp.json in the project, or in ~/.cursor/mcp.json for every project.

    {
      "mcpServers": {
        "your_org_invoice_sync": {
          "url": "https://api.autoworklet.com/v1/worklets/WORKLET_ID/mcp",
          "headers": {
            "x-api-key": "YOUR_API_KEY"
          }
        }
      }
    }

    Claude Code also reads a project-level .mcp.json you can commit for a team; it takes the same entry with "type": "http" added.

    {
      "mcpServers": {
        "your_org_invoice_sync": {
          "type": "http",
          "url": "https://api.autoworklet.com/v1/worklets/WORKLET_ID/mcp",
          "headers": {
            "x-api-key": "YOUR_API_KEY"
          }
        }
      }
    }

    Whole organization: an organization key points at the org server instead, and the agent picks a worklet with list_worklets.

    claude mcp add --transport http your_org \
      https://api.autoworklet.com/v1/orgs/ORG_ID/mcp \
      --header "x-api-key: YOUR_ORG_API_KEY"
  3. 3. Confirm it connected

    claude mcp list should show your_org_invoice_sync as connected (inside a session, /mcp shows the same). In Cursor, the server appears under Customize in the sidebar, and the MCP Logs output panel shows the connection. Then ask the agent to call get_worklet: the server sends its own instructions on connect, and its tools appear to the agent as mcp__your_org_invoice_sync__run_worklet and so on. A 401 invalid_api_key means the key is wrong or revoked; a tool answering insufficient_permission needs a key minted with that permission.

    claude mcp list

Connectors that sign in instead of pasting a key (claude.ai, ChatGPT, Claude Desktop) need only the server URL: paste it as a custom connector, sign in, approve the consent screen, and the app shows up in the worklet's API Access list where it can be revoked. The permissions you tick there are the same read, write and script.

What the agent can do

A worklet server carries the tools below. Each tool checks the permission on the key, so one connection can mix reading, running and editing. Script edits land in the draft; runs default to the draft; scheduled, triggered and REST runs keep executing the published version until the agent calls publish_worklet.

ToolWhat it does
get_workletreadWorklet metadata, project manifest, gated API families, org connections, login names, grid columns, and Teach intake status when this worklet is still in /teach. Start here.
list_script_filesreadList the project script files (main.py first). Pass includeContents=true to read every helper in one call.
read_script_filereadRead one script file.
read_context_docreadThe AutomationAPI signature catalog or the authoring guide. Optional query searches signatures by method name.
list_image_versionsreadReleased sandbox image tags (X.Y.Z) from the live registry, plus the worklet's current pin. latest is not listed, and neither is a withdrawn engine; currentWithdrawn gives the reason when the worklet's own pin is withdrawn.
write_script_filescriptCreate/update one script file in the DRAFT project.
delete_script_filescriptDelete a helper script (the entry script is protected).
publish_workletscriptPublish the draft as the next immutable version.
set_image_versionscriptPin the worklet to a concrete sandbox image (X.Y.Z from the live registry). Omit version to pin the promoted engine, or pass newest for the highest release. Never writes latest or a withdrawn engine.
run_workletwriteQueue a run; defaults to useDraft=true so the sandbox loads the draft. Optional imageVersion (newest or X.Y.Z) trials that engine on this run only. waitSeconds (1-110) long-polls for the result.
dry_run_workletwriteQueue a dry-run (dryRun=true); defaults to useDraft=true. The script must call dry_run_stop before each real-world act. Refuses unless the effective image ships dry-run. Optional imageVersion trials that engine on this run only. Always strict: every barrier stops, including ones marked duplicate_tolerant=True; the tolerant policy is only set by the website's engine-upgrade trial.
list_runsreadPaginated run history, newest first, including the tries Teach made while building the worklet (intakePhase set).
get_runreadOne run - status, output_vars, error, report URL, failure-probe URL, supervisor summary, intakeId when it is a Teach run, intakePhase when Teach made it while building, dryRun when it is a dry-run.
get_repair_contextreadRepair bundle: newest terminal run (or a given runId), newest finished run, text-only report timeline, failure-page listing, full supervisor write-up, Teach intake status and 3-attempt budget when they exist, and the image pin plus gated API families. Call this before editing a failing script.
list_sandbox_filesreadList the org sandbox folders this worklet sees.
get_sandbox_file_linkreadMint a signed download URL for a sandbox file.
upload_sandbox_file_linkwriteMint a signed PUT URL to upload a sandbox file.

Organization server only

An organization key reaches every worklet, workflow and dataset in the org. Every worklet tool above takes a workletId there, and these tools exist only on the org server.

ToolWhat it does
list_workletsreadEvery worklet in the org. The ONLY supported source of workletId - ids are never guessed and a slug is not accepted.
list_workflowsreadEvery workflow in the org, with its member count.
get_workflowreadOne workflow: member worklets plus the edges between them, each edge carrying the columnMap that moves values from an upstream output column to a downstream input column.
dispatch_grid_rowswriteRun the rows already queued and ready on a worklet's grid. Takes an idempotency token you choose - resend the SAME one on a retry or the rows dispatch twice.
create_grid_linkscriptWire one worklet's grid into another's so finished rows feed the next step. Org admin or manager.
update_grid_linkscriptChange an existing link's column map. Org admin or manager.
delete_grid_linkscriptStop a source grid feeding a target. Org admin or manager.
configure_grid_columnsscriptSet a grid's full column list and roles. A new OUTPUT column usually needs no tool at all - it appears by itself on the next run of a script that calls set_output. Org admin or manager.
add_workflow_memberscriptPut a worklet on a workflow's canvas. Membership only - call create_grid_link to make data flow. Paired with remove_workflow_member, which leaves existing links standing. Org admin or manager.
remove_workflow_memberscriptTake a worklet off a workflow's canvas. Its grid links stay - call delete_grid_link to stop the data flowing. Org admin or manager.
list_datasetsreadThe org's datasets with their columns, paged; a worklet's grid also names its workletId and each column's role. The ONLY supported source of datasetId.
list_recordsreadRecords of one dataset, newest first. Pass nextCursor back as cursor for the next page.
get_recordreadOne record by id.
create_recordwriteAdd one record. Pass your own id to make a retry safe - a retry of a create that landed answers record_exists. On a worklet's grid only input columns are accepted, and a filled row waits for Run ready or a schedule.
create_recordswriteAdd up to 500 records in one all-or-nothing write, each with an optional id. One invalid row or taken id refuses the whole call.
update_recordwriteChange some columns of one record. Merges: only the keys you pass change.
delete_recordwriteDelete one record. Cannot be undone. The key's owner must still be an org admin or manager.

Dashboards

The organization server also reads and edits dashboards. The agent saves a draft; a person previews it and publishes the site from the editor, because there is no publish tool. Read the dashboards guide

ToolWhat it does
list_dashboardsreadEvery dashboard in the organization, with its access mode and, once published, its site address.
get_dashboardreadOne dashboard: its bindings, brand, access mode, site status and newest revisions.
get_dashboard_apireadWhat dashboard code may import and call, and what the frame forbids. The agent reads it before it writes code.
get_dashboard_sourcereadEvery file of a revision. The draft by default.
save_dashboard_draftscriptCompiles all the files and saves them as the new draft. Clients see nothing until a person publishes.
set_dashboard_bindingsscriptSets which automations, file areas and tables the dashboard may use.
set_dashboard_brandscriptSets the colors, logo and fonts.
get_dashboard_editor_urlreadThe editor page where a person previews the draft and publishes it.

Plans

MCP is included on every plan. A run started by an agent uses execution minutes like any other run: the Free plan includes 30 minutes a month and stops there, Starter and Pro meter the excess per minute. The REST External Run API (calling POST /runs from your own server), worklet shares and embed widgets are Pro and above; a key minted on Free or Starter still works over MCP and answers plan_upgrade_required on REST.

See plans and pricing