# Postgres MCP Pro — Điều chỉnh chỉ số HypoPG, GIẢI THÍCH Kế hoạch & Kiểm tra sức khỏe (`postgres-mcp-pro`)

> Máy chủ PostgreSQL MCP sản xuất chạy qua uvx với chế độ chỉ đọc hạn chế, trình cố vấn chỉ mục khối lượng công việc, chỉ mục ảo HypoPG và phân tích pg_stat_statements.

- **Canonical URL:** https://syndipath.com/vi/mcp/postgres-mcp-pro
- **Runtime:** `pypi` | **Transport:** STDIO | **License:** MIT | **Package:** `postgres-mcp`
- **Upvotes:** 913 | **GitHub Stars:** 7420 | **Weekly Installs:** 54800
- **Security Note:** HTTP-200 đã được xác minh trên PyPI (postgres-mcp); chạy bên trong một virtualenv phù du Astral uvx bị cô lập.

## Quick CLI Setup
```bash
# Run isolated Python tool via Astral uvx
uvx postgres-mcp --access-mode=restricted

# Alternative: run via pipx
pipx run postgres-mcp --access-mode=restricted

# Add to Claude Code CLI
claude mcp add -e DATABASE_URI=${DATABASE_URI} postgres-mcp-pro -- uvx postgres-mcp --access-mode=restricted
```

## MCP Manifest (`mcp.json`)
```json
{
  "mcpServers": {
    "postgres-mcp-pro": {
      "command": "uvx",
      "args": [
        "postgres-mcp",
        "--access-mode=restricted"
      ],
      "env": {
        "DATABASE_URI": "${DATABASE_URI}"
      }
    }
  }
}
```

## Exposed MCP Tools
- `postgres_mcp_pro_query(sql_or_filter: string, limit?: number)`: Production PostgreSQL MCP server running via uvx with restricted read-only mode, workload index advisor, HypoPG virtual indexes, and pg.
- `postgres_mcp_pro_inspect_schema(namespace?: string)`: Enumerates tables, collections, column types, and active index definitions.
