Postgres MCP Pro 是一个开源 MCP 服务器,为 AI 代理提供数据库索引调优、执行计划分析、健康检查和安全 SQL 执行等全方位支持。
article
README
🚀 Postgres MCP Pro 开发指南
本指南为希望参与 Postgres MCP Pro 开发,或选择从源代码安装 Postgres MCP Pro 的用户提供详细说明。
🚀 快速开始
📦 安装指南
本地开发环境搭建
安装 uv:
curl -sSL https://astral.sh/uv/install.sh | sh
克隆仓库:
git clone https://github.com/crystaldba/postgres-mcp.git
cd postgres-mcp
安装依赖项:
uv pip install -e .
uv sync
运行服务器:
uv run postgres-mcp "postgres://user:password@localhost:5432/dbname"
help
Runtime guide
cloud
Hosted runtime
Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive
Open provider connection page
Authorize or copy endpoint
Connect from your MCP client
terminal
Local runtime / other methods
Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed