MCP Catalogs
首页MCP-PostgreSQL-Ops screenshot

MCP-PostgreSQL-Ops

by call518·149·综合分 50

功能全面的 MCP 服务器,提供 30 多种 PostgreSQL 数据库管理工具,支持性能分析、膨胀检测和监控。

databasedeveloper-toolsops-infra
24
Forks
3
活跃 Issue
本月
最近提交
2 天前
收录于

概述

MCP-PostgreSQL-Ops 是一个专业的 MCP 服务器,提供 PostgreSQL 数据库操作、监控和管理功能。它通过自然语言查询提供全面的数据库分析、性能监控和智能维护建议。该服务器支持 PostgreSQL 12-18 版本,具有自动版本检测功能,并且在使用 pg_stat_statements 和 pg_stat_monitor 等可选扩展时提供增强功能。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:AI 助手监控 PostgreSQL 数据库健康状态和性能
:数据库管理员分析表膨胀和维护需求
:开发团队调查慢查询和优化机会
:使用此 MCP 服务器需要什么权限?
:可以将此服务器用于 Amazon RDS 等云数据库吗?
:支持哪些 PostgreSQL 版本?

什么时候选它

当您需要通过自然语言查询进行全面的监控、性能分析和维护建议时,选择此服务器用于 PostgreSQL DBA 操作,特别是在需要只读访问的生产环境限制下。

什么时候不要选它

如果您需要写入 PostgreSQL 数据库的权限,请不要选择此服务器,因为它只支持只读操作。如果您需要监控非 PostgreSQL 数据库,也应考虑替代方案。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • get_server_info

    Get PostgreSQL server information and version details

  • get_active_connections

    Monitor current database connections and their status

  • get_table_bloat_analysis

    Analyze table bloat across all databases

  • get_slow_queries

    Identify slow queries in the system

  • get_database_size_info

    Get database size information and storage usage

  • get_vacuum_analyze_stats

    Get statistics about VACUUM and ANALYZE operations

  • get_lock_monitoring

    Monitor database locks and potential deadlocks

  • get_table_schema_info

    Get detailed table schema information

  • get_autovacuum_status

    Check autovacuum configuration and status

  • get_replication_status

    Check PostgreSQL replication status and health

  • get_index_usage_stats

    Get index usage statistics and effectiveness

  • get_wait_events

    Check database wait events for performance analysis

可对比工具

postgres-mcpmysql-mcpdatabase-mcpmcp-databasesupabase-mcp

安装

安装

  1. 通过 PyPI 安装:
pip install mcp-postgresql-ops
  1. 启动服务器:
mcp-server-postgresql-ops
  1. 在 Claude Desktop 中配置(添加到 claude_desktop_config.json):
{
  "mcpServers": {
    "postgresql-ops": {
      "command": "mcp-server-postgresql-ops",
      "args": []
    }
  }
}
  1. 或使用 Docker Compose:
git clone https://github.com/call518/MCP-PostgreSQL-Ops.git
cd MCP-PostgreSQL-ops
docker-compose up -d

FAQ

使用此 MCP 服务器需要什么权限?
服务器使用普通用户权限即可执行基本监控任务。超级用户权限可访问所有数据库和系统信息,但大多数操作不需要超级用户权限。
可以将此服务器用于 Amazon RDS 等云数据库吗?
是的,此 MCP 服务器兼容 RDS 和 Aurora,设计为生产安全的只读操作,使用普通用户权限即可运行。
支持哪些 PostgreSQL 版本?
该服务器支持 PostgreSQL 12-18 版本,具有自动版本检测和版本感知功能。

Hacker News 讨论

开发者社区最近的相关讨论。

MCP-PostgreSQL-Ops 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。