NexQL Postgres MCP logo

NexQL Postgres MCP

Schema-aware Postgres MCP server with read-only defaults, lazy tool discovery, query, schema, performance, write, and admin capabilities.

Install NexQL Postgres MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nexql-postgres-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "nexql-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio nexql-postgres-mcp -- npx -y nexql-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y nexql-mcp

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

NexQL Postgres MCP is a standalone Rust server that connects MCP clients to PostgreSQL databases and exposes schema, query, context, performance, write, and administration tools. It builds an offline schema index with lexical search, inferred join relationships, value profiles, optional embeddings, and reciprocal-rank fusion to help agents work against the connected database. Read-only access is the default, with stdio spawning and HTTP transport supporting bearer authentication, sessions, and rate limiting. Reach for it when an agent needs database-aware exploration or controlled PostgreSQL operations without embedding the server inside an editor.

Use cases

  • Explore PostgreSQL schemas through an MCP client
  • Generate queries using indexed table and relationship context
  • Inspect locks and database health
  • Review performance and index suggestions
  • Enable controlled data changes when required

Key features

  • Schema-aware offline PostgreSQL index
  • Read-only access by default
  • Lazy tool discovery through the meta surface
  • Query, schema, context, performance, write, and admin tools
  • Stdio and HTTP transports
  • Bearer authentication, sessions, and rate limiting for HTTP

Tools3

What NexQL Postgres MCP lets your agent do. Expand a tool for its parameters.

Self-reported~63 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/29 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · nexql-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads590Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed3Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How NexQL Postgres MCP works

What NexQL Postgres MCP does

NexQL Postgres MCP gives MCP-compatible clients access to objects and operations inside a connected PostgreSQL database. Its toolset covers schema inspection, querying, database context, performance analysis, data changes, and administration. Access starts in read-only mode, while write and administrative operations can be enabled through the server’s access controls.

The server is designed around schema awareness rather than treating PostgreSQL as an unstructured query endpoint. It maintains an offline index containing searchable schema information, inferred relationships between tables, and value profiles. Optional embeddings and reciprocal-rank fusion can contribute to discovery alongside lexical search.

How it works

The project is distributed as an independent Rust binary that an MCP client can spawn over stdio. It also supports HTTP transport with bearer authentication, sessions, and rate limiting. Connection handling, credentials, policy, indexing, tool registration, and MCP protocol types are separated into distinct components.

Three tool surfaces are available:

  • meta starts with the smallest surface and includes discover_tools, allowing additional tools to be activated when needed.
  • dba focuses on monitoring and administration, including health checks, index suggestions, and lock inspection.
  • full activates the complete tool set.

The server provides 55 tools across Schema, Query, Context, Perf, Write, and Admin areas. It operates on objects within the selected database, such as tables, indexes, and columns, rather than managing the database catalog itself.

Setup and configuration

The recommended cross-client installation uses Node.js and npx:

Terminal
npx -y nexql-mcp@latest postgres://dev@localhost:5432/appdb doctor

The package also provides setup, init, and tui commands for creating connection profiles and wiring the server into supported clients. A typical MCP configuration launches npx with the nexql-mcp@latest package and a named profile. Claude Desktop has a downloadable bundle that accepts a database URL and includes an option to allow data changes; the default for that option is off.

Permanent installation is available through npm, the project’s shell or PowerShell installers, manual release archives, Docker, or Cargo. Cargo builds require clang/libclang. Prebuilt GNU/Linux binaries require glibc 2.35 or newer; Docker can avoid that host-library requirement.

Tools and capabilities

The available categories support database discovery and operations at different levels:

  • Schema tools expose database structure for agent use.
  • Query tools support working with PostgreSQL data.
  • Context tools use the indexed database knowledge to improve discovery.
  • Performance tools support analysis such as index suggestions.
  • Write tools provide controlled data changes when enabled.
  • Admin tools cover monitoring tasks such as health and lock checks.
  • Meta tools let clients discover and activate tools on demand.

Limitations and notes

CREATE DATABASE and DROP DATABASE are rejected in every access mode. The server manages objects inside an already connected database, not PostgreSQL’s database-level catalog. Full OAuth gateway functionality remains part of NexQL Pro rather than this standalone server.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about NexQL Postgres MCP

NexQL Postgres MCP is an MCP server that connects AI clients to PostgreSQL databases through stdio or HTTP. Its main tools cover schema discovery, queries, database context, performance analysis, writes, administration, and lazy tool activation, with read-only access enabled by default for safer database exploration.

Install it with `npx -y nexql-mcp@latest`, then run `setup` or `init` to configure a connection and MCP client. Node.js is required for the npx method. Permanent alternatives include npm, release installers, Docker, manual binaries, and Cargo builds.

Yes, NexQL Postgres MCP supports Cursor configuration through `nexql-mcp init cursor` or a standard MCP server entry using `npx`. The setup command can write the client configuration, and the server can be launched with a named database profile.

Enable the server’s data-change access option during configuration; read-only access is the default. The Claude Desktop installer exposes an “Allow changes to data” switch, which starts off. Write and administrative tools are available as part of the broader tool set.

No. NexQL Postgres MCP rejects `CREATE DATABASE` and `DROP DATABASE` in every access mode. It operates on objects within an already connected PostgreSQL database, including tables, indexes, and columns, rather than managing the database catalog.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNexQL Postgres MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nexql-postgres-mcp?style=directory)](https://allmcps.com/mcp/nexql-postgres-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/nexql-postgres-mcp"><img src="https://allmcps.com/api/badge/nexql-postgres-mcp?style=directory" alt="NexQL Postgres MCP on AllMCPs" /></a>