Skip to main content
📖 The AI Tool Bible

Postgres MCP Pro

Open-source Postgres MCP server with deterministic health checks, index tuning, and safe SQL execution.

Free· Free and open source (MIT license). No paid tiers.MCP ServersModel-agnostic (works with any MCP-capable LLM); optional OpenAI models for experimental LLM-based index tuning
Visit website →
Best for

Backend developers and DBAs who want an AI assistant that can safely explore, explain, and tune a real Postgres database in development or production with reproducible, algorithmic index recommendations.

Skip if

Teams on non-Postgres databases, users who need fine-grained row/column ACLs, or anyone wanting a hosted GUI dashboard rather than an MCP server wired into an AI IDE.

Postgres MCP Pro is an open-source Model Context Protocol (MCP) server from Crystal DBA that gives AI coding assistants like Claude Desktop, Cursor, Windsurf, Cline, Goose, and Qodo Gen a rich, opinionated interface into a PostgreSQL database. Instead of merely wrapping a connection and letting the LLM improvise, it exposes a set of deterministic tools for schema exploration, query execution, EXPLAIN plans, workload analysis, and comprehensive database health checks (index health, buffer cache hit rate, connection utilization, vacuum/transaction-id wraparound risk, replication lag, invalid constraints, sequence limits). Its standout feature is principled index tuning: it enumerates candidate multi-column indexes, uses the hypopg extension to simulate their effect on real query plans, and runs a greedy Anytime-style search adapted from Microsoft's SQL Server Tuning Advisor to recommend a Pareto-optimal set of indexes given a storage budget. An experimental Optimization-by-LLM mode can substitute the search heuristic with an iterative LLM proposer (requires OPENAI_API_KEY). Safe SQL execution is enforced by parsing statements with pglast and running them inside read-only transactions in restricted mode, blocking COMMIT/ROLLBACK escape hatches. It ships as a Docker image or PyPI package, speaks both stdio and SSE transports, uses psycopg3 under the hood, and works against Postgres 13-17 including RDS, Azure, and Cloud SQL where pg_stat_statements and hypopg can be enabled. Ideal for developers who want their AI agent to genuinely reason about performance rather than guess.

Editor's take

This is the Postgres MCP server I would actually trust to touch a production database. The combination of pglast-guarded read-only transactions and hypopg-backed index simulation puts it in a different league from the reference server that just executes whatever SQL the model emits. The experimental LLM tuner is a nice bonus, but the classical Anytime search is the real value.

— The AI Tool Bible editorial team

Pros

  • Deterministic index tuning based on the Anytime Algorithm plus hypopg what-if simulation, not LLM guesswork
  • Comprehensive PgHero-derived health checks covering bloat, cache, connections, vacuum, replication, and sequences
  • Restricted mode enforces read-only transactions and blocks COMMIT/ROLLBACK escapes via pglast SQL parsing
  • Works with any MCP client (Claude Desktop, Cursor, Windsurf, Cline, Goose, Qodo Gen) and supports both stdio and SSE transports
  • MIT-licensed and free; installs via Docker, pipx, uvx, or uv with clear per-client config recipes
  • Cost-benefit index selection along the Pareto front with configurable performance-vs-storage threshold
  • Actively maintained by Crystal DBA with Discord community and public roadmap on GitHub

Cons

  • ⚠️ Postgres-only; no MySQL, SQL Server, or other database support
  • ⚠️ Full-featured tuning requires pg_stat_statements and hypopg extensions, which self-managed installs may need to install manually
  • ⚠️ Only two coarse access modes (unrestricted vs restricted) with no per-table or column-level ACLs
  • ⚠️ Credentials are supplied at startup via DATABASE_URI, so switching databases means restarting the server
  • ⚠️ Experimental LLM-based index tuning requires an OpenAI API key and adds external cost/latency
  • ⚠️ Workload compression is basic (query normalization, equal weighting), which can misrank importance in complex workloads

Use cases

AI-assisted query optimization in Cursor or Claude DesktopAutomated index recommendations for slow workloadsEXPLAIN plan review with hypothetical indexesProduction database health monitoring via LLM chatDetecting bloated, duplicate, or unused indexesVacuum and transaction-id wraparound risk auditsSafe read-only SQL exploration by AI agentsSchema introspection for LLM SQL generationShared team Postgres MCP endpoint over SSE

Explore related

Compare with similar tools

All in MCP Servers

Airtable MCP Server

MCP Servers

Model Context Protocol server that gives LLMs full read/write access to your Airtable bases.

Free· Open source (MIT) and free to run. You still need an Airtable account and personal access token; Airtable itself is Free / Team $20 per user/mo / Business $45 per user/mo / Enterprise (custom).Natural-language CRM queries against AirtableLLM-driven lead triage and enrichment

Apple Notes MCP

MCP Servers

Let Claude read your local Apple Notes over the Model Context Protocol.

Free· Free / open-source (MIT). No hosted service; runs locally on your Mac.Personal knowledge retrieval from Apple NotesSearching decade-old meeting notes during a Claude chat

AWS MCP Servers

MCP Servers

Official AWS Labs collection of Model Context Protocol servers for connecting AI coding assistants and agents to AWS services and documentation.

Free· Free and open source (Apache 2.0). AWS service usage billed at standard AWS rates. Optional AWS-hosted 'remote managed' servers included at no additional charge beyond consumed AWS services.AWS infrastructure-as-code scaffolding with CDK or CloudFormationGrounded answers from live AWS documentation

Azure MCP Server

MCP Servers

Official Microsoft MCP server that exposes 40+ Azure services to AI agents under the developer's own Entra ID credentials.

Free· Server is free and MIT-licensed. Azure resource usage is billed separately at standard Azure rates based on whatever services the agent queries or mutates.Natural-language Azure resource inventoryLog Analytics and Kusto (KQL) querying from an agent

Blender MCP

MCP Servers · Model-agnostic; commonly paired with Claude (Sonnet/Opus) via Claude Desktop, but works with any MCP-capable client

Give Claude hands inside Blender — an MCP server for natural-language 3D modeling.

Free· Free and open-source (MIT license). No hosted service, no subscription; you supply your own MCP-capable client (Claude Desktop, Cursor, VS Code, OpenCode) and pay only for whatever LLM the client uses.AI-assisted 3D scene blockingGenerative prop and mesh creation via Hyper3D Rodin

Brave Search MCP

MCP Servers

Give any MCP client web and local search powered by the Brave Search API.

Freemium· Free: $ 0 USD · Team: $ 4 USD per user/month · Enterprise: $ 21 USD per user/monthGrounded web search inside Claude DesktopAgent fact-checking and citation lookup