ChatGPT
ChatGPT 是一个由 OpenAI 开发的基于大型语言模型的聊天机器人。你可以通过将其连接到外部工具(例如 Prisma MCP 服务器)来扩展其功能,以便与你的 Prisma Postgres 数据库进行交互。
¥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.
本指南介绍如何将远程 Prisma MCP 服务器添加到 ChatGPT,以便你使用自然语言提示创建和管理数据库。
¥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.
此功能仍在由 OpenAI 开发中,随着时间的推移,其外观或工作方式可能会略有不同。某些用户可能尚未拥有访问权限。
¥This feature is still in development by OpenAI and might look or work a little differently over time. Some users may not have access to it yet.
如果你发现某些内容已更改或与本指南不符,请 提交问题 或提交拉取请求以更新我们的文档。
¥If you notice that something has changed or doesn't match this guide, please open an issue or submit a pull request to update our docs.
以下是设置远程 Prisma MCP 服务器并在 ChatGPT 中使用它的端到端演示:
¥Here is an end to end demo of setting up the remote Prisma MCP server and using it in ChatGPT:

Prisma MCP 服务器的功能
¥Features of the Prisma MCP server
通过将 Prisma MCP 服务器连接到 ChatGPT,你可以直接从聊天界面执行各种数据库管理任务。以下是一些主要可用功能:
¥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:
-
数据库管理:创建、列出和删除你的 Prisma Postgres 数据库。
¥Database management: Create, list, and delete your Prisma Postgres databases.
-
连接字符串:生成、列出和撤销数据库连接字符串。
¥Connection strings: Generate, list, and revoke database connection strings.
-
备份和恢复:创建并列出数据库备份,以及从备份恢复数据库。
¥Backup and recovery: Create and list database backups, and restore a database from a backup.
-
架构和数据交互:执行 SQL 查询,检查数据库模式以了解其结构,并应用模式更新。
¥Schema and Data interaction: Execute SQL queries, introspect your database schema to understand its structure, and apply schema updates.
-
工作区信息:获取有关 Prisma 工作区的详细信息。
¥Workspace information: Fetch details about your Prisma workspace.
先决条件
¥Prerequisites
要将 Prisma MCP 服务器与 ChatGPT 一起使用,你需要访问 ChatGPT 的开发者模式。此功能适用于特定的 ChatGPT 套餐。有关受支持方案的最新信息,请参阅 OpenAI 官方文档。
¥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.
在 ChatGPT 中启用开发者模式
¥Enable Developer mode in ChatGPT
-
前往 ChatGPT 账户中的“设置”。
¥Go to Settings in your ChatGPT account.
-
点击“应用和连接器”。
¥Click Apps & Connectors.
-
向下滚动并找到“高级设置”,然后点击它。
¥Scroll down and locate Advanced settings, then click it.
-
启用开发者模式按钮。
¥Toggle the Developer mode button on.
-
点击“返回”。
¥Click Back.
添加远程 Prisma MCP 服务器
¥Add the remote Prisma MCP server
-
确保 "开发者模式" 已启用。
¥Make sure "Developer mode" is enabled.
-
前往“设置”中的“应用和连接器”部分。
¥Go to the Apps & Connectors section of your Settings.
-
在右上角,找到并点击“创建”。
¥On the top right, locate and click Create.
-
将打开一个 "新连接器" 弹出窗口。按如下方式填写文本字段:
¥A "New Connector" popup will open. Fill in the text fields as follows:
-
图标:你可以下载并使用 Prisma 网站图标。
¥Icon: You can download and use the Prisma favicon.
-
名称:
Prisma MCP server¥Name:
Prisma MCP server -
描述:
Manage Prisma Postgres databases¥Description:
Manage Prisma Postgres databases -
MCP 服务器 URL:
https://mcp.prisma.io/mcp¥MCP Server URL:
https://mcp.prisma.io/mcp -
验证:
OAuth¥Authentication:
OAuth
-
-
勾选 "我信任此应用" 复选框并点击“创建”。
¥Check the "I trust this application" box and click Create.
你将被重定向到使用你的 Prisma 数据平台账户进行身份验证并选择所需的工作区。身份验证成功后,你将被重定向回 ChatGPT。
¥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.
使用远程 Prisma MCP 服务器
¥Using the remote Prisma MCP server
启用开发者模式并添加 Prisma MCP 服务器后,你就可以在聊天中使用它了。
¥Once Developer Mode is enabled and the Prisma MCP server is added, you can use it in your chats.
-
在 ChatGPT 中,点击聊天输入框左侧的 + 图标。
¥In ChatGPT, click the + icon to the left of the chat input box.
-
点击“更多”。
¥Click More.
-
选择 Prisma MCP 服务器并将其作为连接器添加到你的聊天中。
¥Select the Prisma MCP server to add it to your chat as a connector.
现在,你可以使用自然语言提示来管理数据库。例如:
¥Now you can use natural language prompts to manage your database. For example:
Create a DB called pet-app for me near Paris