DB-Performance-MCP
Provides tools for analyzing PostgreSQL query plans (EXPLAIN ANALYZE), suggesting CREATE INDEX statements, and auditing query pagination safety, helping optimize database performance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DB-Performance-MCPSuggest indexes for the orders table on customer_id and order_date"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Database Query & Index Performance Optimizer MCP Server
A lightweight Model Context Protocol (MCP) server written in Python using FastMCP. It provides LLM clients (Cursor, Claude Desktop, AntiGravity) with tools to analyze SQL queries, suggest indexes, and flag unpaginated large-table query risks.
Features
Analyze Query Plan: Connects to a PostgreSQL database, runs
EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON)inside a rolled-back transaction to safely detect performance bottlenecks like sequential scans.Suggest Indexes: Generates
CREATE INDEX CONCURRENTLYDDL statements for a table given a list of commonly filtered columns.Check Pagination Safety: Audits query strings for
OFFSET / LIMITpagination that can degrade performance on large tables, suggesting keyset (cursor-based) alternatives.
Related MCP server: Postgres MCP Pro
Prerequisites
Python 3.11+
PostgreSQL (if using the
analyze_querytool)
Installation
Clone this repository.
Install the required dependencies:
pip install -r requirements.txt
Running the Server
To start the MCP server, run:
python server.pySetup in Cursor
To use this MCP server in Cursor, you can add it to your Cursor MCP configuration.
Open Cursor Settings.
Go to Features > MCP Servers.
Add a new server with the following details:
Name:
DB-Performance-MCPType:
commandCommand:
python /path/to/DB-Performance-MCP/server.py(adjust the path appropriately)
Docker Support
You can also run the server via Docker:
docker build -t db-performance-mcp .
docker run db-performance-mcpThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Postgres MCP server with index tuning, explain plans, health checks, and safe sql execution.Last updated10MIT
- AlicenseAqualityCmaintenanceA Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution.Last updated9MIT
- AlicenseBqualityCmaintenanceAn open-source MCP server for PostgreSQL that provides database health analysis, index tuning, query plan optimization, and safe SQL execution, suitable for both development and production environments.Last updated9MIT
- Alicense-qualityAmaintenanceA Python MCP server that enables schema discovery, read-only SQL queries, table previews, and index/relationship analysis on PostgreSQL databases.Last updated1MIT
Related MCP Connectors
MCP server for managing Prisma Postgres.
MCP server for generating rough-draft project plans from natural-language prompts.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Srijan-120/DB-Performance-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server