Skip to main content
Glama
Srijan-120

DB-Performance-MCP

by Srijan-120

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 CONCURRENTLY DDL statements for a table given a list of commonly filtered columns.

  • Check Pagination Safety: Audits query strings for OFFSET / LIMIT pagination 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_query tool)

Installation

  1. Clone this repository.

  2. Install the required dependencies:

    pip install -r requirements.txt

Running the Server

To start the MCP server, run:

python server.py

Setup in Cursor

To use this MCP server in Cursor, you can add it to your Cursor MCP configuration.

  1. Open Cursor Settings.

  2. Go to Features > MCP Servers.

  3. Add a new server with the following details:

    • Name: DB-Performance-MCP

    • Type: command

    • Command: 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-mcp
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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