Set up Prisma in Metorial for Claude, ChatGPT and Cursor
Share Prisma with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or service token sign-in, 17 tools (10 read-only).
To give your team Prisma in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Prisma integration in a Metorial portal, and each person signs in to Prisma with their own account. Agents can manage Prisma Postgres projects, databases, connections, backups, and usage with the public REST API. The integration has 17 tools, 10 read-only, 3 write and 4 destructive, plus 2 triggers.
What you'll learn
- How an admin shares Prisma in a portal and how each person connects
- The 2 OAuth scopes Prisma can request, and what each one allows
- How to keep the 10 read-only tools and reject the other 7
Before you start
- A portal with at least one access group
- An account with Prisma for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Service Token | API token | serviceToken |
| OAuth (default) | OAuth | Signs in to Prisma |
The portal and metorial setup use OAuth unless someone picks another method.
Service Token
To connect, a person enters:
serviceToken: Prisma service token created in the Prisma Console under Integrations
OAuth
People sign in to Prisma and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
workspace:admin | Workspace Admin | Full access to manage workspaces, projects, and databases |
offline_access | Offline Access | Enables refresh tokens for long-lived sessions |
Setup settings
Whichever method you pick, setup also asks for:
workspaceId(optional): Default workspace ID to use for operations. If not set, the first available workspace will be used.
Use your own Prisma OAuth app
With your own OAuth app, people see your company's name on the Prisma 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 Prisma and copy the Redirect URI.
Register the app with Prisma
Create an OAuth app or client in Prisma 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 Prisma integration.
Admin: share Prisma 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 Prisma. Under Auth Method, keep OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Prisma as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Prisma.
Choose who gets it
Add the access groups that should see Prisma. 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 Prisma integration. Once it exists, check which groups have it:
Employee: connect Prisma
In the portal
Open Prisma in the catalog
Sign in to your portal and open Prisma. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Prisma 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
catalog search prints the catalog item ID. metorial setup uses OAuth. To connect with Service Token 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 Prisma 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 10 read-only tools, such as get_project and get_database, and lose the 3 write tools, such as create_project or create_database, and the 4 destructive tools, such as delete_project or delete_database.
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 17 tools, minus any you rejected. list_databases takes no input. It discovers accessible Prisma Postgres database IDs, names, regions, and projects.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (10)
get_project: Retrieve details of a specific project by its ID, including its associated databases and their connection information. NeedsprojectId.list_databases: Discover accessible Prisma Postgres database IDs, names, regions, and projects.list_workspaces: List all workspaces accessible to the authenticated user.get_database_usage: Retrieve Prisma Postgres operation and storage usage for a date range. NeedsdatabaseId.get_database: Retrieve detailed information about a specific Prisma Postgres database, including its connection strings, direct connection credentials, endpoints, and project association. NeedsdatabaseId.list_connections: List connections for a specific Prisma Postgres database, including direct, pooled, and Accelerate endpoints. NeedsdatabaseId.get_database_backups: Retrieve recent backup metadata for a Prisma Postgres database, including retention and whether more backups exist. NeedsdatabaseId.get_current_user: Identify the authenticated Prisma user, workspace, and credential type.list_regions: Discover Prisma Postgres region IDs and availability before provisioning a database.list_projects: Discover accessible Prisma projects with their IDs, names, workspace, and default region.
Write tools (3)
create_database: Create a new Prisma Postgres database within an existing project. NeedsprojectId,nameandregion.create_connection: Create a new connection string for a Prisma Postgres database. NeedsdatabaseId.create_project: Create a new project with a default Prisma Postgres database. Needsname.
Destructive tools (4)
transfer_project: Transfer a project (including all its databases) to another user's workspace. NeedsprojectIdandrecipientAccessToken.delete_connection: Delete a connection string from a Prisma Postgres database. NeedsconnectionId.delete_database: Permanently delete a Prisma Postgres database. NeedsdatabaseId.delete_project: Permanently delete a Prisma project and its resources.
Triggers
Prisma has 2 triggers, which fire on events in Prisma:
database_changes: Polls for new, updated, or deleted Prisma Postgres databases.inbound_webhook
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Prisma there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Prisma on metorial.com: the integration overview