PostgreSQL Performance MCP
@rameshv29
PostgreSQL Performance MCP について
PostgreSQL performance analysis and optimization MCP server
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"postgres-performance-mcp": {
"command": "python",
"args": [
"server.py",
"--host",
"0.0.0.0",
"--port",
"8000"
]
}
}
}ツール
11Analyze database schema and provide optimization recommendations
Identify slow-running queries in the database
Analyze a SQL query and provide optimization recommendations
Recommend indexes for a given SQL query
Suggest optimized rewrites for a SQL query
Generate a comprehensive health dashboard for the database
Interactive wizard to optimize a SQL query step by step
Analyze index usage patterns and identify unused or inefficient indexes
Execute a read-only SQL query and return the results
Show PostgreSQL configuration settings with optional filtering
Check if the server is running and responsive
概要
What is PostgreSQL Performance MCP?
PostgreSQL Performance MCP is a Model Context Protocol (MCP) server for PostgreSQL database performance analysis and optimization. It uses AI to help database administrators and developers analyze database structure, query performance, index usage, and configuration, providing actionable recommendations. It runs as a remote MCP server using SSE transport and is designed for use with MCP-compatible clients like Amazon Q Developer CLI and Claude.
How to use PostgreSQL Performance MCP?
Install Python 3.12+, clone the repository, install dependencies, and configure database credentials (optionally via AWS Secrets Manager). Start the server with python server.py --host 0.0.0.0 --port 8000. Connect any MCP-compatible client using the server URL and SSE transport, then call the available tools (e.g., analyze_database_structure, get_slow_queries, recommend_indexes) with the required parameters.
Key features of PostgreSQL Performance MCP
- Database structure analysis with optimization recommendations
- Query performance analysis and bottleneck identification
- Index recommendations based on query patterns
- Slow query identification and analysis
- Database health dashboard with comprehensive metrics
- Read-only query execution for safe verification
Use cases of PostgreSQL Performance MCP
- Analyze database schema to improve table design and indexing
- Identify and optimize slow-running queries
- Get index recommendations for specific SQL queries
- Generate a database health dashboard for monitoring
- Safely execute read-only analytical queries against live databases
FAQ from PostgreSQL Performance MCP
Is PostgreSQL Performance MCP read-only?
Yes, by default all database connections use SET TRANSACTION READ ONLY to prevent accidental modifications. Query execution is strictly limited to SELECT, EXPLAIN, and SHOW commands.
What are the prerequisites to use PostgreSQL Performance MCP?
Python 3.12+, an Amazon Aurora or RDS PostgreSQL database, and optionally an AWS account for Secrets Manager. Recommended PostgreSQL extensions are pg_stat_statements and pg_buffercache.
How are database credentials managed?
Credentials can be stored in AWS Secrets Manager (recommended) or provided directly when calling tools. The secret must contain host, port, dbname, username, and password.
What transport does PostgreSQL Performance MCP use?
It uses Server-Sent Events (SSE) transport, allowing it to be deployed centrally as a remote MCP server accessible by any MCP-compatible client.
Is PostgreSQL Performance MCP production-ready?
No, this project is experimental and provided "as is" without warranty. All recommendations should be carefully reviewed before use in production environments.
「データベース」の他のコンテンツ
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
mcp-server-duckdb
ktanaka101A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
ClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.
コメント