
Prisma MCP
OfficialPrisma's official MCP: run migrations, provision Prisma Postgres, execute SQL and manage backups from your agent.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y prisma mcpPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"prisma-mcp": {
"command": "npx",
"args": [
"-y",
"prisma",
"mcp"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js with npx
- A Prisma project (schema + datasource) for the local migrate tools
- A Prisma Console account (console.prisma.io) for Prisma Postgres provisioning and all remote tools
About Prisma MCP
The local server is a thin, predictable wrapper over the Prisma CLI: each tool maps to a documented command (migrate-dev runs prisma migrate dev --name <name> with the agent supplying the name, Create-Prisma-Postgres-Database runs init --db, Prisma-Studio opens Studio). Because it ships inside the prisma npm package, there is nothing separate to install or version — npx -y prisma mcp always matches your CLI.
The remote server is hosted behind OAuth: connecting through mcp-remote pops a Prisma Console login, after which the agent can manage Prisma Postgres databases — backups, recovery into new databases, connection strings — and run SQL or introspect schemas on them. The README suggests Cloudflare's AI Playground as a quick way to try it: paste https://mcp.prisma.io/mcp, connect, and authenticate.
Which to use is a clean split. Local: migrations and schema work in the repo you have open, provisioning dev databases, opening Studio. Remote: fleet-style management of Prisma Postgres without a local CLI, or embedding database management into an AI platform your users drive.
Limits to know: the local migrate tools operate on whatever datasource your Prisma schema points at, while the database-provisioning and all remote tools are Prisma-Postgres-specific — this is not a generic any-Postgres admin server. Config examples exist for VS Code, Cursor, Windsurf, Warp, Claude Desktop and Claude Code (claude mcp add prisma-local npx prisma mcp).
Tools & capabilities (17)
migrate-statusLocal: check migration status via prisma migrate status.
migrate-devLocal: create and run a migration via prisma migrate dev --name <name>.
migrate-resetLocal: reset the database via prisma migrate reset --force (destructive).
Prisma-Postgres-account-statusLocal: check Prisma Console authentication status.
Create-Prisma-Postgres-DatabaseLocal: create a new Prisma Postgres database with name and region.
Prisma-LoginLocal: authenticate with the Prisma Console.
Prisma-StudioLocal: open Prisma Studio to browse data.
ListDatabasesToolRemote: list Prisma Postgres databases in your workspace.
ExecuteSqlQueryToolRemote: execute a SQL query on a Prisma Postgres database.
IntrospectSchemaToolRemote: introspect the schema of a Prisma Postgres database.
CreateBackupToolRemote: create a managed Prisma Postgres backup.
CreateRecoveryToolRemote: restore a backup into a new database.
ListBackupsToolRemote: list available backups for a database and environment.
CreateConnectionStringToolRemote: create a connection string for a database.
ListConnectionStringsToolRemote: list connection strings for a database.
DeleteConnectionStringToolRemote: delete a connection string.
DeleteDatabaseToolRemote: delete a Prisma Postgres database.
What this server can do
Prisma MCP provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Create and apply a schema migration by prompt, with the agent naming it (migrate-dev)
- Provision a fresh Prisma Postgres database in a chosen region for a new project
- Introspect a Prisma Postgres schema and run analytical SQL against it (remote)
- Create a backup before a risky change, then restore it into a new database if needed
Quick setup
- 1Local: add command npx with args -y prisma mcp under mcpServers in your client config
- 2Remote: add command npx with args -y mcp-remote https://mcp.prisma.io/mcp and complete the Prisma Console OAuth popup
- 3Claude Code users: claude mcp add prisma-local npx prisma mcp (or prisma-remote with mcp-remote)
- 4Verify with a prompt like: Check my migration status, or: Log me into the Prisma Console
Security notes
migrate-reset runs prisma migrate reset --force, which wipes and recreates the target database — keep the local server pointed at development databases. The remote server acts on your Prisma Console account after OAuth (create/delete databases, run arbitrary SQL via ExecuteSqlQueryTool), so treat those tools as production-grade access.
Prisma MCP FAQ
What is the difference between the local and remote Prisma MCP servers?
The local server (npx -y prisma mcp) wraps the Prisma CLI for the project on your machine: migrations, Studio, dev-database provisioning. The remote server (https://mcp.prisma.io/mcp) is hosted, OAuth-authenticated management of Prisma Postgres: databases, backups, connection strings, SQL execution and schema introspection.
Does it work with databases other than Prisma Postgres?
Partially. The local migrate tools run the Prisma CLI against whatever datasource your schema defines, so any Prisma-supported database works there. Database provisioning and every remote tool are Prisma-Postgres-only.
Is the Prisma MCP free and safe to use?
Both servers are free to use (Prisma Postgres itself is billed separately per Prisma's pricing). Safety-wise, know the two sharp edges: migrate-reset force-wipes the target database, and ExecuteSqlQueryTool runs arbitrary SQL on the database you point it at — keep agents on dev databases and backups enabled.
Alternatives to Prisma MCP
Compare all alternatives →Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.
Create, manage, and query your InstantDB apps, schemas, permissions, and data from your AI editor.
Compare Prisma MCP with: