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

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

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

---

To give your team Plain in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Plain integration in a Metorial portal, and each person connects with an API key. Agents can manage customer support customers, threads, conversations, internal notes, labels, companies, tenants, and customer groups. The integration has 27 tools, 12 read-only, 14 write and 1 destructive, plus 3 triggers.

**What you will learn**

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

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An API key from Plain 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`: Plain API key (created under Settings > Machine Users)

## Admin: share Plain 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 Plain. 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 Plain.

4. **Choose who gets it**

   Add the access groups that should see Plain. 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 Plain integration. Once it exists, check which groups have it:

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

## Employee: connect Plain

### In the portal

1. **Open Plain in the catalog**

   Sign in to your portal and open Plain. 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 plain
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Plain 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 plain
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 12 read-only tools, such as `get_tenant` and `get_thread`, and lose the 14 write tools, such as `send_email` or `create_note`, and the destructive tool `delete_customer`.

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 plain
metorial tools <integration-id>
metorial call <integration-id> list_threads -d '{}'
```

`metorial tools` lists the 27 tools, minus any you rejected. `list_threads` takes no input. It lists support threads with optional filtering by status, customer, or tenant.

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

## Tools

### Read-only tools (12)

- `list_threads`: List support threads with optional filtering by status, customer, or tenant.
- `list_label_types`: List all available label types in the workspace.
- `list_customer_groups`: List all customer groups in the workspace.
- `list_customers`: List customers in your Plain workspace with optional pagination.
- `get_customer`: Look up a single customer by ID, email, or external ID.
- `get_thread`: Retrieve a single support thread by ID. Needs `threadId`.
- `list_thread_timeline`: Read a thread’s messages, internal notes, custom events, and other timeline entries with cursor pagination.
- `list_users`: List workspace team members and their IDs for assign_thread.
- `list_companies`: List companies and their IDs and domains for update_customer_company.
- `get_current_user`: Identify the machine user and workspace associated with the API key.
- `get_tenant`: Get a tenant by its ID from list_tenants, including its external ID, URL, tier, and timestamps.
- `list_tenants`: List tenants and their IDs, external IDs, and tiers for customer membership and thread operations.

### Write tools (14)

- `manage_customer_tenants`: Add or remove a customer from tenants. Needs `customerId`.
- `update_customer_company`: Change a customer's associated company. Needs `customerId`.
- `upsert_customer`: Create or update a customer in Plain. Needs `identifier` and `onCreate`.
- `create_thread`: Create a new support thread for a customer. Needs `title`, `customerId` and `components`.
- `update_thread_status`: Change a thread's status to Todo, Done, or Snoozed. Needs `threadId` and `status`.
- `reply_to_thread`: Send a reply to an existing thread. Needs `threadId` and `components`.
- `manage_thread_labels`: Add or remove labels on a thread. Needs `threadId`.
- `upsert_tenant`: Create or update a tenant. Needs `identifier` and `name`.
- `create_timeline_event`: Create a custom event on a customer's timeline or on a specific thread. Needs `title` and `components`.
- `send_email`: Send a new email to a customer. Needs `customerId` and `subject`.
- `manage_customer_groups`: Add or remove a customer from customer groups. Needs `customerId`.
- `change_thread_priority`: Change the priority level of a support thread. Needs `threadId` and `priority`.
- `assign_thread`: Assign or unassign a support thread. Needs `threadId`.
- `create_note`: Create an internal note visible only to your team.

### Destructive tools (1)

- `delete_customer`: Permanently delete a customer from Plain. Needs `customerId`.

## Triggers

Plain has 3 triggers, which fire on events in Plain:

- `message_events`: Triggers when messaging events occur on threads: emails sent/received, Slack messages, chat messages, Discord messages, MS Teams messages, or internal notes created.
- `thread_events`: Triggers when thread lifecycle events occur: created, status changed, assigned/unassigned, labels changed, priority changed, SLA status transitioned, or thread fields modified.
- `customer_events`: Triggers when customer lifecycle events occur: customer created, updated, deleted, or customer group membership changes.

## 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 Plain there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Plain on metorial.com](https://metorial.com/integrations/plain): the integration overview