# MCP for AI apps

Entayo CRM speaks **MCP** (Model Context Protocol), so an AI app — Claude, ChatGPT,
Cursor and others — can search your contacts, add people, manage lists, log
activities and create tasks for you. Each tool makes one call to the CRM's own
API, as you, with the same rights and refusals as the screens.

You can reach the tools in two places:

| | Address | Sign in with |
|---|---|---|
| **The CRM's own MCP** | `https://<region>.zocton.com/entayo-crm/api/mcp` (`apac`, `eu` or `na`) | Sign-in (OAuth), a Zocton API key or an Entayo CRM API key |
| **The Zocton MCP** | One connection for every Zocton app | See [Zocton MCP](https://www.zocton.com/docs/shared/mcp) |

Both have the same tools, with the same names and inputs. In the Zocton MCP each
description starts with *Entayo CRM:*.

## Connect

**With sign-in (Claude.ai, ChatGPT and other apps with custom connectors).** Copy
the **Connector address** from Entayo CRM → Settings → **AI Connections**, add it as
a custom connector, and sign in. You choose **Read and change** or **Read only**.
See [AI connections](https://www.entayo.com/docs/features/ai-connections).

**With a key (Claude Code, Cursor and other apps that send a header).** Send
`Authorization: Bearer <key>` — see [Authentication](https://www.entayo.com/docs/developers/entayo-crm/authentication).
For Claude Code:

```bash
claude mcp add --transport http entayo https://apac.zocton.com/entayo-crm/api/mcp \
  --header "Authorization: Bearer zk_…"
```

**Through the Zocton MCP.** Follow [Zocton MCP](https://www.zocton.com/docs/shared/mcp);
the CRM tools come with it.

## How it works

- Every tool takes an optional `project_id` (from `crm_list_projects`). Left out,
  it works in your **Default** project.
- Records have two ids: `id` (the **master id**, used for lists) and `entity_id`
  (the **record id**, used by every record, activity and task tool).
- A **read-only** connection sees only the read tools.
- What a tool adds is marked as made by AI: activities are logged by AI, tasks are
  created by AI.
- If the CRM refuses a call, the tool answers with the reason, so the app can put
  it right.

## Tools

### Account

| Tool | What it does | Inputs |
|---|---|---|
| `crm_whoami` | Whose CRM this is: id, name, email, role. | — |
| `crm_list_projects` | Your projects, and which is Default. | — |

### Records

| Tool | What it does | Inputs |
|---|---|---|
| `crm_list_fields` | The columns of People or Companies, custom ones too. Read before creating or updating. | `kind` |
| `crm_search_records` | Search People or Companies. | `kind`; optional `search`, `list_id`, `filters`, `any_of`, `in_list_ids`, `exclude_list_ids`, `fields`, `sort`, `page`, `limit` |
| `crm_count_records` | Count matches, or count per value of a column (e.g. per country). | `kind`; the same filters as search; optional `group_by`, `top`, `split` |
| `crm_get_record` | One record with every field, stage, follow-up, lists and links. | `record_id` |
| `crm_create_record` | Add a person or company. | `kind`, `values` (field slug → value) |
| `crm_import_records` | Add or update up to 500 people or companies in one call, matched the way a CSV import matches them (people by email, then name and company, LinkedIn or phone). A person or company you already have keeps every value; only its empty fields are filled. Answers how many were added, matched and put in the list — not their ids. | `kind` (`person` or `company`), `records` (each field slug → value); optional `list_id`, `source` (default *Zocton Easy Mode*) |
| `crm_update_record` | Change a record; only what you give changes. | `record_id`; optional `field_values`, `kanban_stage_id`, `follow_up_date` (e.g. `in 5 days 5 PM`, or `null` to clear), `notes` |
| `crm_delete_record` | Delete a record with its activity and tasks. Cannot be undone. | `record_id` |

### Pipeline

| Tool | What it does | Inputs |
|---|---|---|
| `crm_list_entity_types` | The record types, with ids for `crm_list_stages`. | — |
| `crm_list_stages` | Pipeline stages of a record type, with ids for `kanban_stage_id`. | `entity_type_id` |

### Lists

| Tool | What it does | Inputs |
|---|---|---|
| `crm_list_lists` | Your lists: id, name, kind, size. | optional `kind` (`person` or `company`) |
| `crm_create_list` | A new list, with members if you like. | `name`, `kind`; optional `master_ids` |
| `crm_list_members` | Who is in a list. | `list_id` |
| `crm_add_to_list` | Put records in a list, by master id. | `list_id`, `master_ids` |
| `crm_remove_from_list` | Take records out of a list. The records are kept. | `list_id`, `master_ids` |
| `crm_rename_list` | Rename a list or segment. | `list_id`, `name` |
| `crm_copy_list` | Copy a list with its records into another project (or the same one). People the target already has, by email, are reused. `mode: move` then deletes the source list, never its records. | `list_id`, `target_project_id`; optional `source_project_id`, `name`, `mode` (`copy` or `move`) |

### Activity

| Tool | What it does | Inputs |
|---|---|---|
| `crm_list_activity_types` | Activity types (Email, Call, Meeting …) with ids. | — |
| `crm_list_activities` | A record's activity, newest first. | `record_id`; optional `page`, `limit` |
| `crm_log_activity` | Log a call, meeting, note or email on a record. | `record_id`, `activity_type_id`; optional `direction` (`inbound`, `outbound`, `internal`), `subject`, `body` |

### Tasks

| Tool | What it does | Inputs |
|---|---|---|
| `crm_list_tasks` | Tasks, soonest due first. | optional `status`, `record_id`, `search`, `page`, `limit` |
| `crm_create_task` | A task, on a record or on its own. | `title`; optional `description`, `record_id`, `due_date`, `priority` (`low`, `medium`, `high`, `urgent`) |
| `crm_update_task` | Change a task; only what you give changes. | `task_id`; optional `title`, `description`, `status`, `priority`, `due_date` |

**Filters** in `crm_search_records` and `crm_count_records`: `filters` is a list of
`{ "field", "op", "value" }` that must all hold; `any_of` is a list of such groups,
of which one must hold. `op` is one of `eq`, `neq`, `in`, `not_in`, `contains`,
`not_contains`, `contains_any`, `not_contains_any`, `contains_all`, `starts_with`,
`ends_with`, `gt`, `gte`, `lt`, `lte`, `between`, `is_empty`, `not_empty`. Field
names are the slugs from `crm_list_fields`.

## Example

Ask your AI app:

> In my Entayo CRM, how many people do we have per country? Then make a list
> called "Germany CTOs" of the people in Germany whose title contains CTO, and
> add a task for me to call the first one on Friday.

The app calls `crm_count_records` with `group_by: "country"`, then
`crm_search_records` with
`filters: [{"field":"country","op":"eq","value":"Germany"},{"field":"title","op":"contains","value":"CTO"}]`,
then `crm_create_list` with their master ids, and `crm_create_task` with a
`record_id` and a `due_date`. Each step is one call, and the app asks you before it
deletes or changes many records.

## Good to know

- Each data centre has its own address; a key or connection works only in yours.
- Text in your CRM records is treated as data from your customers, never as
  instructions to the app.
- The tools do not send campaigns, import files (`crm_import_records` takes records, not a file), change settings
  or manage keys.
  For those, use the screens or the [API reference](https://www.entayo.com/docs/api/entayo-crm).
- A read-only Zocton API key is refused at the CRM's own MCP address. Use a
  **Read only** AI connection instead.

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

## FAQ

<details>
<summary>Where can an AI app reach the CRM tools?</summary>

At the CRM's own MCP address, or through the Zocton MCP. Both have the same tools.

</details>
<details>
<summary>Can an AI app send campaigns or import files?</summary>

No. For those, use the screens or the [API reference](https://www.entayo.com/docs/api/entayo-crm).

</details>
<details>
<summary>Does a read-only Zocton key work at the CRM's own MCP address?</summary>

No. Use a **Read only** AI connection instead.

</details>

</section>
