
Postgres MCP Pro 为你和你的 AI 代理提供可配置的读写访问和性能分析。
概览
一个 Postgres MCP 服务器,支持索引调优、解释计划、健康检查和安全 SQL 执行。 概述 • 演示 • 快速入门 • 技术笔记 • MCP API • 相关项目 • 常见问题解答 是一个开源的模型上下文协议(MCP)服务器,旨在支持您和您的AI代理在从初始编码、测试和部署,到生产调试和维护的各个阶段。 Postgres MCP Pro 远不止是封装数据库连接。 - - 分析索引健康、连接利用率、缓冲缓存、真空健康、序列限制、复制延迟等。- - 探索数千种可能的索引,利用工业级算法找到最适合你工作负载的解决方案。- - 通过审查EXPLAIN计划并模拟假设索引的影响来验证和优化性能。- - 基于对数据库模式的详细理解,生成上下文感知的SQL系统。
概述(AI 翻译)
一个 Postgres MCP 服务器,支持索引调优、解释计划、健康检查和安全 SQL 执行。
概述 • 演示 • 快速入门 • 技术说明 • MCP API • 相关项目 • 常见问题
概述
Postgres MCP Pro 是一款开源的模型上下文协议(MCP)服务器,旨在支持您和您的 AI 代理在整个开发过程中——从初始编码、测试和部署,到生产调试和维护。
Postgres MCP Pro 远不止是封装数据库连接。
功能包括:
- ** 🔍 数据库健康** - 分析索引健康、连接利用率、缓冲缓存、真空健康、序列限制、复制延迟等。
- ** ⚡ 指数调优** - 探索数千种可能的索引,利用工业强度算法找到最适合你工作负载的解决方案。
- ** 📈 查询计划** - 通过审查EXPLAIN计划并模拟假设索引的影响来验证和优化性能。
- ** 🧠 模式智能** - 基于对数据库模式的详细理解,生成上下文感知的SQL。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Overview
Postgres MCP Pro is an open source Model Context Protocol (MCP) server built to support you and your AI agents throughout the entire development process—from initial coding, through testing and deployment, and to production tuning and maintenance.
Postgres MCP Pro does much more than wrap a database connection.
Features include:
- 🔍 Database Health - analyze index health, connection utilization, buffer cache, vacuum health, sequence limits, replication lag, and more.
- ⚡ Index Tuning - explore thousands of possible indexes to find the best solution for your workload, using industrial-strength algorithms.
- 📈 Query Plans - validate and optimize performance by reviewing EXPLAIN plans and simulating the impact of hypothetical indexes.
- 🧠 Schema Intelligence - context-aware SQL generation based on detailed understanding of the database schema.
- 🛡️ Safe SQL Execution - configurable access control, including support for read-only mode and safe SQL parsing, making it usable for both development and production.
Postgres MCP Pro supports both the Standard Input/Output (stdio) and Server-Sent Events (SSE) transports, for flexibility in different environments.
For additional background on why we built Postgres MCP Pro, see our launch blog post.
Demo
From Unusable to Lightning Fast
- Challenge: We generated a movie app using an AI assistant, but the SQLAlchemy ORM code ran painfully slow.
- Solution: Using Postgres MCP Pro with Cursor, we fixed the performance issues in minutes.
What we did:
安装
docker run -i --rm -e DATABASE_URI crystaldba/postgres-mcp --access-mode=unrestricted配置
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"crystaldba/postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "postgresql://username:password@localhost:5432/dbname"
}
}
}
}