MP

mukul975/postgres-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

12 stars 10 forks 品質 71 トレンド 19MIT

🔄 PostgreSQL MCP Server – AI-Powered PostgreSQL Management & Monitoring. A powerful, AI-integrated PostgreSQL Model Context Protocol (MCP) server for automated database operations, monitoring,...

概要

A powerful, AI-integrated PostgreSQL Model Context Protocol (MCP) server for . Seamlessly manage PostgreSQL with tools and prompts designed for . : https://github.com/mukul975/postgres-mcp-server.git * 🔍 Explore, diagnose & optimize PostgreSQL databases with . * 💬 Interact naturally using for SQL generation, health checks, and performance reviews. * 🛡️ Built-in security, permission validation, and error handling. * ⚙️ Developer-ready integration for , , and custom agents. * ✅ Create/list databases & schemas * ✅ Describe tables, analyze indexes * ✅ Safe SELECT, UPDATE, DELETE execution * 📈 Query performance & execution plan insights * 🔒 Lock analysis, replication lag checks * 🚀 Index, query, and buffer pool optimization * 👥 User creation, role auditing * 🔐 Privilege granting & connection monitoring * 🧪 Table bloat check, autovacuum insights * 💽 WAL logs, checkpoints, long transaction alerts To help you navigate, tools are grouped under the following main categories:

README

以下は原文 README の抜粋です。原文を見る。

🔄 PostgreSQL MCP Server – AI-Powered PostgreSQL Management & Monitoring

A powerful, AI-integrated PostgreSQL Model Context Protocol (MCP) server for automated database operations, monitoring, security, diagnostics, and optimization. Seamlessly manage PostgreSQL with tools and prompts designed for AI assistants like Claude and ChatGPT.

GitHub Repository: https://github.com/mukul975/postgres-mcp-server.git


📌 Why Use This?

  • 🔍 Explore, diagnose & optimize PostgreSQL databases with over 200 specialized tools.
  • 💬 Interact naturally using AI prompts for SQL generation, health checks, and performance reviews.
  • 🛡️ Built-in security, permission validation, and error handling.
  • ⚙️ Developer-ready integration for Claude, ChatGPT, and custom agents.

🔑 Features at a Glance

🔧 Core Database Operations

  • ✅ Create/list databases & schemas
  • ✅ Describe tables, analyze indexes
  • ✅ Safe SELECT, UPDATE, DELETE execution

📊 Monitoring & Performance

  • 📈 Query performance & execution plan insights
  • 🔒 Lock analysis, replication lag checks
  • 🚀 Index, query, and buffer pool optimization

🛡️ Security & Access Control

  • 👥 User creation, role auditing
  • 🔐 Privilege granting & connection monitoring

⚙️ Diagnostic Utilities

  • 🧪 Table bloat check, autovacuum insights
  • 💽 WAL logs, checkpoints, long transaction alerts

📚 Tool Categories

To help you navigate, tools are grouped under the following main categories:

  • 🔧 General Database Operations
  • 👥 User & Role Management
  • 📈 Performance Monitoring & Tuning
  • 🔁 Replication & Backup
  • 🔒 Lock & Concurrency Management
  • ✅ Constraint & Integrity Management
  • 📊 Resource and Activity Monitoring
  • 🧰 Index and Table Maintenance
  • 🔬 Advanced Analysis & Diagnostics

🚀 Quick Start

1. Installation

python -m venv venv
source venv/bin/activate   # or venv\Scripts\activate on Windows
pip install -r requirements.txt

2. Configuration

cp .env.example .env  # or use copy on Windows
# Update with:
DATABASE_URL=postgresql://username:password@localhost:5432/db

3. Run the Server

python postgres_server.py

✅ For MCP CLI users:

mcp dev postgres_server.py

🧠 Integrate with Claude Desktop

Example config (claude_desktop_config.json):

{
  "mcpServers": {
    "postgres": {
      "command": "python",
      "args": ["postgres_server.py"],
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "postgres": { "command": "python", "args": ["postgres_server.py"], "cwd": "C:\\path\\to\\postgres-mcp-server", "env": { "DATABASE_URL": "postgresql://username:password@localhost:5432/database" } } } }