SuperAPI AI Directory

mcp

Gives LLMs the ability to manage Prisma Postgres databases (e.g. spin up new databases and run migrations or queries)

Open website

About this tool

Prisma MCP is a server implementation based on the Model-Context-Protocol (MCP), designed to enable LLMs to call APIs and access external systems in a well-defined manner. Prisma provides two MCP servers: local and remote.

Purpose

  • Local MCP server: Suitable for developers working on their local machines who want AI agents to help with database workflows.
  • Remote MCP server: Suitable for developers building an "AI platform" who want to enable their users to manage databases.

Key Capabilities

The remote MCP server exposes the following tools:

  • CreateBackupTool: Creates a new managed Prisma Postgres backup.
  • CreateConnectionStringTool: Creates a new connection string for the Prisma Postgres database with the given ID.
  • CreateRecoveryTool: Restores the Prisma Postgres database to a new database using the given backup ID.
  • DeleteConnectionStringTool: Deletes the connection string with the given connection string ID.
  • DeleteDatabaseTool: Deletes the Prisma Postgres database with the given ID.
  • ListBackupsTool: Retrieves the list of available Prisma Postgres backups for the given database ID and environment ID.
  • ListConnectionStringsTool: Retrieves the list of available Prisma Postgres database connection strings for the given database ID and environment ID.
  • ListDatabasesTool: Retrieves the list of available Prisma Postgres databases in the user's workspace.
  • ExecuteSqlQueryTool: Executes an SQL query on the Prisma Postgres database with the given ID.
  • IntrospectSchemaTool: Introspects the schema of the Prisma Postgres database with the given ID.

After connecting to the remote MCP server, you can prompt the AI agent to "list Prisma tools" to get a complete overview of the latest supported tools.

The local MCP server exposes the following tools:

  • migrate-status: Checks the migration status via the prisma migrate status command.
  • migrate-dev: Creates and executes a migration via the prisma migrate dev --name <name> command, with the LLM providing the <name> option.
  • migrate-reset: Resets the database via the prisma migrate reset --force command.
  • Prisma-Postgres-account-status: Checks the authentication status with Prisma Console via the platform auth show --early-access command.
  • Create-Prisma-Postgres-Database: Creates a new Prisma Postgres database via the 'init --db --name' <name> '--region' <region> '--non-interactive' command, with the LLM providing the <name> and <region> options.
  • Prisma-Login: Authenticates with Prisma Console via the platform auth login --early-access command.
  • Prisma-Studio: Opens Prisma Studio via the prisma studio command.

Usage

The remote MCP server follows the standard JSON configuration:

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

The local MCP server follows the standard JSON configuration:

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

Integrating into AI tools:

  • VS Code: Add the configuration in the .vscode/mcp.json file. VS Code agent mode allows you to directly enter "create Postgres database" or "apply schema migration" in the chat, automatically handling the underlying Prisma CLI calls and API calls.
  • Cursor: Can be added via a one-click install link or manually in Cursor settings. The global configuration modifies ~/.cursor/mcp.json; the project-level configuration is in the .cursor directory at the project root.
  • Windsurf: It is recommended to add the Prisma MCP plugin through the Windsurf MCP plugin store. You can also select Cascade in settings, click Add Server, add the Prisma-Local and/or Prisma-Remote snippets, and modify the global ~/.codeium/windsurf/mcp_config.json.
  • Warp: In MCP settings, click + Add, configure the Prisma MCP server as JSON, start it using the command and args properties, and optionally configure the start_on_launch flag to activate it on startup. After saving, make sure the server is running, and in a new terminal you can let Warp manage the Prisma database.
  • Claude Code: Use the claude mcp add command to add a local or remote MCP server.
  • Claude Desktop: Create a configuration file according to the documentation (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json), and add the JSON snippet.
  • OpenAI Agents SDK: An example is provided for using the Prisma MCP server in a Python script.

The remote MCP server can be tried through Cloudflare's AI Playground: enter in the text box https://mcp.prisma.io/mcp,点击 Connect, and authenticate through Prisma Console in the pop-up window. After connecting, you can send prompts and view the MCP tools selected by the LLM based on the prompt.

Example prompts

Remote server examples:

  • "Show me a list of all the databases in my account."
  • "Create a new database in the US region for me."
  • "Seed my database with real-looking data but create a backup beforehand."
  • "Show me all available backups of my database."
  • "Show me all customers and run an analysis over their orders."

Local server examples:

  • "Log me into the Prisma Console."
  • "Create a database in the US region."
  • "Create a new Product table in my database."

Use cases

  • Developers use local AI agents to assist with database migrations, status checks, database creation, and more.
  • AI platform builders let users manage databases through the remote MCP server.
  • Integrate Prisma MCP into supported AI tools (such as VS Code, Cursor, Windsurf, Warp, Claude Code, Claude Desktop, etc.) to enable natural language database operations.

Limitations

  • The remote MCP server requires Prisma Console authentication.
  • The local MCP server requires the local environment to support npx and the Prisma CLI.
  • The repository also mentions MCP Review certification, a code of conduct, and a security policy, but the specific content is not yet provided.