db-management

by Sabbir ChowdhuryUpdated May 4, 2026

db-management equips database developers and DBAs with targeted tools for query optimization. Use analyze_query for AI-driven performance analysis, root causes, and fix recommendations; detect_slow_queries to identify slow runners in PostgreSQL, MySQL, or MongoDB; and suggest_indexes to spot missing indexes from WHERE, JOIN, and ORDER BY clauses. Get execution plans via explain_query and table health stats with get_table_stats.

Free Community Server

  • Free
  • Direct access
  • No signup

Connect db-management

Pick where you'll use it. We'll show the one step you need.

  1. API key required

    Replace YOUR_API_KEY below with the key this server's developer gave you.

  2. Add it to Claude

    Opens Claude with this server filled in as a custom connector. Click Add, then Connect and sign in with MCPize. Works on claude.ai, Claude Desktop and mobile.

    Add to Claude

    On Claude Team and Enterprise, only organization Owners can add custom connectors.

    Using Claude Code?

    terminal
    claude mcp add --transport http --scope user db-management https://db-management.mcpize.run

    Or let the MCPize CLI set it up.

    $ npx mcpize install db-management --client claude-code
    Manual setup & config

    Paste this JSON config

    JSON
    {
      "mcpServers": {
        "db-management": {
          "type": "http",
          "url": "https://db-management.mcpize.run"
        }
      }
    }

    Config file: Claude Code: .mcp.json (project) or ~/.claude.json (user). claude.ai, Claude Desktop and mobile: use Add to Claude above.

    Direct access — no authentication required

Config files for Claude, Cursor and VS Code

Claude Code

Run in your terminal.

claude mcp add --transport http --scope user db-management https://db-management.mcpize.run

Cursor

Add to ~/.cursor/mcp.json, or .cursor/mcp.json in your project.

{
  "mcpServers": {
    "db-management": {
      "url": "https://db-management.mcpize.run"
    }
  }
}

VS Code

Run in your terminal, or add the server to .vscode/mcp.json.

code --add-mcp '{"name":"db-management","type":"http","url":"https://db-management.mcpize.run"}'

About db-management

Overview

The db-management MCP server provides specialized tools for diagnosing and optimizing database queries across PostgreSQL, MySQL, and MongoDB. It connects directly to your database to analyze execution plans, detect slow queries, and suggest indexes, enabling precise performance tuning without manual deep dives. Database teams use it to reduce query times and resource usage through data-driven insights.

Key Capabilities

  • analyze_query: Analyzes a raw SQL query's execution plan to pinpoint performance issues, root causes, severity levels, and targeted fixes with estimated improvements.
  • detect_slow_queries: Scans live or historical queries using database-specific stats (pg_stat_statements for PostgreSQL, performance_schema for MySQL, currentOp for MongoDB) to identify current or past slow performers.
  • suggest_indexes: Parses WHERE, JOIN, and ORDER BY clauses in a query, compares against existing indexes, and recommends missing ones for better performance.
  • explain_query: Executes EXPLAIN (or EXPLAIN ANALYZE with verbose flag) on a query, delivering a readable breakdown of the plan, bottlenecks like sequential scans, and improvement suggestions.
  • get_table_stats: Fetches table metrics including size, row count, index size, health score, plus PostgreSQL-specific details like last vacuum time and sequential scans.
  • compare_queries: Contrasts execution plans of two query versions side-by-side, uses AI to declare a winner, and explains why with actionable recommendations.

Use Cases

Run detect_slow_queries on a production PostgreSQL instance to list top slow queries from pg_stat_statements, then apply analyze_query to refactor the worst offender. Before deploying a new report query, use suggest_indexes to check for missing indexes on JOIN columns and avoid full table scans. Compare an original SQL query against a rewritten version with compare_queries to validate which runs faster and why during code reviews. Check table bloat with get_table_stats on high-traffic tables to schedule vacuums based on sequential scan counts.

Who This Is For

Database administrators, backend developers, and data engineers who write and optimize SQL queries. Requires familiarity with SQL and basic database concepts like indexes and execution plans; ideal for intermediate users managing PostgreSQL, MySQL, or MongoDB workloads.

Tools

  • Takes a raw SQL query and returns a full AI-powered analysis. Analyzes query execution plan to identify performance issues, root causes, and provides fix recommendations with severity and estimated improvement.

    Try: "Analyze slow users join query on PostgreSQL"
  • Takes two versions of the same query and compares their execution plans side by side. Uses AI to determine which is better and why, returning a winner with reasoning and recommendation.

    Try: "Compare old vs new orders query on PostgreSQL"
  • Connects to the database and finds queries that are currently running slow or have historically been slow. For PostgreSQL uses pg_stat_statements, for MySQL uses performance_schema, for MongoDB uses currentOp.

    Try: "Find slow queries in PostgreSQL db over 2s"
  • Runs EXPLAIN on a query and returns a human-readable breakdown of the execution plan. Uses EXPLAIN ANALYZE for real timing if verbose flag is set. Identifies bottlenecks like sequential scans and provides suggestions.

    Try: "Explain this query with timings on MySQL"
  • Returns health statistics about a table - size, row count, index size, and health score. For PostgreSQL also shows last vacuum time and sequential scan count.

    Try: "Get health stats for products table in MongoDB"
  • Analyzes a query and compares it with existing indexes on the table to suggest what indexes are missing. Parses WHERE, JOIN, and ORDER BY clauses to identify columns that should be indexed.

    Try: "Suggest indexes for orders query on users table"

Loading reviews...

Developer

SC
@sabbirchowdhury40854