Set up 2Chat in Metorial for Claude, ChatGPT and Cursor
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'll 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 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, 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
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from 2Chat.
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:
Employee: connect 2Chat
In the portal
Open 2Chat in the catalog
Sign in to your portal and open 2Chat. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. In the setup window, enter your API key (token).
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
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.
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.
Check it worked
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. NeedsfromNumber.get_whatsapp_messages: Retrieve WhatsApp messages for a connected number. NeedsfromNumber.check_whatsapp_number: Verify whether a phone number is registered and active on WhatsApp. NeedsfromNumberandtoNumber.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. NeedsfromNumberandtoNumber.manage_whatsapp_group: Create a WhatsApp group or manage group membership and settings. NeedsactionandfromNumber.send_group_message: Send a text or media message to a WhatsApp group. NeedsfromNumberandgroupUuid.manage_contacts: Create new contacts or search existing contacts in your 2Chat directory. Needsaction.
Destructive tools (1)
delete_whatsapp_message: Request deletion of a WhatsApp message. NeedsfromNumberandmessageUuid.
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, Cursor, Codex and ChatGPT: connect each client to your portal and use 2Chat there
- Tool permissions: tool filters and what employees see
- 2Chat on metorial.com: the integration overview