MCP
Formie integrates with Craft’s Model Context Protocol (MCP) server so an AI client can look up your forms, read submissions, count them and help you work through spam. For example, you can ask a connected client how many enquiries your Contact form received last month, then have it review the submissions marked as spam and move the genuine ones back to your inbox.
This integration requires Craft 5.12.1 or later. Formie 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. Formie registers its tools automatically, so there’s no separate Formie server to install or enable. These tools aren’t exposed through Craft’s public MCP server.
The client acts as the signed-in user and follows the same submission permissions as the control panel, form by form. A user needs View submissions for a form (directly, through its form group or for all submissions) to read its submissions, Save submissions to mark them as spam or not spam, and Delete submissions to delete them. Restoring a deleted submission needs Save submissions, as it does in Craft. On a multi-site install, the user also needs access to the site a submission was made on, the same as on the submissions index. An HTTP connection authorised for read-only access can only read. Changing anything also needs write access.
Forms are read-only over MCP. A client can look at a form and its fields, but forms are only created, edited, deleted and restored in the control panel.
Working with Submissions
Start with formie_forms_list to find the form IDs and handles you can work with, and what you can do with each form’s submissions. Then use Craft’s elements_* tools with the type formie-submissions. The submission reference handle also works.
| Tool | Purpose |
|---|---|
elements_schema | Describes the supported query criteria and the one attribute you can change. |
elements_list | Finds submissions using criteria such as formId, isSpam, isIncomplete, statusId, after and before. |
elements_get | Reads an individual submission with all of its field values. |
elements_update | Marks a submission as spam or not spam, using the isSpam attribute. |
elements_validate | Checks a submission against the form’s validation rules without saving it. |
elements_delete | Deletes a submission. |
elements_restore | Restores a deleted submission. |
Like the submissions index, elements_list leaves out spam and incomplete submissions unless you ask for them. Pass "isSpam": true to list only spam, or "isSpam": null to include it, and use isIncomplete the same way. To find submissions made in November on the form with ID 12, call elements_list with these arguments:
{
"type": "formie-submissions",
"criteria": {
"formId": 12,
"after": "2026-11-01",
"before": "2026-12-01"
},
"fields": null
}Field Values
Submission field values appear alongside the submission’s own attributes, keyed by field handle. elements_get includes every value. elements_list leaves them out to keep the results short, so pass "fields": null for every value or a list of handles, such as ["email", "message"], for just those. Group fields return an object of their inner fields, and Repeater fields return a list of rows.
Some values are adjusted before a client sees them. Password fields are masked, the same as in exports. Signature fields return true or false for whether the person signed, rather than the image. Uploaded files and fields that relate other elements, such as Entries or Users fields, return a short summary of each element (its type, ID and status), and only the elements the user can view in Craft. Fetch an element’s details with elements_get and its own type. Values from encrypted fields that can’t be decrypted in the current environment show as [encrypted: unavailable].
Field values can’t be changed over MCP. Edit a submission in the control panel instead.
Spam and Deleting
To mark a submission as genuine, call elements_update with its ID and these attributes:
{
"type": "formie-submissions",
"id": 345,
"attributes": {
"isSpam": false
}
}This only changes the submission’s spam state. Formie doesn’t send the form’s email notifications or run its integrations for it, so use Set spam → Unmark as Spam on the submissions index in the control panel when you need those to run. It asks whether to send them.
elements_delete moves a submission to the trash, where elements_restore can bring it back. Passing "hardDelete": true deletes it permanently, and its uploaded files are handled the same way as a permanent deletion in the control panel.
Working with Forms
Use the type formie-forms, or the form reference handle, with elements_list and elements_get to read the forms you can view. Each form includes its handle, status and form group, and elements_get adds formFields, which lists the handle, label, type and whether each field is required. Use those handles to read field values from the form’s submissions.
formie_forms_list also includes forms whose submissions you can view without access to the form itself, so it’s the better starting point for submission work. Pass "withFields": true to include each form’s fields.
Formie Tools
| Tool | Purpose |
|---|---|
formie_forms_list | Lists the forms you can view, or whose submissions you can view, with their IDs, handles and the submission permissions you have for each. |
formie_submissions_summary | Counts submissions for each form, optionally for one form (by handle or ID) and a date range with after and before. |
formie_spam_triage | Lists spam submissions, newest first, with their spam reasons and field values, so a client can review them. Accepts a form, a date range, limit and offset. |
formie_submissions_summary returns four counts for each form and for all of them together. total counts every submission, complete counts finished submissions that aren’t spam, incomplete counts unfinished ones that aren’t spam, and spam counts everything marked as spam. Deleted submissions aren’t counted. For example, these arguments count last month’s submissions to a form with the handle contactForm:
{
"form": "contactForm",
"after": "2026-11-01",
"before": "2026-12-01"
}Dates in after are included and dates in before are not, so the example covers all of November. All three tools only include forms and submissions you can view, and formie_spam_triage reports a nextOffset when there are more spam submissions to fetch.