MCP-PostgreSQL-Ops
by call518·★ 149·综合分 50
功能全面的 MCP 服务器,提供 30 多种 PostgreSQL 数据库管理工具,支持性能分析、膨胀检测和监控。
概述
MCP-PostgreSQL-Ops 是一个专业的 MCP 服务器,提供 PostgreSQL 数据库操作、监控和管理功能。它通过自然语言查询提供全面的数据库分析、性能监控和智能维护建议。该服务器支持 PostgreSQL 12-18 版本,具有自动版本检测功能,并且在使用 pg_stat_statements 和 pg_stat_monitor 等可选扩展时提供增强功能。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
当您需要通过自然语言查询进行全面的监控、性能分析和维护建议时,选择此服务器用于 PostgreSQL DBA 操作,特别是在需要只读访问的生产环境限制下。
什么时候不要选它
如果您需要写入 PostgreSQL 数据库的权限,请不要选择此服务器,因为它只支持只读操作。如果您需要监控非 PostgreSQL 数据库,也应考虑替代方案。
此 server 暴露的工具
从 README 抽取出 12 个工具get_server_infoGet PostgreSQL server information and version details
get_active_connectionsMonitor current database connections and their status
get_table_bloat_analysisAnalyze table bloat across all databases
get_slow_queriesIdentify slow queries in the system
get_database_size_infoGet database size information and storage usage
get_vacuum_analyze_statsGet statistics about VACUUM and ANALYZE operations
get_lock_monitoringMonitor database locks and potential deadlocks
get_table_schema_infoGet detailed table schema information
get_autovacuum_statusCheck autovacuum configuration and status
get_replication_statusCheck PostgreSQL replication status and health
get_index_usage_statsGet index usage statistics and effectiveness
get_wait_eventsCheck database wait events for performance analysis
可对比工具
安装
安装
- 通过 PyPI 安装:
pip install mcp-postgresql-ops- 启动服务器:
mcp-server-postgresql-ops- 在 Claude Desktop 中配置(添加到 claude_desktop_config.json):
{
"mcpServers": {
"postgresql-ops": {
"command": "mcp-server-postgresql-ops",
"args": []
}
}
}- 或使用 Docker Compose:
git clone https://github.com/call518/MCP-PostgreSQL-Ops.git
cd MCP-PostgreSQL-ops
docker-compose up -dFAQ
- 使用此 MCP 服务器需要什么权限?
- 服务器使用普通用户权限即可执行基本监控任务。超级用户权限可访问所有数据库和系统信息,但大多数操作不需要超级用户权限。
- 可以将此服务器用于 Amazon RDS 等云数据库吗?
- 是的,此 MCP 服务器兼容 RDS 和 Aurora,设计为生产安全的只读操作,使用普通用户权限即可运行。
- 支持哪些 PostgreSQL 版本?
- 该服务器支持 PostgreSQL 12-18 版本,具有自动版本检测和版本感知功能。
Hacker News 讨论
开发者社区最近的相关讨论。
- 帖子 by call518 · 2025-08-20
MCP-PostgreSQL-Ops 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。