返回 MCP 目录

PostgreSQL MCP Server

官方

官方 PostgreSQL 服务器,提供只读数据库访问与 schema 检查能力,让 AI 安全查询关系型数据。

PostgreSQL MCP Server是面向数据库场景的 MCP 服务器。官方 PostgreSQL 服务器,提供只读数据库访问与 schema 检查能力,让 AI 安全查询关系型数据。相关标签:postgres · postgresql · 数据库 · database · 关系型 · sql。

数据库stdio作者: Anthropic45.0k stars访问

PostgreSQL MCP Server是什么

PostgreSQL MCP Server用于在 MCP 客户端中提供数据库能力。官方 PostgreSQL 服务器,提供只读数据库访问与 schema 检查能力,让 AI 安全查询关系型数据。

如何在 Cursor / Claude / Codex 中安装 PostgreSQL MCP Server

Cursor 打开 Cursor 的 MCP 设置(或用户/项目级 mcp.json),加入本页的服务器配置。若只有启动命令,把 command/args 填进 Cursor 的 MCP 条目即可。

Claude Desktop 把本页配置写入 claude_desktop_config.json 后重启 Claude Desktop。

Codex 在 Codex 的 MCP 配置中添加同样的 command/args 或 JSON 片段。具体文件位置以你当前 Codex 版本文档为准。

安装运行

在终端运行以下命令启动服务器:

npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Claude Desktop 配置

将以下配置加入 Claude Desktop 的 claude_desktop_config.json

{"mcpServers":{"postgres":{"command":"npx","args":["-y","@modelcontextprotocol/server-postgres","postgresql://localhost/mydb"]}}}

标签

postgrespostgresql数据库database关系型sql官方

同类推荐

常见问题

PostgreSQL MCP Server适合解决什么问题?

PostgreSQL MCP Server主要覆盖数据库。官方 PostgreSQL 服务器,提供只读数据库访问与 schema 检查能力,让 AI 安全查询关系型数据。

PostgreSQL MCP Server怎么接到我的编辑器?

使用本页安装区给出的命令或 JSON;没有的话以项目主页为准。不要从不明来源复制配置。

有哪些同类 MCP?

下面的相关列表来自同一数据库分类,便于对比能力范围。