# Prisma — how to use (mcp.ai)

Prisma Data Platform provides database tools including Accelerate (global database cache), Optimize (AI-driven query analysis), and Prisma Postgres (managed PostgreSQL). Manage workspaces, projects, environments, and API keys programmatically.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_prisma?ms=1781541840000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `prisma_create_connection`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/prisma`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/prisma/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/prisma/create/connection` — Create new api key connection for database access. creates connection string with embedded credentials for application database access. returns complete connection details ready for immediate use.
  - body: { name: string, databaseId: string }
- `POST https://api.mcp.ai/api/prisma/create/database` — Create new postgres database in an existing prisma project. creates database in specified region with connection strings and api keys. returns complete database details ready for immediate use.
  - body: { name: string, region: string, isDefault?: boolean, projectId: string }
- `POST https://api.mcp.ai/api/prisma/create/project` — Create new prisma project with managed postgres database. creates project in authenticated user's workspace with postgres database in specified region. returns complete project details including conne
  - body: { name: string, region: string }
- `POST https://api.mcp.ai/api/prisma/delete/connection` — Permanently delete database connection and revoke api key access. warning: this immediately revokes database access for any applications using this connection string. ensure no critical systems depend
  - body: { id: string }
- `POST https://api.mcp.ai/api/prisma/delete/database` — Permanently delete prisma database and all stored data. warning: this action cannot be undone. all data in the database will be permanently destroyed. default databases typically cannot be deleted.
  - body: { databaseId: string }
- `POST https://api.mcp.ai/api/prisma/delete/project` — Permanently delete prisma project and all associated resources. warning: this action cannot be undone. all databases, environments, and project data will be permanently destroyed. use with extreme cau
  - body: { id: string }
- `POST https://api.mcp.ai/api/prisma/execute/sql/command` — Execute sql commands that modify database data or structure. runs insert, update, delete, create table, and other data modification commands safely through postgresql driver with parameterized query s
  - body: { command: string, parameters?: string[], connectionString: string }
- `POST https://api.mcp.ai/api/prisma/execute/sql/query` — Execute sql select queries against prisma databases. runs read-only queries safely through postgresql driver with automatic type mapping. perfect for data analysis, schema inspection, and reporting op
  - body: { query: string, parameters?: string[], connectionString: string }
- `POST https://api.mcp.ai/api/prisma/get/database` — Retrieve specific prisma database by id. returns database details including status, project context, and regional deployment. use for database monitoring, validation, and administrative operations.
  - body: { databaseId: string }
- `POST https://api.mcp.ai/api/prisma/get/project` — Retrieve specific prisma project by id. returns project details including name, creation timestamp, and workspace information. use for project detail views, validation, and administrative operations.
  - body: { id: string }
- `POST https://api.mcp.ai/api/prisma/inspect/database/schema` — Inspect database schema structure and table information. returns comprehensive schema details including tables, columns, data types, constraints, and relationships. essential for understanding databas
  - body: { tableName?: string, includeIndexes?: boolean, connectionString: string }
- `POST https://api.mcp.ai/api/prisma/list/accelerate/regions` — Retrieve all available regions for prisma accelerate. returns regions where accelerate global database cache can be deployed. use for cache region selection to minimize latency for your users.
- `POST https://api.mcp.ai/api/prisma/list/backups` — Retrieve list of available backups for a specific database. returns backup details including status, size, type, and restoration readiness. use for backup monitoring, restoration planning, and complia
  - body: { limit?: integer, databaseId: string }
- `POST https://api.mcp.ai/api/prisma/list/connections` — Retrieve paginated list of connections for a specific database. returns connection details including names, creation dates, and database context. use for api key management, security audits, and acces
  - body: { limit?: integer, cursor?: string, databaseId: string }
- `POST https://api.mcp.ai/api/prisma/list/databases` — Retrieve paginated list of databases for a specific prisma project. returns database details including status, region, and project context. use for database discovery, monitoring, and project administ
  - body: { limit?: integer, cursor?: string, projectId: string }
- `POST https://api.mcp.ai/api/prisma/list/postgres/regions` — Retrieve all available regions for prisma postgres. returns regions where prisma postgres databases can be deployed with current availability status. use for region selection during database creation 
- `POST https://api.mcp.ai/api/prisma/list/projects` — Retrieve paginated list of prisma projects accessible to authenticated user. returns project ids, names, workspace info, and timestamps with cursor-based pagination. use for project discovery, ui sele
  - body: { limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/prisma/list/workspaces` — Retrieve paginated list of prisma workspaces accessible to authenticated user. returns workspace ids, names, creation timestamps with cursor-based pagination. use for workspace discovery, ui selection
  - body: { limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/prisma/restore/backup` — Restore database backup to new database instance. creates new database from existing backup with specified name. operation is asynchronous - monitor the returned database status for completion. restor
  - body: { backupId: string, databaseId: string, targetDatabaseName: string }
- `POST https://api.mcp.ai/api/prisma/transfer/project` — Transfer prisma project ownership to another user. changes project ownership to recipient specified by their access token. current owner loses access unless explicitly granted by new owner.
  - body: { id: string, recipientAccessToken: string }

## More
- Page: https://mcp.ai/prisma
- Agent spec (llms.txt): https://mcp.ai/prisma/llms.txt
- Postman collection: https://mcp.ai/prisma/postman.json
