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

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

Share Convex with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or deploy key sign-in, 9 tools (5 read-only).

---

To give your team Convex in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Convex integration in a Metorial portal, and each person signs in to Convex with their own account. Invoke serverless queries, mutations, and actions on a reactive document-relational database. The integration has 9 tools, 5 read-only, 1 write and 3 destructive, plus 2 triggers.

**What you will learn**

- How an admin shares Convex in a portal and how each person connects
- The 2 OAuth scopes Convex can request, and what each one allows
- How to keep the 5 read-only tools and reject the other 4

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Convex for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **Deploy Key** | API token | `deployKey` |
| **Team or Project OAuth (Legacy)** (default) | OAuth | Signs in to Convex after entering `scopeLevel` |

Also available: **Team OAuth**, **Project OAuth**.

The portal and `metorial setup` use **Team or Project OAuth (Legacy)** unless someone picks another method.

### Deploy Key

To connect, a person enters:

- `deployKey`: Convex deploy key from the dashboard deployment settings

### Team or Project OAuth (Legacy)

Before the sign-in, setup asks for:

- `scopeLevel` (optional): Whether to authorize at team or project level One of "team", "project".

People sign in to Convex and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `team` | Team Access | Create and manage projects, deployments, and access all projects on the team |
| `project` | Project Access | Create deployments and access data/functions within a specific project |

### Setup settings

Whichever method you pick, setup also asks for:

- `deploymentUrl`: The Convex deployment URL (e.g. https://happy-animal-123.convex.cloud)

## Use your own Convex OAuth app

With your own OAuth app, people see your company's name on the Convex consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Convex and copy the **Redirect URI**.

2. **Register the app with Convex**

   Create an OAuth app or client in Convex and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Convex integration.

## Admin: share Convex 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 Convex. Under **Auth Method**, keep **Team or Project OAuth (Legacy)** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Convex as themselves.

3. **Limit the tools**

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

4. **Choose who gets it**

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

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

## Employee: connect Convex

### In the portal

1. **Open Convex in the catalog**

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

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Convex sign-in tab opens. Sign in and approve the permissions listed.

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 convex
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Team or Project OAuth (Legacy)**. To connect with **Deploy Key** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Convex 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 convex
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 5 read-only tools, such as `run_query` and `download_file`, and lose the write tool `generate_upload_url`, and the 3 destructive tools, such as `run_action` or `run_mutation`.

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

`metorial tools` lists the 9 tools, minus any you rejected. `list_documents` takes no input. It lists documents from a Convex table using the Streaming Export API snapshot endpoint.

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

## Tools

### Read-only tools (5)

- `get_document_deltas`: Retrieve incremental document changes (inserts, updates, deletes) from a Convex deployment using the Streaming Export API.
- `run_query`: Execute a Convex query function over HTTP. Needs `functionPath`.
- `list_documents`: List documents from a Convex table using the Streaming Export API snapshot endpoint.
- `get_deployment_info`: Identify the configured Convex deployment, including its project, team and deployment type when hosted in Convex Cloud.
- `download_file`: Download a Convex storage file using a deployed query that returns ctx.storage.getUrl(storageId).

### Write tools (1)

- `generate_upload_url`: Generate a temporary upload URL for uploading a file to Convex file storage.

### Destructive tools (3)

- `run_mutation`: Execute a Convex mutation function over HTTP. Needs `functionPath`.
- `run_action`: Execute a Convex action function over HTTP. Needs `functionPath`.
- `manage_environment_variables`: View or update environment variables for a Convex deployment.

## Triggers

Convex has 2 triggers, which fire on events in Convex:

- `inbound_webhook`
- `data_changes`: Polls for document-level changes (inserts, updates, deletes) across all tables in a Convex deployment using the Streaming Export API.

## 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 Convex there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Convex on metorial.com](https://metorial.com/integrations/convex): the integration overview