Prisma MCP server: what migrate-dev applies, what the AI-agent guard misses, and how to make your agent ask
The three tools of the Prisma CLI's local MCP server (prisma mcp, Prisma 7.10.1), checked by running it against Postgres 17 in Docker: why npx prisma mcp no longer starts, how a status call ran code from a folder the model picked, how migrate-dev applied a hand-written DELETE, what Prisma's AI-agent guard stops and misses, and the Claude Code settings that make every call ask.
Checked on by running prisma 7.10.1 (npm, run with npx on Node 24) from prisma on npm and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.
The short answer
None of its three tools only looks: status runs the project's config code, migrate-dev applies any migration file in the folder, and Prisma's agent guard does not cover them. Pin Prisma 7, keep all three on ask, and read the unapplied migration files before approving migrate-dev.
- Can run on their own
- 0
- Should ask a person
- 3
Lethal trifecta: This server can read private data. Beside a server that can take in content other people wrote and send data out, a setup holds all three legs of the lethal trifecta. Check your whole setup
Which Prisma server this is
This page is about the MCP server built into the Prisma CLI, started with prisma mcp. We ran Prisma 7.10.1, the newest Prisma 7 release, on Node 24 against Postgres 17 in Docker, with a project made by prisma init. It offers three tools: migrate-status, migrate-dev and Prisma-Studio. None carries a read-only or destructive hint. Prisma also runs a remote server at mcp.prisma.io for its hosted Postgres; it answered 401 without a sign-in, so we did not test it.
npx prisma mcp no longer starts
On 27 November 2026 the latest tag of the prisma package on npm pointed at 8.0.0-rc.36, published the day before: a new CLI with no MCP server. The setup most guides give, npx -y prisma mcp, now fetches it, and our MCP client saw the connection close at once:
$ npx prisma mcp
✘ [CLI.V7_COMMAND] `prisma mcp` is a Prisma 7 command and is not available in Prisma 8Prisma 7.10.1 also printed an update notice telling us to run npm i --save-dev prisma@latest, which would move a project to that release candidate. Pin the version in the command, as below.
Every tool runs in a folder the model picks
Each tool takes one required argument, projectCWD, and runs the Prisma CLI there as a child process: prisma migrate status, prisma migrate dev --name … or prisma studio. Nothing checks that the folder is the project you opened. The CLI then loads that folder’s prisma.config.ts, which is TypeScript it runs, and the database URL in it. We pointed migrate-status at a second folder with this config:
// prisma.config.ts in a folder the model named
import { writeFileSync } from "node:fs";
import { execSync } from "node:child_process";
writeFileSync("ran-config.txt", execSync("id -un").toString());
export default {
schema: "prisma/schema.prisma",
datasource: { url: "postgresql://…/prod" },
};The status call wrote ran-config.txt with our user name in it, then reported on the prod database that config named. So a tool that sounds like a read runs whatever a config file in any folder says, a cloned repository’s included, and it reaches whichever database that folder’s .env or config points at.
migrate-dev applies any migration in the folder
Prisma’s own checks held where it compares the schema with the database. Removing a column that still held two values was refused, because the tool runs without a terminal and Prisma will not ask there. Schema drift, a column added by hand, was refused too, with the data kept. But migrate dev also applies every migration file in prisma/migrations that the database has not seen, and those get no warning. A file the agent wrote was applied and emptied the table:
-- prisma/migrations/20261127170000_tidy/migration.sql
DELETE FROM "Customer";The server ran with CLAUDECODE=1 in its environment, so Prisma knew an agent was calling, and the table still went from two rows to none. A person approving a migrate-dev call sees only a name and a folder, so read every unapplied migration.sql first.
What Prisma’s AI-agent guard stops
Prisma 7.10.1 tells from environment variables when an agent runs it: CLAUDECODE, CODEX_THREAD_ID, GEMINI_CLI, CURSOR_AGENT, COPILOT_CLI, CLINE_ACTIVE, and checks for Goose, Amp, Aider, Replit, Devin and others. It then refuses a reset unless the variable PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION is set. Running the CLI as Claude Code would:
migrate reset --forceanddb push --force-resetwere refused, with a message telling the agent to stop and ask.- The same message tells the agent to rerun with the variable set to the person’s words. Prisma checks only that it is set:
xreset the database. db executewithDROP TABLEran, andmigrate deployapplied a hand-writtenDROP TABLEmigration. Neither is covered.
CLAUDECODE=1 prisma migrate reset --force
# Error: Prisma Migrate detected that it was invoked by Claude Code.
CLAUDECODE=1 PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION=x prisma migrate reset --force
# Database reset successful
echo 'DROP TABLE "Customer";' | CLAUDECODE=1 prisma db execute --stdin
# Script executed successfully.In 7.10.1’s code the check runs only in db push and migrate reset, neither of which the MCP server calls. It is a message to the agent, not a lock.
Prisma Studio
Prisma-Studio starts Studio, a web app that can edit and delete every row, on a random localhost port (51212, then 49152 for us). It refused a request carrying another site’s Origin with 403. The tool call does not answer while Studio runs: our client gave up after 25 seconds, and Studio kept serving until we stopped the server.
A safer setup
Pin Prisma 7 and turn off the CLI’s update check, which calls checkpoint.prisma.io:
claude mcp add prisma -e CHECKPOINT_DISABLE=1 -- npx -y prisma@7.10.1 mcpKeep the only database URL the agent’s folders can reach a development one, since any tool call can name any folder. Note too that prisma init wrote eleven Prisma skills into .claude/skills, .agents/skills and .windsurf/skills of our project, which coding agents load as instructions.
Its 3 tools
Hard to undo1 toolAsk a person every time. Consider two people, or deny it if the agent never needs it.
migrate-devPrisma Migrate Dev is used to update Prisma whenever the schema.prisma file has been modified.
Server gives no read-only or destructive hint
Our call: Applies every unapplied migration file in the folder the model names. Prisma's data-loss warning stopped a dropped column, but a migration.sql the agent wrote with DELETE FROM was applied and emptied the table, with no warning.
Not sure2 toolsAsk a person until you have checked what it does.
migrate-statusThe prisma migrate status command looks up the migrations in ./prisma/migrations/* folder and the entries in the _prisma_migrations table and compiles information about the state of the migrations in your database.
Server gives no read-only or destructive hint
Our call: Reads like a status check, but it runs the Prisma CLI in any folder the model names, and the CLI runs that folder's prisma.config.ts. A config there wrote a file on our machine and pointed the status at another database.
Prisma-StudioOpen Prisma Studio to view data in your database in a pleasing visual ui.
Server gives no read-only or destructive hint
Our call: Starts Prisma Studio, a web app that can edit and delete every row, on a localhost port. The call never answers while Studio runs, and Studio kept running after our client gave up.
Claude Code asks for every call
Claude Code asks before every MCP tool it has no rule for. Added as prisma, this server’s tools are named mcp__prisma__<tool>. None of its tools only looks, so there is no allow rule to add: leave it without one and every call asks, including any tool a later version of the server adds.
The command that adds the server:
claude mcp add prisma -e CHECKPOINT_DISABLE=1 -- npx -y prisma@7.10.1 mcpSend the rest to a person, not the terminal
A prompt in the terminal only works while someone is watching it. With this hook, every call of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher covers the whole server, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__prisma__.*",
"hooks": [
{ "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
]
}
]
}
}Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.
Set it up in Cursor, VS Code, Codex, Gemini CLI and other clients
The same server as the claude mcp add line above, written the way each client reads it, for Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI, Cline and Zed. Cursor and VS Code add it in one click: the app shows the settings and asks before it saves them. Set up like this, every tool runs as soon as the model calls it; the next section puts a person in front of the ones that change things. Running it with other flags? Convert your own settings.
claude_desktop_config.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.cursor/mcp.json or .cursor/mcp.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}.vscode/mcp.json{
"servers": {
"prisma": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.codex/config.toml[mcp_servers.prisma]
command = "npx"
args = ["-y", "prisma@7.10.1", "mcp"]
env = { CHECKPOINT_DISABLE = "1" }~/.gemini/settings.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}cline_mcp_settings.json (Configure MCP Servers){
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.config/zed/settings.json{
"context_servers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}- Add context_servers next to your other settings in the same file.
Any MCP client: put the proxy in front
Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server and holds every call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz login once to save a key, then use the settings for your client:
claude_desktop_config.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.cursor/mcp.json or .cursor/mcp.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}.vscode/mcp.json{
"servers": {
"prisma": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.codex/config.toml[mcp_servers.prisma]
command = "npx"
args = ["-y", "https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz", "mcp-proxy", "--name", "prisma", "--", "npx", "-y", "prisma@7.10.1", "mcp"]
env = { CHECKPOINT_DISABLE = "1" }~/.gemini/settings.json{
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}cline_mcp_settings.json (Configure MCP Servers){
"mcpServers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}~/.config/zed/settings.json{
"context_servers": {
"prisma": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"prisma",
"--",
"npx",
"-y",
"prisma@7.10.1",
"mcp"
],
"env": {
"CHECKPOINT_DISABLE": "1"
}
}
}
}- Add context_servers next to your other settings in the same file.
Already have it in Claude Desktop? One command rewrites the file for you, with every call asking, and keeps the old one (setup vscode does the same for VS Code; how it works):
npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz setup claude-desktopThe same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__prisma, keeps Claude Code from asking a second time in the terminal:
claude mcp add prisma -e CHECKPOINT_DISABLE=1 -- npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz mcp-proxy --name prisma -- npx -y prisma@7.10.1 mcpSee it before you decide.
The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.