|
| 1 | +--- |
| 2 | +title: 'ChatGPT' |
| 3 | +metaTitle: 'Using the Prisma MCP Server with ChatGPT' |
| 4 | +metaDescription: 'Learn how to add the remote Prisma MCP server to ChatGPT to manage your Prisma Postgres databases.' |
| 5 | +tocDepth: 3 |
| 6 | +toc: true |
| 7 | +--- |
| 8 | + |
| 9 | +[ChatGPT](https://openai.com/chatgpt) is a large language model-based chatbot developed by OpenAI. You can extend its capabilities by connecting it to external tools, such as the Prisma MCP server, to interact with your Prisma Postgres databases. |
| 10 | + |
| 11 | +This guide explains how to add the remote Prisma MCP server to ChatGPT, allowing you to create and manage your databases using natural language prompts. |
| 12 | + |
| 13 | +Here is an end to end demo of setting up the remote Prisma MCP server and using it in ChatGPT: |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## Features of the Prisma MCP server |
| 18 | + |
| 19 | +By connecting the Prisma MCP server to ChatGPT, you can perform a variety of database management tasks directly from the chat interface. Here are some of the key features available: |
| 20 | + |
| 21 | +- **Database management**: Create, list, and delete your Prisma Postgres databases. |
| 22 | +- **Connection strings**: Generate, list, and revoke database connection strings. |
| 23 | +- **Backup and recovery**: Create and list database backups, and restore a database from a backup. |
| 24 | +- **Schema and Data interaction**: Execute SQL queries, introspect your database schema to understand its structure, and apply schema updates. |
| 25 | +- **Workspace information**: Fetch details about your Prisma workspace. |
| 26 | + |
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +To use the Prisma MCP server with ChatGPT, you need access to ChatGPT's Developer Mode. This feature is available on specific ChatGPT plans. For the most up-to-date information on supported plans, please refer to the [official OpenAI documentation](https://platform.openai.com/docs/guides/developer-mode). |
| 30 | + |
| 31 | +## Enable Developer mode in ChatGPT |
| 32 | + |
| 33 | +1. Go to **Settings** in your ChatGPT account. |
| 34 | +2. Click **Apps & Connectors**. |
| 35 | +3. Scroll down and locate **Advanced settings**, then click it. |
| 36 | +4. Toggle the **Developer mode** button on. |
| 37 | +5. Click **Back**. |
| 38 | + |
| 39 | +## Add the remote Prisma MCP server |
| 40 | + |
| 41 | +1. Make sure "Developer mode" is enabled. |
| 42 | +2. Go to the **Apps & Connectors** section of your **Settings**. |
| 43 | +3. On the top right, locate and click **Create**. |
| 44 | +4. A "New Connector" popup will open. Fill in the text fields as follows: |
| 45 | + - **Icon**: You can download and use the [Prisma favicon](https://www.prisma.io/favicon.ico). |
| 46 | + - **Name**: `Prisma MCP server` |
| 47 | + - **Description**: `Manage Prisma Postgres databases` |
| 48 | + - **MCP Server URL**: `https://mcp.prisma.io/mcp` |
| 49 | + - **Authentication**: `OAuth` |
| 50 | +5. Check the "I trust this application" box and click **Create**. |
| 51 | + |
| 52 | +You will be redirected to authenticate with your Prisma Data Platform account and choose your desired workspace. After successful authentication, you will be redirected back to ChatGPT. |
| 53 | + |
| 54 | +## Using the remote Prisma MCP server |
| 55 | + |
| 56 | +Once Developer Mode is enabled and the Prisma MCP server is added, you can use it in your chats. |
| 57 | + |
| 58 | +1. In ChatGPT, click the **+** icon to the left of the chat input box. |
| 59 | +2. Click **More**. |
| 60 | +3. Select the **Prisma MCP server** to add it to your chat as a connector. |
| 61 | + |
| 62 | +Now you can use natural language prompts to manage your database. For example: |
| 63 | + |
| 64 | +``` |
| 65 | +Create a DB called pet-app for me near Paris |
| 66 | +``` |
0 commit comments