技能潮 SkillTide 提交收录
官方说明10 个来源MCP 服务8 天前
pgtuner_mcp

pgtuner_mcp

🐍 - PostgreSQL performance tuning
在 GitHub 查看 ↗直链 · 无中转页
官方说明provides AI-powered PostgreSQL performance tuning capabilities.
配置模板(请按你的客户端调整)
claude mcp add pgtuner-mcp -- npx -y pgtuner_mcp
这是根据仓库名生成的可粘贴骨架,命令行参数与包名请以该项目 README 为准。
★ 数取值
29 ★ · isdaniel/pgtuner_mcp · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 32 次 · 被 10 个来源列出
评分构成
综合分 1,003 · 29 ★ · 10 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 isdaniel/pgtuner_mcp;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

PostgreSQL Performance Tuning MCP

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

A Model Context Protocol (MCP) server that provides AI-powered PostgreSQL performance tuning capabilities. This server helps identify slow queries, recommend optimal indexes, analyze execution plans, and leverage HypoPG for hypothetical index testing.
Features
Query Analysis
- Retrieve slow queries from pg_stat_statements with detailed statistics
- Analyze query execution plans with EXPLAIN and EXPLAIN ANALYZE
- Identify performance bottlenecks with automated plan analysis
- Monitor active queries and detect long-running transactions
Index Tuning
- AI-powered index recommendations based on query workload analysis
- Hypothetical index testing with **HypoPG** extension (no disk usage)
- Find unused and duplicate indexes for cleanup
- Estimate index sizes before creation
- Test query plans with proposed indexes before implementing
Database Health
- Comprehensive health scoring with multiple checks
- Connection utilization monitoring
- Cache hit ratio analysis (buffer and index)
- Lock contention detection
- Vacuum health and transaction ID wraparound monitoring
- Replication lag monitoring
- Background writer and checkpoint analysis
Vacuum Monitoring
- Track long-running VACUUM and VACUUM FULL operations in real-time
- Monitor autovacuum progress and performance
- Identify tables that need vacuuming
- View recent vacuum activity history
- Analyze autovacuum configuration effectiveness
I/O Performance Analysis
- Analyze disk read/write patterns across tables and indexes
- Identify I/O bottlenecks and hot tables
- Monitor buffer cache hit ratios
- Track temporary file usage indicating work_mem issues
- Analyze checkpoint and background writer I/O
- PostgreSQL 16+ enhanced pg_stat_io metrics support
Configuration Analysis
- Review PostgreSQL settings by category
- Get recommendations for memory, checkpoint, WAL, autovacuum, and connection settings
- Identify suboptimal configurations
MCP Prompts & Resources
- Pre-defined prompt templates for common tuning workflows
- Dynamic resources for table stats, index info, and health checks
- Comprehensive documentation resources
Installation
Standard Installation (for MCP clients like Claude Desktop)
Or using uv:
Manual Installation
Configuration
Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| DATABASE_URI | PostgreSQL connection string | Yes |
| PGTUNER_EXCLUDE_USERIDS | Comma-separated list of user IDs (OIDs) to exclude from monitoring | No |
| PGTUNER_STATEMENT_TIMEOUT_MS | Per-statement timeout in ms (default 30000, 0=disable) | No |
| PGTUNER_IDLE_TXN_TIMEOUT_MS | Idle-in-txn timeout in ms (default 60000) | No |
| PGTUNER_LOCK_TIMEOUT_MS | Lock timeout in ms (default 5000) | No |
| PGTUNER_CORS_ALLOW_ORIGINS | Comma-separated CORS allowlist; * for all | No |
| PGTUNER_LINT_DISABLED_RULES | Comma-separated rule IDs to disable in linter | No |
**Connection String Format:** postgresql://user:password@host:port/database
Minimal User Permissions
To run this MCP server, the PostgreSQL user requires specific permissions to query system catalogs and extensions. Below are the minimal permissions needed for different feature sets.
Basic Permissions (Required for Core Functionality)
Extension-Specific Permissions
**For pgstattuple (Bloat Detection):**
**For HypoPG (Hypothetical Index Testing):**
Complete Setup Script
Excluding Specific Users from Monitoring
You can exclude specific PostgreSQL users from being included in query analysis and monitoring results. This is useful for filtering out:
- Monitoring or replication users
- System accounts
- Internal application service accounts
Set the PGTUNER_EXCLUDE_USERIDS environment variable with a comma-separated list of user OIDs:
To find the OID for a specific PostgreSQL user:
When configured, the following queries are filtered:
- pg_stat_activity queries (filters on usesysid column)
- pg_stat_statements queries (filters on userid column)
This affects tools like get_slow_queries, get_active_queries, analyze_wait_events, check_database_health, and get_index_recommendations.
MCP Client Configuration
Add to your cline_mcp_settings.json or Claude Desktop config:
来源
awesome · https://github.com/isdaniel/pgtuner_mcp
按领域浏览
MCP 服务
Traction
29 ★
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引