Back to MCP Servers

Prisma Postgres MCP Server

Official Prisma MCP server for managing Prisma Postgres databases: provision instances, run migrations, manage backups and connection strings, and execute SQL.

Database by Prisma OAuth2 active
Overview

The Prisma MCP server is the official Model Context Protocol integration from Prisma for managing Prisma Postgres databases through AI agents. It ships in two flavors: a remote server hosted at https://mcp.prisma.io/mcp aimed at AI platform builders and end users, and a local server invoked via npx prisma mcp that wraps the Prisma CLI for developers working on a project locally.

The remote server exposes tools for full database lifecycle management: creating and deleting databases, generating and revoking connection strings, creating backups and recovering from them, introspecting schemas, and executing SQL queries against your Prisma Postgres instances. Authentication happens in-browser through Prisma Console on first use, so no manual API keys or service tokens are required. The local server complements this with developer workflow tools that drive the Prisma CLI, including migrate-dev, migrate-status, migrate-reset, Prisma-Studio, and bootstrap commands like Create-Prisma-Postgres-Database and Prisma-Login.

The server is officially maintained by Prisma and works with VS Code, Cursor, Windsurf, Warp, Claude Code, Claude Desktop, ChatGPT, Gemini CLI, and the OpenAI Agents SDK. Built-in guardrails require user confirmation before destructive operations are executed by an agent.

Tools

Tool Description
CreateBackupTool Create a new managed Prisma Postgres backup
ListBackupsTool Fetch a list of backups for a database
CreateRecoveryTool Restore a database to a new database from a given backup id
CreateConnectionStringTool Create a new connection string for a database
ListConnectionStringsTool Fetch a list of connection strings for a database
DeleteConnectionStringTool Delete a connection string
ListDatabasesTool Fetch a list of databases in the workspace
DeleteDatabaseTool Delete a Prisma Postgres database
ExecuteSqlQueryTool Run a SQL query against a Prisma Postgres database
IntrospectSchemaTool Inspect the schema of a Prisma Postgres database
migrate-status Check the migration status of the local Prisma project (local server)
migrate-dev Create and execute a migration in development (local server)
migrate-reset Reset the database and reapply migrations (local server)
Create-Prisma-Postgres-Database Provision a new Prisma Postgres database from the local CLI (local server)
Prisma-Login Authenticate the local CLI with Prisma Console (local server)
Prisma-Postgres-account-status Verify the local CLI's Prisma Console authentication status (local server)
Prisma-Studio Open Prisma Studio for the current project (local server)
Setup Guide

Remote server (recommended)

The remote server is hosted by Prisma at https://mcp.prisma.io/mcp. Authentication happens through Prisma Console in a browser popup on first use, so no API keys are needed up front.

Claude Desktop / Cursor / Windsurf config (uses mcp-remote bridge):

{
  "mcpServers": {
    "Prisma-Remote": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.prisma.io/mcp"]
    }
  }
}

Clients with native remote MCP support (e.g. VS Code):

{
  "mcpServers": {
    "Prisma": {
      "url": "https://mcp.prisma.io/mcp"
    }
  }
}

Local server (for development workflows)

The local server runs against your project's installed Prisma CLI and is useful for migrations, Studio, and bootstrapping new databases.

{
  "mcpServers": {
    "Prisma-Local": {
      "command": "npx",
      "args": ["-y", "prisma", "mcp"]
    }
  }
}

Prerequisites

  • A Prisma Console account (https://console.prisma.io) for the remote server
  • Node.js and npx installed locally
  • For the local server: a project with the Prisma CLI and a schema.prisma file
Use Cases
  • Spin up a new Prisma Postgres database from your IDE, generate a connection string, and drop it into your app's .env without leaving the chat
  • Take an ad-hoc backup before a risky deploy, then restore to a fresh database if something breaks in production
  • Have an agent run migrate-dev after editing schema.prisma, then verify with migrate-status and open Prisma Studio to inspect the result
  • Audit a workspace by listing all databases and connection strings, then revoke stale credentials
  • Let an agent introspect an unfamiliar Prisma Postgres database and run targeted SQL queries to answer analytical questions
Example Prompts
  • "Create a new Prisma Postgres database called staging-eu and give me a connection string"
  • "Back up the production database, then restore it to a new database named prod-restore-test"
  • "I just edited my schema.prisma. Run migrate-dev with the name add_orders_table, then show me the migration status"
  • "List all databases in my workspace and all connection strings for the one called analytics"
  • "Run SELECT count(*) FROM users WHERE created_at > now() - interval '7 days' against my production database"
Pros
  • Official server maintained by Prisma, with both remote and local variants covering admin and dev workflows
  • Browser-based OAuth via Prisma Console, no manual API key handling
  • Built-in guardrails require confirmation before destructive actions like DeleteDatabaseTool or migrate-reset
  • Works across major MCP clients including Claude Desktop, Cursor, VS Code, Windsurf, Warp, ChatGPT, and Gemini CLI
Limitations
  • Scoped to Prisma Postgres: does not manage arbitrary Postgres instances or other database engines
  • Remote server requires the mcp-remote bridge for clients that do not natively support remote MCP transports
  • Local server tools depend on a working Prisma CLI setup in the current project
Alternatives