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, 401 revoked_api_key that it was revoked, and 403 not_org_member that the person who minted it has left the organization. A tool answering insufficient_permission: this key lacks '<permission>' needs a key minted with that permission; any other insufficient_permission reason says what is wrong - usually a role the key's owner lacks (worklet owner, or org admin or manager), or on the org server a workletId from another organization.

    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. Pointed at the organization URL, the connector needs an org admin or manager to approve it, and it is listed under Organization credentials in the same section.

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. On a worklet that has never been published there is no separate live copy, so every run loads the edits at once.

ToolWhat it does
get_workletreadWorklet metadata, project manifest, gated API families, org connections, login names, identity profile names (checkout/signup field names, never values), 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. The signature catalog is cut to the worklet's engine - a method that engine lacks is left out, and engine names the engine and what was withheld (or why the list is not cut). Optional query searches signatures by method name.
list_image_versionsreadReleased sandbox image tags (X.Y.Z) from the live registry, newest first, plus newest (the highest tag returned), promoted (the engine a new worklet gets, and what set_image_version pins when version is omitted) and the worklet's current pin. Optional filter (e.g. "0.76") and limit. 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. A warning in the result means publish_worklet will refuse the draft on the current pin.
delete_script_filescriptDelete a helper script (the entry script is protected).
publish_workletscriptPublish the draft as the next immutable version. Refused when the draft calls an engine helper the worklet's pin lacks - change the script, or trial a newer engine with dry_run_worklet({ imageVersion }) and pin it with set_image_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. Owner or org admin/manager only. Refused when the live scripts (the published version, or a never-published worklet's project) call an engine helper the new pin lacks; a warning in the result means publish_worklet will refuse the current draft on that pin. Clears any snapshot pin.
run_workletwriteQueue a run; defaults to useDraft=true so the sandbox loads the draft (engine 0.72.4 and newer; an older one loads the published version). 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 its attempt budget (maxAttempts, 1-5; attemptsRemaining) 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. Percent-encode each /-separated segment of path, including a name this listing returns: shared_files/Q3 100%.pdf is sent as shared_files/Q3%20100%25.pdf.
get_sandbox_file_linkreadMint a signed download URL for a sandbox file. Encode each segment of path as for list_sandbox_files.
upload_sandbox_file_linkwriteMint a signed PUT URL to upload a sandbox file. Encode each segment of path as for list_sandbox_files.

Organization server only

An organization key reaches every worklet, workflow and dataset in the org. Every worklet tool above takes a workletId there, except the three sandbox file tools, which act on the org's files, and read_context_doc, where it is optional. These tools exist only on the org server.

ToolWhat it does
list_workletsreadThe org's worklets, newest first, paged (20 by default, up to 100; pass nextCursor back as cursor), with an optional filter by name or state. 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, and autoRun: true when the link starts the fed rows by itself after the upstream run succeeds.
dispatch_grid_rowswriteRun the rows already queued and ready on a worklet's grid - one batch per call, at most the worklet's rows per run times its parallelism (5 rows by default); the rest stay ready. Takes an idempotency token you choose - resend the SAME one on a retry or the rows dispatch twice, and use a new one for the next batch.
create_grid_linkscriptWire one worklet's grid into another's so finished rows feed the next step. A link made here does not auto-run: the rows it feeds wait for Run ready, a schedule or dispatch_grid_rows. 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 as the key's owner, who must be an org admin or manager; a person previews it and publishes the site from the editor, because there is no publish tool. Saving drafts works on every plan; publishing the site needs an org admin or manager on a Pro or Enterprise plan. 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. Refused on a drop box. Org admin or manager.
set_dashboard_bindingsscriptSets which automations, file areas and tables the dashboard may use. Org admin or manager.
set_dashboard_brandscriptSets the colors, logo and fonts. Org admin or manager.
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, embed widgets and published dashboard sites 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