Prisma logo
Developer ToolsAuth: OAuthHosting: Hosted or self-hosted

Prisma MCP Server

Manage Prisma Postgres databases with AI agents over the official remote MCP server.

Updated

What is Prisma MCP?

The Prisma MCP server is a Model Context Protocol server that lets AI agents manage Prisma Postgres databases through natural language. It exposes database operations — creating and listing databases, running SQL, introspecting schemas, and managing connection strings and backups — as MCP tools your assistant can call.

Prisma officially hosts a remote MCP server at https://mcp.prisma.io/mcp. On first use it authenticates against the Prisma Console (an OAuth-style consent flow), so the agent acts against the workspace you choose. There is also a local MCP server bundled with the Prisma CLI (npx prisma mcp) for developers working on their own machine; the remote server is the better fit for hosted agents and platform-style use cases.

Once connected, you can prompt the agent in tools like Claude, Cursor, Codex, Warp, or ChatGPT to provision a database, run a query, or restore a backup, and it will call the appropriate Prisma tool. You can always ask the agent to "list the Prisma tools" to see the current set.

Tools the Prisma MCP server exposes

ToolWhat it does
ListDatabasesToolFetch the list of Prisma Postgres databases in the user's workspace.
DeleteDatabaseToolDelete a Prisma Postgres database by id.
ExecuteSqlQueryToolExecute a SQL query against a given Prisma Postgres database.
IntrospectSchemaToolIntrospect the schema of a given Prisma Postgres database.
ListConnectionStringsToolFetch available connection strings for Prisma Postgres databases.
CreateConnectionStringToolCreate a new connection string for a Prisma Postgres database.
DeleteConnectionStringToolDelete a connection string by id.
ListBackupsToolFetch available managed backups for a given database id.
CreateBackupToolCreate a new managed Prisma Postgres backup.
CreateRecoveryToolRestore a Prisma Postgres database to a new database from a backup id.
search_prisma_documentationAnswer Prisma ORM/Postgres questions grounded in the official docs with citations.

Connect the Prisma MCP server

Claude Code

  1. 1

    Add the remote server

    Run: claude mcp add --transport http prisma https://mcp.prisma.io/mcp (or use the mcp-remote bridge: claude mcp add prisma -- npx -y mcp-remote https://mcp.prisma.io/mcp).

  2. 2

    Authenticate

    On first tool call, a browser window opens to the Prisma Console. Sign in and approve access to the workspace you want the agent to manage.

  3. 3

    Verify

    Run /mcp in Claude Code, or prompt 'List the Prisma tools' to confirm the connection and see available actions.

Cursor

  1. 1

    Open MCP settings

    Go to Cursor Settings -> MCP (or edit ~/.cursor/mcp.json).

  2. 2

    Add the server config

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

  3. 3

    Authenticate and use

    Reload, then trigger a Prisma tool; authenticate in the Prisma Console popup. Ask the agent to 'list the Prisma tools' to confirm.

Sample use cases

Provision and manage Prisma Postgres databases from an AI assistant

Create, list, and delete databases without leaving your editor or chat.

Run ad-hoc SQL and schema introspection during development

Query data and inspect table structures via natural language.

Automate scheduled backups and restores

Create managed backups and recover databases on a recurring workflow.

Security & permissions

The remote server uses an OAuth-style flow: on first use the agent authenticates against the Prisma Console and you approve access to a specific workspace, so the agent only operates within the workspace you authorize. Granted tools can read and modify databases in that workspace — including running arbitrary SQL (ExecuteSqlQueryTool), deleting databases, and creating or deleting connection strings — so connect only workspaces you intend the agent to manage and review prompts that trigger destructive actions. The local CLI server (npx prisma mcp) instead uses your local Prisma/Platform credentials.

Using Prisma MCP with Gamut

In Gamut, a Prisma MCP agent runs unattended on a schedule or event trigger while Gamut manages the OAuth connection to your Prisma workspace. For example, a nightly workflow can list databases, run a maintenance or reporting SQL query via the execute-query tool, and create a managed backup — then hand results to the next step (a Slack summary or a downstream agent). Because the agent only acts within the workspace you authorize, you can wire Prisma database operations into automated pipelines without writing glue code or managing credentials yourself.

Frequently asked questions

What is the Prisma MCP server?

It is an official Model Context Protocol server from Prisma that lets AI agents manage Prisma Postgres databases with natural language — provisioning databases, running SQL, introspecting schemas, and handling connection strings and backups. Prisma hosts a remote server at https://mcp.prisma.io/mcp, and a local server ships with the Prisma CLI.

Is the Prisma MCP server free?

Yes — the MCP server and the Prisma CLI are free. Prisma Postgres itself has a free tier (100k operations, 1 GiB storage, and 10 databases per month), and any databases you provision through the server are billed under standard usage-based Prisma Postgres pricing beyond that tier.

How do I connect the Prisma MCP server to Claude or Cursor?

Point your client at https://mcp.prisma.io/mcp. In Claude Code run 'claude mcp add --transport http prisma https://mcp.prisma.io/mcp'; in Cursor add an mcpServers entry using 'npx -y mcp-remote https://mcp.prisma.io/mcp'. On first use, authenticate in the Prisma Console popup and approve the workspace.

Is the Prisma MCP server hosted or self-hosted?

Both options exist. Prisma officially hosts the remote server at https://mcp.prisma.io/mcp (OAuth via the Prisma Console), which suits hosted agents and platforms. Developers can also run the local server bundled with the Prisma CLI via 'npx prisma mcp' on their own machine.