MetorialDocs

Set up Convex in Metorial for Claude, ChatGPT and Cursor

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'll 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

Sign-in methods

MethodTypeWhat a person provides
Deploy KeyAPI tokendeployKey
Team or Project OAuth (Legacy) (default)OAuthSigns 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:

ScopeNameWhat it allows
teamTeam AccessCreate and manage projects, deployments, and access all projects on the team
projectProject AccessCreate 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.

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.

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.

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

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 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.

Limit the tools

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

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:

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

Employee: connect Convex

In the portal

Open Convex in the catalog

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

Authenticate

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

Confirm

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

With the CLI

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.

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.

Check it worked

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