Integrations

MCP

Workflow integrates with Craft’s Model Context Protocol (MCP) server so an AI client can work through the submissions waiting for you. For example, you can ask a connected client which entries are waiting for your review, what a submitted draft changes, and then approve one or send another back to its editor with notes.

This integration requires Craft 5.12 or later. Workflow still works on earlier supported Craft versions, but its MCP tools aren’t available there.

Connecting a Client

Follow Craft’s MCP setup instructions (opens new window) to connect a client through the authenticated HTTP server or the local mcp/serve command. Workflow registers its tools automatically, and there’s no separate Workflow server to install or enable. These tools aren’t exposed through Craft’s public MCP server.

The client acts as the signed-in user, with the same Workflow role they have in the control panel. Their editor, reviewer and publisher groups, Workflow’s permissions and Craft’s entry permissions all apply, as described in Permissions. A connection authorised for read-only access can list and read submissions. Approving and rejecting also need write access, and are only available over HTTP, so the mcp/serve command can read submissions but not decide on them. Because mcp/serve runs with server access, Craft’s own draft tools used through it, such as drafts_apply or elements_update on a submitted draft, bypass Workflow’s approval steps, so connect over HTTP wherever Workflow’s review rules need to apply.

Reviewing Submissions

Workflow adds four tools for the review process.

ToolPurpose
workflow_submissions_listLists the pending submissions you can approve or reject now, oldest first. Accepts an optional siteId and a limit of up to 100.
workflow_submissions_getReads a submission with its entry or draft, a summary of what approving it would change on the live entry, and every review with its notes.
workflow_submissions_approveApproves a submission, with optional notes.
workflow_submissions_rejectRejects a submission and sends it back to its editor, with notes explaining what to change.

Each listed submission has a role of reviewer or publisher, which is the role you decide on it in. Reviewers only see a submission while it’s at their review stage. Publishers see every pending submission for the sites they publish, whatever its stage, and their role takes precedence when someone is both, as on the entry’s sidebar. A publisher doesn’t see their own submission unless they’re allowed to approve their own submissions.

The changes summary compares the submitted draft with the live entry, listing each changed attribute and custom field by name. Plain values such as titles and text fields include their old and new values. For fields with structured content, such as Matrix or relation fields, read the new values from the draft returned alongside it. A submission for a new entry lists every value as added, and a submission made from the entry itself, rather than a draft, has no changes summary.

Reviewers don’t need Workflow’s Submissions permission to use these tools, because they review entries from the entry’s sidebar. Anyone with that permission and Access Workflow can also read any submission with workflow_submissions_get, as they can on the Submissions screen.

Approving and Rejecting

Decisions go through the same checks and steps as the control panel. A reviewer’s approval records their review and passes the submission to the next review group, or to the publishers after the last one. A publisher’s approval publishes the entry, applying the submitted draft exactly as changing the submission’s status to Approved does, and needs Craft’s permission to save the live entry. Rejecting sends the submission back to its editor in either role. Workflow sends the same notifications it would for a decision made in the control panel, and Workflow’s events fire as usual.

When publisherNotesRequired is on for the entry’s site, a publisher’s approval needs notes, and the tool returns “Notes are required” without them. See Configuration for that setting.

Someone else may decide on a submission after your client has read it. To guard against that, pass the latestReviewId from workflow_submissions_get as expectedReviewId. The decision is then refused if the submission has a newer review, and the client can read it again first.

For example, these arguments to workflow_submissions_reject send submission 42 back to its editor:

{
  "submissionId": 42,
  "notes": "Please shorten the summary and link to the pricing page.",
  "expectedReviewId": 118
}

The client can’t edit the submitted content through these tools, and Workflow’s settings can’t be changed over MCP. To change a draft before approving it, open it in the control panel using the cpEditUrl from the submission.

Reading Submissions with Element Tools

Submissions are also available read-only through Craft’s elements_* tools with the type workflow-submissions. The submission reference handle also works. Use elements_list with criteria such as ownerId (the entry’s ID), ownerSiteId, isPending, isComplete, editorId, reviewerId and publisherId, and elements_get to read one. Each submission includes its status, which is the latest review’s status of pending, approved, rejected or revoked.

These tools need Workflow’s Submissions and Access Workflow permissions. For anyone without them, submissions don’t appear in Craft’s element tools or its search_query tool. Creating, updating and deleting submissions isn’t supported through these tools.