Logo van Prisma Postgres

Prisma Postgres

Organisatie
prisma

The Model-Context-Protocol (MCP) gives LLMs a way to call APIs and thus access external systems in a well-defined manner.

Uitgeverprisma
Repositorymcp
TaalJavaScript
Forks
6
Sterren
49
Beschikbare tools
0
Transporttypestreamable-http
Categorieën
Links
  • Koppel tools aan AI-workflows

    Prisma Postgres biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    49 sterren en 6 forks in de gekoppelde repository.

Overview

The Model-Context-Protocol (MCP) gives LLMs a way to call APIs and thus access external systems in a well-defined manner.

Prisma's provides two MCP servers: a local and a remote one. See below for specific information on each.

If you're a developer working on a local machine and want your AI agent to help with your database workflows, use the local MCP server.

If you're building an "AI platform" and want to give the ability to manage database to your users, use the remote MCP server.

Remote MCP server

You can start the remote MCP server as follows:

terminal
npx -y mcp-remote https://mcp.prisma.io/mcp

Tools

Tools represent the capabilities of an MCP server. Here's the list of tools exposed by the remote MCP server:

  • CreateBackupTool: Create a new managed Prisma Postgres Backup.
  • CreateConnectionStringTool: Create a new Connection String for a Prisma Postgres database with the given id.
  • CreateRecoveryTool: Restore a Prisma Postgres Database to a new database with the given Backup id.
  • DeleteConnectionStringTool: Delete a Connection String with the given connection string id.
  • DeleteDatabaseTool: Delete a Prisma Postgres database with the given id.
  • ListBackupsTool: Fetch a list of available Prisma Postgres Backups for the given database id and environment id.
  • ListConnectionStringsTool: Fetch a list of available Prisma Postgres Database Connection Strings for the given database id and environment id.
  • ListDatabasesTool: Fetch a list of available Prisma Postgres Databases for user's workspace.
  • ExecuteSqlQueryTool: Execute a SQL query on a Prisma Postgres database with the given id.
  • IntrospectSchemaTool: Introspect the schema of a Prisma Postgres database with the given id.

Once you're connected to the remote MCP server, you can also always prompt your AI agent to "List the Prisma tools" to get a full overview of the latest supported tools.

Usage

The remote Prisma MCP server follows the standard JSON-based configuration for MCP servers. Here's what it looks like:

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

[!TIP] If you want to try it the remote MCP server and explore it's capabilities, we recommend Cloudflare's AI Playground for that. Add the https://mcp.prisma.io/mcp URL into the text field with the Enter MCP server URL placeholder, click Connect, and then authenticate with the Prisma Console in the popup window. Once connected, you can send prompts to the Playground and see what MCP tools the LLM chooses based on your prompts.

Sample prompts

  • "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 MCP server

You can start the local MCP server as follows:

terminal
npx -y prisma mcp

[!TIP] If you're using VS Code, you can use VS Code agent mode to enter prompts such as "create Postgres database" or "apply schema migration" directly in the chat. The VS code agent handles all underlying Prisma CLI invocations and API calls automatically. See our VS Code Agent documentation for more details.

Tools

Tools represent the capabilities of an MCP server. Here's the list of tools exposed by the local MCP server:

  • migrate-status: Checks your migration status via the prisma migrate status command.
  • migrate-dev: Creates and executes a migration via the prisma migrate dev --name <name> command. The LLM will provide the <name> option.
  • migrate-reset: Resets your database via the prisma migrate reset --force command.
  • Prisma-Postgres-account-status: Checks your 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. The LLM will provide the <name> and <region> options.
  • Prisma-Login: Authenticates with Prisma Console via the platform auth login --early-access command.
  • Prisma-Studio: Open Prisma Studio via the prisma studio command.

Usage

The local Prisma MCP server follows the standard JSON-based configuration for MCP servers. Here's what it looks like:

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

Sample prompts

Here are some sample prompts you can use when the MCP server is running:

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

Integrating in AI tools

AI tools have different ways of integrating MCP servers. In most cases, there are dedicated configuration files in which you add the JSON configuration from above. The configuration contains a command for starting the server that'll be executed by the respective tool so that the server is available to its LLM.

In this section, we're covering the config formats of the most popular AI tools.

VS Code

Install in VS Code

If your browser blocks the link, you can set it up manually by creating a .vscode/mcp.json file in your workspace and adding:

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

Explore additional Prisma features and workflows for VS Code in our docs.

Cursor

To learn more about Cursor's MCP integration, check out the Cursor MCP docs.

Add via one-click installation

You can add the Prisma MCP server to Cursor using the one-click installation by clicking on the following link:

This will prompt you to open the Cursor app in your browser. Once opened, you'll be guided to install the Prisma MCP server directly into your Cursor configuration.

Add via Cursor Settings UI

When opening the Cursor Settings, you can add the Prisma MCP Server as follows:

  1. Select MCP in the settings sidenav
  2. Click + Add new global MCP server
  3. Add the Prisma snippet to the mcpServers JSON object:
    json
    {
      "mcpServers": {
        "Prisma-Local": {
          "command": "npx",
          "args": ["-y", "prisma", "mcp"]
        },
        "Prisma-Remote": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://mcp.prisma.io/mcp"]
        }
      }
    }

Global configuration

Adding it via the Cursor Settings settings will modify the global ~/.cursor/mcp.json config file. In this case, the Prisma MCP server will be available in all your Cursor projects:

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

Project configuration

If you want the Prisma MCP server to be available only in specific Cursor projects, add it to the Cursor config of the respective project inside the .cursor directory in the project's root:

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

Windsurf

To learn more about Windsurf's MCP integration, check out the Windsurf MCP docs.

Add via Windsurf MCP Plugin Store (Recommended)

Use the Prisma MCP plugin from the Windsurf MCP Plugin Store. Follow the steps here to add the Prisma MCP plugin in Windsurf. This is the simplest and recommended way to add the Prisma MCP server to Windsurf.

Add via Windsurf Settings UI

When opening the Windsurf Settings (via Windsurf - Settings > Advanced Settings or Command Palette > Open Windsurf Settings Page), you can add the Prisma MCP Server as follows:

  1. Select Cascade in the settings sidenav
  2. Click Add Server
  3. Add the Prisma-Local and/or Prisma-Remote snippets to the mcpServers JSON object:
    json
    {
      "mcpServers": {
        "Prisma-Local": {
          "command": "npx",
          "args": ["-y", "prisma", "mcp"]
        },
        "Prisma-Remote": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://mcp.prisma.io/mcp"]
        }
      }
    }

Global configuration

Adding it via the Windsurf Settings will modify the global ~/.codeium/windsurf/mcp_config.json config file. Alternatively, you can also manually add it to that file:

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

Warp

You can add the Prisma MCP to Warp as a globally available tool. First, visit your MCP settings and click + Add. From here, you can configure the Prisma MCP server as JSON. Use the command and args properties to start the Prisma MCP server as a setup command. You can optionally configure Prisma to activate on startup using the start_on_launch flag:

json
{
  "Prisma": {
    "command": "npx",
    "args": [
      "-y",
      "prisma",
      "mcp"
    ],
    "env": {},
    "working_directory": null,
    "start_on_launch": true
  }
}

Hit Save and ensure the MCP server is running from your MCP settings panel. Then, open a new terminal window and ask Warp to manage your Prisma database. It should reach for the Prisma MCP server automatically.

To learn more about Warp's MCP integration, visit the Warp MCP docs.

Claude Code

Claude Code is a terminal-based AI tool where you can add MCP server using the claud mcp add command for the local MCP server:

terminal
claude mcp add prisma-local npx prisma mcp

or for the remote MCP server:

terminal
claude mcp add prisma-remote npx mcp-remote https://mcp.prisma.io/mcp

Learn more in the Claude Code MCP docs.

Claude Desktop

Follow the instructions in the Claude Desktop MCP docs to create the required configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Then add the JSON snippet to that configuration file:

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

OpenAI Agents SDK

Here's an example for using the Prisma MCP servers in a Python script via the OpenAI Agents SDK:

python
from openai import AsyncOpenAI
from openai.types.beta import Assistant
from openai.beta import AsyncAssistantExecutor
from openai.experimental.mcp import MCPServerStdio
from openai.types.beta.threads import Message, Thread
from openai.types.beta.tools import ToolCall

import asyncio

async def main():
    # Launch both MCP servers concurrently
    async with MCPServerStdio(
        params={
            "command": "npx",
            "args": ["-y", "prisma", "mcp"]
        }
    ) as local_server, MCPServerStdio(
        params={
            "command": "npx",
            "args": ["-y", "mcp-remote", "https://mcp.prisma.io/mcp"]
        }
    ) as remote_server:
        
        # Optional: list tools from both servers
        local_tools = await local_server.list_tools()
        remote_tools = await remote_server.list_tools()
        print("Local server tools:", [tool.name for tool in local_tools])
        print("Remote server tools:", [tool.name for tool in remote_tools])

        # Set up the assistant with both MCP servers
        agent = Assistant(
            name="Prisma Assistant",
            instructions="Use the Prisma tools to help the user with database tasks.",
            mcp_servers=[local_server, remote_server],
        )

        executor = AsyncAssistantExecutor(agent=agent)

        # Create a thread and send a message
        thread = Thread(messages=[Message(role="user", content="Create a new user in the database")])
        response = await executor.run(thread=thread)

        print("Agent response:")
        for message in response.thread.messages:
            print(f"{message.role}: {message.content}")

# Run the async main function
asyncio.run(main())

Certified by MCP Review

Installatie

TypingMind
{
  "mcpServers": {
    "prisma-postgres": {
      "url": "https://mcp.prisma.io/mcp"
    }
  }
}

Gebruik Prisma Postgres MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Prisma Postgres is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie maakt in TypingMind verbinding via de URL van een gehoste MCP-server.

Voeg een MCP-server-URL toe

Gebruik dit als Prisma Postgres al extern wordt gehost of als je team één gedeelde connector wil die meerdere gebruikers kunnen gebruiken.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer https://mcp.prisma.io/mcp in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak https://mcp.prisma.io/mcp in het veld Server-URL.
  2. Voer een verbindingsnaam in voor Prisma Postgres.
  3. Voeg een beschrijving en een icoon toe om de verbinding makkelijker te herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met Prisma Postgres als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van Prisma Postgres in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van Prisma Postgres in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Prisma Postgres gebruiken om me hiermee te helpen?
Prisma Postgres
Zeker. Ik heb het gelezen.
Dit vond ik met Prisma Postgres.

Veelgestelde vragen

Waarvoor wordt de MCP-server Prisma Postgres gebruikt?

Prisma Postgres is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Prisma Postgres MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Prisma Postgres gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Prisma Postgres MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Prisma Postgres verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Prisma Postgres MCP met TypingMind?

Je kunt Prisma Postgres met TypingMind verbinden door de URL van de gehoste MCP-server toe te voegen. Dit is handig als je een externe MCP-verbinding wilt die beschikbaar is vanuit je TypingMind-werkruimte.

Welke tools biedt Prisma Postgres MCP in TypingMind?

Prisma Postgres biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Prisma Postgres MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Prisma Postgres authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇