
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A remote MCP server that analyzes PostgreSQL database structure, query performance, index usage, and configuration to provide optimization recommendations.
PostgreSQL Analyzer MCP is cataloged as an MCP server attributed to rameshv29. A remote MCP server that analyzes PostgreSQL database structure, query performance, index usage, and configuration to provide optimization recommendations. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for PostgreSQL Analyzer MCP are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It runs as a remote MCP server using Streamable HTTP transport.
No, by default it operates in read-only mode and limits execution to SELECT, EXPLAIN, and SHOW commands.
README.md · c14590d7be5b · 采集于 2026-11-13 10:47:19 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server for PostgreSQL database performance analysis and optimization.
PostgreSQL Analyzer MCP is a powerful tool that leverages AI to help database administrators and developers optimize their PostgreSQL databases. It provides comprehensive analysis of database structure, query performance, index usage, and configuration settings, along with actionable recommendations for improvement.
This tool runs as a remote MCP server using Streamable HTTP transport, allowing it to be deployed centrally and accessed by any MCP-compatible client, including Amazon Q Developer CLI, Claude and other AI assistants that support the MCP protocol.
EXPERIMENTAL: This project is experimental and provided as a demonstration of what's possible with MCP and PostgreSQL. All recommendations and code should be carefully reviewed before implementation in any production environment.
NOT OFFICIAL: This is a personal project and not affiliated with, endorsed by, or representative of any organization I work for or contribute to. All opinions and approaches are my own.
NO LIABILITY: This tool is provided "as is" without warranty of any kind. Use at your own risk. The author is not liable for any damages or issues arising from the use of this software.
This tool operates in read-only mode by default. All database connections are established with SET TRANSACTION READ ONLY to prevent any accidental modifications to your database. The query execution functionality is strictly limited to SELECT, EXPLAIN, and SHOW commands.
Clone the repository:
git clone https://github.com/yourusername/postgres-performance-mcp.git
cd postgres-performance-mcp
Create virtual environment and Install dependencies:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Clone the repository:
git clone https://github.com/yourusername/postgres-performance-mcp.git
cd postgres-performance-mcp
Build the Docker image:
docker build -t postgres-analyzer-mcp -f Dockerfile .
Run the Docker container:
docker run -p 8000:8000 postgres-analyzer-mcp
For AWS credentials (if using Secrets Manager):
docker run -p 8000:8000 \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret_key \
-e AWS_DEFAULT_REGION=your_region \
postgres-analyzer-mcp
Configure your database credentials:
python src/main.py --host 0.0.0.0 --port 8000
# The server starts automatically when running the container
docker run -p 8000:8000 postgres-analyzer-mcp
To connect to your remote MCP server, configure your MCP client with:
Server URL: http://your-server-address:8000/mcp
Transport: Streamable HTTP
Connect to the server using any MCP-compatible client and use the available tools:
analyze_database_structure(secret_name="my-postgres-db-credentials", region_name="us-west-2")
analyze_database_structure: Analyze database schema and provide optimization recommendationsget_slow_queries: Identify slow-running queries in the databaseanalyze_query: Analyze a SQL query and provide optimization recommendationsrecommend_indexes: Recommend indexes for a given SQL querysuggest_query_rewrite: Suggest optimized rewrites for a SQL querydatabase_health_dashboard: Generate a comprehensive health dashboard for the databasequery_optimization_wizard: Interactive wizard to optimize a SQL query step by stepanalyze_index_usage: Analyze index usage patterns and identify unused or inefficient indexesexecute_read_only_query: Execute a read-only SQL query and return the resultsshow_postgresql_settings: Show PostgreSQL configuration settings with optional filteringhealth_check: Check if the server is running and responsiveThe real power of this tool comes from customizing it to your specific environment:
To use AWS Secrets Manager for storing database credentials:
Create a secret in AWS Secrets Manager with the following keys:
host: Database hostnameport: Database port (usually 5432)dbname: Database nameusername: Database usernamepassword: Database passwordEnsure your AWS credentials are configured with appropriate permissions to access the secret.
Use the secret name when calling the tools:
analyze_query(query="SELECT * FROM users WHERE user_id = 123", secret_name="my-postgres-db-credentials")
For optimal performance analysis, we recommend enabling the following extensions:
CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION pg_buffercache;
And adding these settings to your postgresql.conf:
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.track = all
analyze_database_structure(secret_name="my-postgres-db-credentials")
analyze_query(
query="SELECT * FROM orders JOIN customers ON orders.customer_id = customers.id WHERE orders.status = 'pending'",
secret_name="my-postgres-db-credentials"
)
recommend_indexes(
query="SELECT * FROM products WHERE category = 'electronics' AND price < 100",
secret_name="my-postgres-db-credentials"
)
execute_read_only_query(
query="SELECT schemaname, relname, n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC LIMIT 10",
secret_name="my-postgres-db-credentials"
)
To deploy the MCP server to a remote machine:
docker build -t postgres-analyzer-mcp -f Dockerfile .
docker run -d -p 8000:8000 postgres-analyzer-mcp
docker-compose or systemd to ensure the container restarts if the server rebootsFor secure access, consider setting up:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for PostgreSQL Analyzer MCP from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/postgresql-analyzer-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.