Prisma MCP Server – Postgres Database Workflows
Prisma's official MCP servers help AI agents manage Prisma Postgres and local Prisma ORM workflows. Use the remote MCP server for hosted Prisma Postgres database operations through Prisma Console, or the local server for migration, Prisma Studio, and local development workflows.
Overview
Prisma provides official MCP servers that connect AI tools to Prisma database
workflows. The remote server focuses on Prisma Postgres management through
Prisma Console, while the local server gives an AI coding agent access to
Prisma CLI workflows in the developer's project.
What the MCP server enables
The remote Prisma MCP server exposes managed Prisma Postgres operations such as:
- Creating Prisma Postgres databases.
- Listing databases in the user's workspace.
- Creating and deleting connection strings.
- Creating managed backups.
- Listing available backups.
- Restoring a database from a backup into a new database.
- Executing SQL queries on a Prisma Postgres database.
- Introspecting database schemas.
The local Prisma MCP server exposes project-oriented Prisma CLI workflows,
including checking migration status, running prisma migrate dev, resetting a
database through prisma migrate reset --force, logging in to Prisma Console,
creating a Prisma Postgres database from the CLI, and opening Prisma Studio.
When to use it
Use Prisma MCP when an AI assistant is helping build, inspect, or operate a
Prisma-backed application. Practical examples include provisioning a new Prisma
Postgres database, creating a backup before seeding data, inspecting a schema,
running an analysis query, creating a development migration, checking migration
status, resetting a local development database, or opening Prisma Studio while
iterating on an application.
Connection and authentication
The remote Prisma MCP server is available at https://mcp.prisma.io/mcp and
uses the standard HTTP transport. On first use, the user authenticates with
Prisma Console and selects the workspace the AI tool can access. HTTP-capable
clients can connect directly to the URL, and stdio-only clients can use
npx -y mcp-remote https://mcp.prisma.io/mcp.
The local server runs with npx -y prisma mcp. It executes Prisma CLI commands
in the developer's local environment and uses the project configuration,
database connection settings, and Prisma Console login state available to that
machine.
Key considerations
Prisma MCP tools can make real database changes. Remote tools can create,
delete, back up, restore, and query Prisma Postgres databases, while local tools
can run migrations and reset development databases. Require human approval
before destructive operations such as deleting databases, deleting connection
strings, resetting databases, restoring backups, or executing SQL that changes
data. Use least-privilege database credentials, review generated SQL and
migration files, and test migrations before applying them to production. The
local server is best for a developer machine and project context; the remote
server is better when an AI platform or hosted tool needs Prisma Postgres
management through Prisma Console.
Supported Transports
streamable_http
URL: https://mcp.prisma.io/mcp
stdio
Command: npx
Args:
-ymcp-remotehttps://mcp.prisma.io/mcp
stdio
Command: npx
Args:
-yprismamcp
Frequently Asked Questions
- When should an AI agent use the Prisma MCP server?
- Use it when an agent needs to manage Prisma Postgres or assist with local Prisma ORM workflows, such as creating databases, creating backups, executing SQL, introspecting schemas, checking migration status, running development migrations, or opening Prisma Studio.
- What does the Prisma MCP server add to an AI agent's capabilities?
- It gives the agent structured access to Prisma Postgres management tools and local Prisma CLI workflows, enabling database actions through MCP instead of relying only on documentation, static model knowledge, or manually run CLI commands.
- What can an AI agent access or manage through Prisma MCP?
- The remote server can manage Prisma Postgres databases, backups, connection strings, SQL execution, and schema introspection. The local server can check migration status, run development migrations, reset databases, create Prisma Postgres databases, log in to Prisma Console, and open Prisma Studio.
- How is authentication configured for the Prisma MCP server?
- The remote server authenticates with Prisma Console on first use and grants access to the workspace selected by the user. The local server runs in the developer's environment and uses local project configuration, database connection settings, and Prisma Console login state where required.
- Which transport should be used for the Prisma MCP server?
- Use the remote Streamable HTTP endpoint at https://mcp.prisma.io/mcp for hosted Prisma Postgres management. Use `npx -y mcp-remote https://mcp.prisma.io/mcp` for stdio-only clients, or use local stdio with `npx -y prisma mcp` when the agent needs Prisma CLI workflows in a local project.