Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Read PostgreSQL EXPLAIN plans for AI agents: bottlenecks, estimation errors, fixes, charts.

README.md

<!-- mcp-name: io.github.arikanatakan/dataxplan-mcp -->

dataxplan-mcp

![CI](https://github.com/arikanatakan/dataxplan-mcp/actions/workflows/ci.yml) ![PyPI](https://pypi.org/project/dataxplan-mcp/) ![License: MIT](LICENSE)

An MCP server that exposes dataxplan, the PostgreSQL EXPLAIN-plan analyzer for Python, as tools for AI agents: give it the output of EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) and it returns the bottlenecks, the estimation errors, documented findings with a suggested action and a source reference, a regression comparison, and a self-time chart.

Agents asked why a query is slow tend to eyeball the plan and get it wrong: self time is per loop and inclusive of children, so the slow node is rarely the obvious one, and a row mis-estimate (the usual root cause) is buried in the output. Reading the plan belongs in a deterministic, versioned library that the agent calls, which leaves the agent to interpret the result and decide. The server never connects to a database: the agent runs EXPLAIN and passes the output, so nothing leaves its environment.

!dataxplan-mcp architecture: an AI agent calls the server's analysis and chart tools, which route to the validated dataxplan core and return structured JSON or a PNG chart

Tools

Analysis tools return dataxplan's payload: the metrics, the findings (each with a severity, a suggestion and a documented source reference) and a summary.

| Tool | Purpose | | ---- | ------- | | analyze_plan | bottlenecks, estimation errors and findings from an EXPLAIN plan (JSON, text, YAML or XML) | | compare_plans | compare two plans for regression (timing, shape, estimates, findings) | | plan_tree | the plan as an annotated text tree (self time, rows, flags per node) | | describe_inputs | how to produce the plan, the accepted formats, the findings and the thresholds |

Chart tools return a PNG image.

| Tool | Purpose | | ---- | ------- | | plan_chart | self time per node, with the high-severity findings highlighted |

All tools are read-only, and the server makes no database connection.

Installation

Run it with uv (no install needed):

uvx dataxplan-mcp

or install from PyPI:

pip install dataxplan-mcp

Configuration

Add it to your MCP client. For example:

{
  "mcpServers": {
    "dataxplan": {
      "command": "uvx",
      "args": ["dataxplan-mcp"]
    }
  }
}

If you installed with pip, use "command": "dataxplan-mcp" with no args.

Example

analyze_plan(plan="<EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) output>")
  -> { "summary_metrics": { "execution_time_ms": 1240.0,
                            "max_estimation_error": 20000, ... },
       "findings": [ { "id": "seq_scan_hot", "severity": "high",
                       "detail": "... 95% of execution time ...",
                       "suggestion": "consider an index ...",
                       "reference": "PostgreSQL: Using EXPLAIN; the Indexes chapter" } ],
       "summary": "dataxplan - ...\n  execution time ..." }

The agent runs the EXPLAIN itself and pastes the output (any format) as plan.

Design

The server is a thin, stateless wrapper. All of the analysis lives in the dataxplan library, which computes the metrics from the documented EXPLAIN fields and grounds each finding in the PostgreSQL manual (and Leis et al. 2015 for the estimation rules). The server adds the tool schema, read-only annotations and an input-schema helper so an agent can format the input and act on the result. The findings are documented heuristics, not guarantees, and the server connects to nothing.

Related

wraps.

License

MIT. Written and maintained by Atakan Arikan, MSc Student at Tsinghua University and Politecnico di Milano.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.