AI Skill Hub 推荐使用:Postgres MCP 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
Postgres MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Postgres MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/pgEdge/pgedge-postgres-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"postgres-mcp": {
"command": "npx",
"args": ["-y", "pgedge-postgres-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Postgres MCP 执行以下任务... Claude: [自动调用 Postgres MCP MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"postgres_mcp": {
"command": "npx",
"args": ["-y", "pgedge-postgres-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
The pgEdge Postgres Model Context Protocol (MCP) server enables SQL queries against PostgreSQL databases through MCP-compatible clients. The Natural Language Agent provides supporting functionality that allows you to use natural language to form SQL queries.
Supported Versions: PostgreSQL 14 and higher.
NOT FOR PUBLIC-FACING APPLICATIONS: This MCP server provides LLMs with read access to your entire database schema and data. It should only be used for internal tools, developer workflows, or environments where all users are trusted. For public-facing applications, consider the pgEdge RAG Server instead. See the Choosing the Right Solution guide for details.
- Read-Only Protection - All queries run in read-only transactions by default - Resources - Access PostgreSQL statistics and more - Tools - Query execution, schema analysis, advanced hybrid search (BM25+MMR), embedding generation, resource reading, and more - Prompts - Guided workflows for semantic search setup, database exploration, query diagnostics, and more - Production Chat Client - Full-featured Go client with Anthropic prompt caching (90% cost reduction) - HTTP/HTTPS Mode - Direct API access with user and token authentication - Web Interface - Modern React-based UI with AI-powered chat for natural language database interaction - Docker Support - Pre-built images on GitHub Container Registry with Docker Compose deployment - Secure - TLS support, user and token auth, read-only enforcement - Hot Reload - Automatic reload of authentication files without server restart
The project uses golangci-lint v1.x. Install it with:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
Note: The configuration file .golangci.yml is compatible with golangci-lint v1.x (not v2).
git clone https://github.com/pgEdge/pgedge-postgres-mcp.git
cd pgedge-postgres-mcp
make build
The Quick Start guide covers installation and setup for all supported clients:
| Client | Transport | Best For |
|---|---|---|
| CLI (Stdio) | Stdio | Local single-user development |
| CLI (HTTP) | HTTP | Multi-user or remote access |
| Web UI | HTTP | Browser-based chat interface |
| Claude Code | Stdio | Anthropic CLI agent |
| Claude Desktop | Stdio | Anthropic desktop app |
| Cursor | Stdio | AI code editor |
| Windsurf | Stdio | Codeium code editor |
| VS Code Copilot | Stdio | GitHub Copilot agent |
For a guided demo with sample data, see the Quickstart Demo with Northwind.
Tools not visible in Claude Desktop? - Use absolute paths in config - Restart Claude Desktop completely - Check JSON syntax
Database connection errors? - Ensure database connection is configured before starting the server (via config file, environment variables, or command-line flags) - Verify PostgreSQL is running: pg_isready - Check connection parameters are correct
See the Troubleshooting Guide for detailed solutions.
高质量的开源MCP工具,支持自然语言查询
该工具使用 PostgreSQL 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 PostgreSQL — 请查阅原始协议条款了解具体使用限制。
总体来看,Postgres MCP 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | pgedge-postgres-mcp |
| Topics | aillmmcppostgrespostgresqlgo |
| GitHub | https://github.com/pgEdge/pgedge-postgres-mcp |
| License | PostgreSQL |
| 语言 | Go |
收录时间:2026-05-27 · 更新时间:2026-05-27 · License:PostgreSQL · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端