> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up 2Chat in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/2chat
Last updated: 2026-11-24

Share 2Chat with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 12 tools (7 read-only).

---

To give your team 2Chat in Claude, ChatGPT, Cursor and other AI clients, an admin shares the 2Chat integration in a Metorial portal, and each person connects with an API key. Agents can send and receive WhatsApp messages (text, images, audio, video, PDFs) to individuals and groups. The integration has 12 tools, 7 read-only, 4 write and 1 destructive, plus 8 triggers.

**What you will learn**

- How an admin shares 2Chat in a portal and how each person connects
- What 2Chat asks for when you connect, and where to find it
- How to keep the 7 read-only tools and reject the other 5

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An API key from 2Chat for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

| Method | Type | What a person provides |
| --- | --- | --- |
| **API Key** | API token | `token` |

### API Key

To connect, a person enters:

- `token`: Your 2Chat API key. Generate one at https://app.2chat.io/developers?tab=api-access

## Admin: share 2Chat in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose 2Chat. For how members connect, choose **Each person connects** so everyone enters their own API key, or **Shared connection** to enter one API key for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from 2Chat.

4. **Choose who gets it**

   Add the access groups that should see 2Chat. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user 2Chat integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search 2chat
```

## Employee: connect 2Chat

### In the portal

1. **Open 2Chat in the catalog**

   Sign in to your portal and open 2Chat. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your API key (token).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search 2chat
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your 2Chat connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list 2chat
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 7 read-only tools, such as `list_contacts` and `get_account_info`, and lose the 4 write tools, such as `manage_contacts` or `send_group_message`, and the destructive tool `delete_whatsapp_message`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list 2chat
metorial tools <integration-id>
metorial call <integration-id> list_whatsapp_numbers -d '{}'
```

`metorial tools` lists the 12 tools, minus any you rejected. `list_whatsapp_numbers` takes no input. It retrieves a page of WhatsApp numbers connected to your 2Chat account.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (7)

- `list_whatsapp_numbers`: Retrieve a page of WhatsApp numbers connected to your 2Chat account.
- `list_whatsapp_groups`: List all WhatsApp groups for a connected number, or get the participants of a specific group. Needs `fromNumber`.
- `get_whatsapp_messages`: Retrieve WhatsApp messages for a connected number. Needs `fromNumber`.
- `check_whatsapp_number`: Verify whether a phone number is registered and active on WhatsApp. Needs `fromNumber` and `toNumber`.
- `get_whatsapp_number`: Get the connection status, identity and settings of a connected WhatsApp number.
- `list_contacts`: Browse a page of contacts in your 2Chat account, optionally limited to a connected WhatsApp channel.
- `get_account_info`: Retrieve the account information available to your API key and verify your connection to 2Chat.

### Write tools (4)

- `send_whatsapp_message`: Send a text or media message to a WhatsApp user. Needs `fromNumber` and `toNumber`.
- `manage_whatsapp_group`: Create a WhatsApp group or manage group membership and settings. Needs `action` and `fromNumber`.
- `send_group_message`: Send a text or media message to a WhatsApp group. Needs `fromNumber` and `groupUuid`.
- `manage_contacts`: Create new contacts or search existing contacts in your 2Chat directory. Needs `action`.

### Destructive tools (1)

- `delete_whatsapp_message`: Request deletion of a WhatsApp message. Needs `fromNumber` and `messageUuid`.

## Triggers

2Chat has 8 triggers, which fire on events in 2Chat:

- `whatsapp_group_event`: Triggers on WhatsApp group activity: messages received, reactions, and membership changes (joins, leaves, removals).
- `whatsapp_message`: Triggers when a WhatsApp message is received, sent, edited, or reacted to.
- `whatsapp_number_status`: Triggers when a connected WhatsApp number changes status (e.g., ready, disconnected, loading, initializing, qr-received).
- `whatsapp_message_receipt`: Triggers when a sent WhatsApp message status changes: sent (in transit), received (delivered), or read by the recipient.
- `phone_call_event`: Triggers on phone call lifecycle events: status updates, incoming call completions, and outbound call completions.
- `whatsapp_new_conversation`: Triggers when a new WhatsApp conversation is started.
- `whatsapp_order_received`: Triggers when a new WhatsApp order is received from a customer.
- `whatsapp_call`: Triggers when a WhatsApp call is received or made from a connected number.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use 2Chat there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [2Chat on metorial.com](https://metorial.com/integrations/2chat): the integration overview