Route Prisma Postgres MCP traffic through Formal to control and log what AI agents do in Prisma Postgres:
Under OAuth app, choose one of the two options.
The rule matches known agents only.
See Identity headers.Cloud agents such as Claude, ChatGPT and Cursor Cloud Agents don’t run the Endpoint.
Point them at this server’s Connector address, See MCP resources for the
- Block risky tools, such as
DeleteDatabaseTool. - Mask sensitive data in tool results, such as emails and phone numbers in
ExecuteSqlQueryToolresponses. - Keep credentials at the Connector, so users and agents never see Prisma Postgres tokens.
- Log every tool call with the user, the MCP client and its parameters.
0. Prepare your Connector
The Connector needs an MCP listener and a hostname with wildcard DNS and TLS. Set them up once by following Deploy the Connector. Every MCP server reuses them.1. Add Prisma Postgres MCP server to your Resources
- UI
- Terraform
- Pulumi
- API
- Open the Admin Catalog and click Add MCP.
- Select the Prisma Postgres template.
- Enter a DNS-label Name, such as
prisma. - Choose the Space containing your Connector, such as
default. - Configure upstream authentication as described below, then save.
No Connector is in this server's Space.2. Setup Authentication
- Linked Accounts (Recommended)
- Pass Through
Each user links their own Prisma Postgres account once in the Employee Catalog, and the Connector sends that user’s token to Prisma Postgres.

1. Formal’s App (default)
Formal has a registered OAuth app with Prisma Postgres, so you register nothing. Users see Formal on Prisma Postgres’s consent screen.2. Your OAuth App
Users see your app’s name on Prisma Postgres’s consent screen.Set up your own Prisma Postgres OAuth app
Set up your own Prisma Postgres OAuth app
See Prisma Postgres OAuth documentation and register an app.
1
Register an application
Open Prisma Console, select Integrations, then click New Application under Published Applications.
2
Set the callback
Enter a Name and paste Formal’s Redirect URI into Prisma’s Redirect URI field.
3
Create and copy credentials
Click Continue, then immediately copy Client ID and Client Secret. You can skip the client secret. Formal then authenticates with PKCE alone.
4
Choose scopes
Request
workspace:admin; add offline_access when refresh tokens are needed.5
Enter the app in Formal
- UI
- Terraform
- Pulumi
- API
Back in the Admin Catalog, enter the Client ID and Client secret, then save.
Users then link their accounts on the Prisma Postgres server’s page in the Employee Catalog.

3. Route Endpoint traffic
Auth is managed at the Connector level when you use Linked Accounts or Shared Credentials, so the Endpoint needs to forward the MCP traffic to it. Laptops and VMs with the Formal Endpoint keep usinghttps://mcp.prisma.io/mcp, and a network rule sends that traffic to the Connector.- UI
- Terraform
- Pulumi
- API
- Go to Network Rules and create a rule named
prisma-mcp. - Paste this expression, set the rule to Active, then save:
https://prisma.<connector-hostname>/mcp.
Find it in the Admin Catalog: open Prisma Postgres, then copy Connector address on the Configuration tab.4. Create policies
Tools
The Admin Catalog lists these tools for Prisma Postgres:Policies examples
- Block a tool
- Mask a tool's output
This policy blocks the tools that change data, so agents can only read Prisma Postgres.
input.mcp fields and Rewrite Action for body rewrites.5. Check the logs
Open Logs and search forresource.name:prisma.
Each Prisma Postgres tool call is one request log with the user, the MCP client and the tool.
Open a log to see its tool parameters and the policies it triggered.
A blocked write shows the block policy and its message.
A masked search shows the rewrite policy.See Logs for search syntax and filters.Troubleshooting
The agent says Formal has no current sign-in
The agent says Formal has no current sign-in
The agent relays:
Formal has no current prisma sign-in for you. Link or re-link your prisma account in Formal…Cause: The user never linked Prisma Postgres, or the token expired and couldn’t be refreshed.Fix: Open the server in the Employee Catalog and link Prisma Postgres again.The agent says Prisma Postgres rejected your credentials
The agent says Prisma Postgres rejected your credentials
The agent relays:
prisma rejected your credentials. Link or re-link your prisma account in Formal…Cause: Prisma Postgres no longer accepts the linked token, for example after the user revoked access in Prisma Postgres.Fix: Link Prisma Postgres again from the Employee Catalog.Laptop traffic doesn't appear in Logs
Laptop traffic doesn't appear in Logs
Cause: The Endpoint isn’t running, or the network rule doesn’t match the client.Fix: Check the Endpoint is connected. The rule above only matches known agents. Other clients, such as a browser, reach Prisma Postgres directly unless the rule also matches them. See Network rules.
MCP clients can't connect directly yet
MCP clients can't connect directly yet
Cause: The Configuration tab lists the reason, most often
No Connector is in this server's Space.Fix: Edit the server and choose the Space containing its Connector.Next Steps
MCP Gateway
Configure Connector routing and downstream access
All MCP servers
Browse every MCP server template

