# MCP for AI assistants

The **Zocton MCP** lets an AI assistant that supports MCP (the Model Context Protocol)
work in your TurboWorkflow: list workflows and their numbers, read lists and replies,
build a workflow, write each contact's email, check it and start it. It is for anyone who
would rather ask than click.

## Where to find it

Connect your AI assistant to the Zocton MCP — see
[Connect to the Zocton MCP](https://www.zocton.com/docs/shared/mcp).

## Before you start

- An API key (it starts with `zk_`) or an MCP link that may **read TurboWorkflow** — and
  **write TurboWorkflow** for the tools that change or send anything. See
  [API keys](https://www.zocton.com/docs/shared/api-keys).
- For every tool except the first three, a key for **all your projects**: a key limited
  to chosen projects is refused for now.

## Authenticate

Connecting is the same for every Zocton app: follow
[Connect to the Zocton MCP](https://www.zocton.com/docs/shared/mcp). The tools act as you,
in your own TurboWorkflow — never in a team's — and see only your own projects.

Project ids (`zp_…`) come from the shared tool `zocton_list_projects`; sender ids (`zs_…`)
from `zocton_list_senders`.

## TurboWorkflow tools

### Workflows and numbers (read)

| Tool | What it does |
|---|---|
| `tw_list_workflows` | A project's workflows: id, name, status, section, how many contacts are running, last change |
| `tw_get_workflow` | One workflow's steps in order — type, label, archived, where each goes next, waits, conditions and filters (a filter's field and rule, never its values); no email content |
| `tw_workflow_queue` | The emails a workflow still has to send, soonest first: who, which email step and when, and how many are waiting in all. Never an email's subject or body |
| `tw_contact_status` | Where each contact in a workflow stands, latest activity first: their state, the step they are at, and what happened to their last email and when. Filter to those who replied, opened, clicked, bounced or unsubscribed — the totals match `tw_workflow_stats`. A page at a time; no email content |
| `tw_workflow_stats` | Contacts by state, and emails queued, delivered, opened, clicked, replied, bounced, failed, unsubscribed — overall and per email step |

### Lists, contacts and replies

| Tool | What it does |
|---|---|
| `tw_list_lists` | A project's lists to send to — the CRM's lists and segments and TurboWorkflow's own — with member counts |
| `tw_list_contacts` | A list's contacts with their fields and status, a page at a time, optionally filtered by text |
| `tw_update_contact` | Save research on a contact: names, company, time zone, email, custom fields; logged on their timeline |
| `tw_list_replies` | People who replied to your workflow emails in a project, newest first (email replies are not detected yet, so this is empty for now) |

### Build a workflow

| Tool | What it does |
|---|---|
| `tw_create_workflow` | Create a workflow in a project, optionally with its list and default email sender |
| `tw_set_workflow_list` | Attach a list to a workflow, or detach it |
| `tw_set_workflow_sender` | Set a workflow's default email, LinkedIn or WhatsApp sender |
| `tw_get_workflow_definition` | The workflow's full canvas — steps with their content, and the arrows |
| `tw_save_workflow_definition` | Save the canvas back — add, edit or archive steps, on a started workflow too (it keeps running — there is no need to pause it first); refuses what the live-workflow rules forbid, and says why; the answer says whether the workflow is running or paused |
| `tw_set_contact_emails` | Each contact's own subject, preview and body for one email step; replaces that step's imported emails |

A [Filter](/steps/filter) step in the definition `tw_save_workflow_definition` saves:

```json
{
  "id": "filter-not-switched",
  "type": "filter",
  "position": { "x": 640, "y": 0 },
  "data": {
    "label": "Not switched yet",
    "field": "email",
    "operator": "inList",
    "negate": false,
    "values": ["anna@example.com", "raj@example.com"]
  }
}
```

`field` is `email`, `fullName`, `firstName`, `lastName`, `mobilePhone`, `companyName` or any
field of the list. `operator` is `equals`, `inList`, `contains`, `startsWith` or `endsWith`;
the text rules take `value` instead of `values`; `negate: true` is **Not**. The two arrows out of
it carry `"sourceHandle": "yes"` (matches) and `"sourceHandle": "no"` (everyone else).

### Start and run

| Tool | What it does |
|---|---|
| `tw_preflight` | What would block starting the workflow with a list: missing merge values, sender, list problems |
| `tw_launch` | Start the workflow: now, at a time, or in batches |
| `tw_pause` | Pause a workflow; nothing more is sent until it is resumed. Only when you want sending stopped — never needed to add or change steps. The workflow page says when an assistant paused it |
| `tw_resume` | Resume a workflow; sending carries on |
| `tw_send_email` | Send one [individual email](/tools/individual-email) to a few people, each their own, now or at a time |

`tw_launch`, `tw_resume` and `tw_send_email` send real messages; a well-behaved assistant
asks you first.

## Worked example

You ask: *"In my Acme project, make a workflow called 'October follow-up' that emails the
'Webinar attendees' list from my Gmail sender, write each person their own email from
their notes, check it, and start it tomorrow at 9."*

1. `zocton_list_projects` → the Acme project, `zp_…`.
2. `tw_list_lists` with that project → the list's id. `zocton_list_senders` → the Gmail
   sender, `zs_…`.
3. `tw_create_workflow` with `project_id`, `name`, `list_id` and `sender_id` → the new
   workflow, with its starter steps.
4. `tw_get_workflow_definition` → the email step's id.
5. `tw_list_contacts` → each person's fields; the assistant writes their email.
6. `tw_set_contact_emails` with `workflow_id`, `node_id` and the emails.
7. `tw_save_workflow_definition` to switch that step to imported emails.
8. `tw_preflight` → nothing blocks.
9. You confirm. `tw_launch` with
   `timing: {"mode":"singleAbsolute","at":"2026-11-28T09:00:00+01:00"}`.

Later: *"How is it doing?"* → `tw_workflow_stats`.

## Good to know

- Every tool runs TurboWorkflow's own rules — the same checks as the app, and the same
  answers when something is refused.
- `tw_launch` timing is `{"mode":"now"}`, `{"mode":"singleAbsolute","at":…}`, or
  `{"mode":"batch","start":…,"perDay":…,"days":[…],"windowStart":"09:00","windowEnd":"17:00","tz":"Area/City"}`.
- The read tools never return a contact's details or an email's content;
  `tw_list_contacts` and `tw_get_workflow_definition` do, for building.
- To set one step's email from a script without an assistant, use the
  [Email ingest API](/developers/api).

## Related

- [Connect to the Zocton MCP](https://www.zocton.com/docs/shared/mcp) · [Email ingest API](/developers/api) · [Launch a workflow](/running/launch)

<section aria-labelledby="faq" class="faq">

## FAQ

<details>
<summary>Can an assistant start a workflow?</summary>

Yes, with `tw_launch` and write access — a well-behaved assistant asks you first.

</details>
<details>
<summary>Why are most tools refused with my key?</summary>

A key limited to chosen projects is refused for now. Give it all your projects.

</details>
<details>
<summary>Does the MCP work in a team's TurboWorkflow?</summary>

No. It acts in your own TurboWorkflow only.

</details>

</section>
