MCP Configs2026年5月12日·1 分钟阅读

MCP-PostgreSQL-Ops — PostgreSQL DBA MCP (30+ tools)

Give Claude Desktop/Claude Code a PostgreSQL DBA toolbox (30+ tools) for locks, bloat, autovacuum, and stats. Works on PG 12–18; stdio or HTTP transport.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 27/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Mcp Config
安装
Pip
信任
信任等级:Established
入口
pip install mcp-postgresql-ops && mcp-postgresql-ops --help
安全暂存命令
npx -y tokrepo@latest install fb948ce5-cb80-5f54-858e-e005011db6f4 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

介绍

MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-18 with comprehensive database analysis, performance monitoring, and intelligent maintenance recommendations through natural language queries. Most features work independently, but advanced query analysis capabilities are enhanced when pg_stat_statements and (optionally) pg_stat_monitor extensions are installed.


简介

MCP-PostgreSQL-Ops 把一套 PostgreSQL 运维工具以 MCP 形式暴露给客户端,让 Agent 能直接查看健康状态、诊断性能问题并回答“数据库现在发生了什么”。

最适合: DBA 值班、故障分诊、让 Agent 帮你看数据库状态

适配: PostgreSQL 12–18;MCP 客户端(Claude Desktop/Claude Code/Cursor);stdio 或 HTTP 传输

配置时间: 10–15 分钟

关键事实(已验证)

  • README 描述提供 30+ DBA 工具,覆盖锁/死锁、膨胀、autovacuum、Schema 检查等。
  • README 说明支持 stdio(默认)与 streamable-http 两种传输。
  • GitHub:150 stars · 24 forks;最近更新 2026-05-11(GitHub API 验证)。

正文

推荐用“症状 → 证据 → 下一步动作”的排障套路:

  • 症状:查询变慢 → 证据:锁、膨胀、vacuum 统计、IO 统计 → 动作:索引/清理/参数调优。
  • 初期建议以只读方式接入,并像运维密钥一样管理 DB 凭据。
  • 团队使用时用最小权限的专用角色;多数诊断只需要系统视图/统计信息权限。

README 原文节选(verbatim)

MCP Server for PostgreSQL Operations and Monitoring

License: MIT Python Docker Pulls PostgreSQL BuyMeACoffee

Deploy to PyPI with tag PyPI PyPI - Downloads


Architecture & Internal (DeepWiki)

Ask DeepWiki


Features

  • Zero Configuration: Works with PostgreSQL 12-18 out-of-the-box with automatic version detection.
  • Natural Language: Ask questions like "Show me slow queries" or "Analyze table bloat."
  • Production Safe: Read-only operations, RDS/Aurora compatible with regular user permissions.
  • Extension Enhanced: Optional pg_stat_statements and pg_stat_monitor for advanced query analytics.
  • Comprehensive Database Monitoring: Performance analysis, bloat detection, and maintenance recommendations.
  • Smart Query Analysis: Slow query identification with pg_stat_statements and pg_stat_monitor integration.
  • Schema & Relationship Discovery: Database structure exploration with detailed relationship mapping.
  • VACUUM & Autovacuum Intelligence: Real-time maintenance monitoring and effectiveness analysis.
  • Multi-Database Operations: Seamless cross-database analysis and monitoring.

FAQ

支持哪些 PostgreSQL 版本? 答:README 表示支持 PG 12–18,并提供版本自适应工具。

如何连接数据库? 答:README 用环境变量配置 host/port/user/password/db。

能走 HTTP 吗? 答:README 提到除 stdio 外还可用 streamable-http 传输。

🙏

来源与感谢

Source: https://github.com/call518/MCP-PostgreSQL-Ops > License: MIT > GitHub stars: 150 · forks: 24

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产