Prototype · Preview: every server in the official registry, synced every 30 minutes. Reviews and accounts come in a later step.
PopNx MCPMCP servers for people who use AI · explained in plain words

PostgreSQL MCP Server

by neverinfamousversion 1.0.2i★ –iRuns on your computer
Registry nameio.github.neverinfamous/postgres-mcp

Install

Overview

Description from the maker (original English)

PostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering

PopNx MCP’s three pillars

These three are never merged into one score: opinions, measurements and popularity are different things.

What you can do with it

We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.

  • Connection: Runs on your computer
  • Transport: stdio
  • Category: Databases & datasets

Install

Pick the AI app you use, then copy the settings.

Before you install

  • Basic checks: 1 of 1 passed
  • Runs on your computer with your user’s permissions (files, network, apps).
  • The registry lists no key to fill in.

You need

  • npmNode.js installed (for the npx command)

Which app do you use?

Pick your app above. We remember it, so next time the button says “Install in …”.

Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@neverinfamous/postgres-mcp"
      ]
    }
  }
}

Run this in your terminal

claude mcp add postgres -- npx -y @neverinfamous/postgres-mcp

Open in Cursor

Or copy the settings yourself

Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@neverinfamous/postgres-mcp"
      ]
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

Open in VS Code

Or copy the settings yourself

Paste into .vscode/mcp.json in your project

{
  "servers": {
    "postgres": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@neverinfamous/postgres-mcp"
      ]
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.

Your choice stays on this device in a cookie; no account needed.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 6, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account neverinfamous, which owns the repo

  • … Not checked yet

    Still maintained

    We have not read this repo from GitHub yet

  • … Not checked yet

    Has a licence

    We have not read this repo from GitHub yet

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Compared with others in Databases & datasetsi

  • More stars than 0% of the other 953 servers in this category
  • Published to the registry more recently than 3% of the other 953 servers in this category
  • Basic checks equal to or better than 100% of the other 953 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is PostgreSQL MCP Server safe?

It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed –, and the latest version (1.0.2) reached the registry 9 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js, Docker on your computer.

What can I use instead?

In the same category: Supabase, MongoDB MCP Server, Elasticsearch MCP Server

Alternatives

Servers in the same category from other makers, sorted by stars.

Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Supabase

by supabase

Supabase’s official server lets AI create tables, query data and review project settings in your Supabase database.

Computer or cloud★ 2,993Apache-2.0Updated yesterday
Install

MongoDB MCP Server

by mongodb-js

MongoDB Model Context Protocol Server

Runs on your computer★ 1,157Apache-2.0Updated 2 days ago
Install

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

postgres-mcp

PostgreSQL MCP Server binding the Model Context Protocol to a secure PostgreSQL sandbox.

Features Code Mode — a revolutionary approach that provides access to all 278 tools through a secure, true V8 isolate (worker_threads), eliminating the massive token overhead of multi-step tool calls. Also includes schema introspection, migration tracking, smart tool filtering, deterministic error handling, connection pooling, HTTP/SSE Transport, OAuth 2.1 authentication, and extension support for citext, ltree, pgcrypto, pg_cron, pg_stat_kcache, pgvector, PostGIS, and HypoPG.

278 Specialized Tools · 24 Resources · 21 AI-Powered Prompts

[Docker Hub](https://hub.docker.com/r/writenotenow/postgres-mcp) • [npm Package](https://www.npmjs.com/package/@neverinfamous/postgres-mcp) • [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.neverinfamous/postgres-mcp) • [Wiki](https://github.com/neverinfamous/postgres-mcp/wiki) • [Tool Reference](https://github.com/neverinfamous/postgres-mcp/wiki/Tool-Reference) • [Changelog](https://github.com/neverinfamous/postgres-mcp/blob/main/CHANGELOG.md)

🎯 What Sets Us Apart

FeatureDescription
Code Mode (V8 Isolate)Massive Token Savings: Execute complex, multi-step operations inside a secure, true V8 isolate (worker_threads). Stop burning tokens on back-and-forth tool calls and reduce your AI overhead by up to 90%.
Deterministic Error HandlingNo more cryptic database errors causing AI hallucinations. We intercept and translate raw SQL exceptions into clear, actionable advice so your agent knows exactly how to recover without guessing.
278 Token-Optimized ToolsThe largest PostgreSQL toolset on the MCP registry. Every query uses zero-cost token estimation and smart dataset truncation, ensuring agents always see the big picture without blowing their context windows.
OAuth 2.1 + Granular ControlReal enterprise security. Authenticate via OAuth 2.1 and control exactly who can read, write, or administer your database with precision scopes mapped down to the specific tool layer.
Audit Trails & Semantic DiffingTotal accountability. Track exactly what your AI is doing with detailed JSON logs, automatically snapshot schemas before mutations, and confidently review semantic row-by-row diffs before restoring data.
24 Resources & 21 PromptsInstant database meta-awareness. Agents automatically read real-time health, performance, and replication metrics, and can invoke built-in prompt workflows for query tuning and schema design.
Introspection & MigrationsPrevent costly mistakes. Let your AI simulate the cascade impact of schema changes, safely order foreign-key updates, and track migration history automatically.
8 Extension EcosystemsReady for advanced workloads. First-class API support for pgvector (AI search), PostGIS (geospatial), pg_cron, pgcrypto, and more—all strictly typed and validated out of the box.
Smart Tool FilteringGive your agent exactly what it needs without overflowing IDE limits. Dynamically compile your server with any combination of our 25 distinct tool groups.
Enterprise InfrastructureBuilt for production. Blazing fast (millions of ops/sec), protected against SQL injection, features high-performance connection pooling, and supports both Streamable HTTP and Legacy SSE protocols simultaneously.

Suggested Rule (Add to AGENTS.md, GEMINI.md, etc)

MCP TOKEN MANAGEMENT:

  • Token Visibility: When interacting with postgres-mcp, always monitor the _meta.tokenEstimate (or metrics.tokenEstimate in Code Mode) returned in tool responses.
  • Audit Resource: Use the postgres://audit resource to review session-level token consumption and identify high-cost operations.
  • Proactive Efficiency: If operations are consuming high token counts, prefer code mode and proactively use limit parameters.

🚀 Quick Start

Prerequisites
  • PostgreSQL 12-18 (tested with PostgreSQL 18.1)
  • Docker (recommended) or Node.js 24+ (LTS)
Docker (Recommended)
docker pull writenotenow/postgres-mcp:latest

Add to your ~/.cursor/mcp.json or Claude Desktop config:

{

"mcpServers": { "postgres-mcp": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "POSTGRES_HOST", "-e", "POSTGRES_PORT", "-e", "POSTGRES_USER", "-e", "POSTGRES_PASSWORD", "-e", "POSTGRES_DATABASE", "writenotenow/postgres-mcp:latest", "--tool-filter", "codemode", "--audit-log", "/tmp/postgres-logs/audit.jsonl" ], "env": { "POSTGRES_HOST": "host.docker.internal", "POSTGRES_PORT": "5432", "POSTGRES_USER": "your_username", "POSTGRES_PASSWORD": "your_password", "POSTGRES_DATABASE": "your_database" } } } }

Note for Docker: Use host.docker.internal to connect to PostgreSQL running on your host machine.

📖 Full Docker guide: DOCKER_README.md · Docker Hub

npm
npm install -g @neverinfamous/postgres-mcp

postgres-mcp --transport stdio --postgres postgres://user:password@localhost:5432/database

From Source
git clone https://github.com/neverinfamous/postgres-mcp.git

cd postgres-mcp npm install npm run build node dist/cli.js --transport stdio --postgres postgres://user:password@localhost:5432/database

Development

See [From Source](#from-source) above for setup. After cloning:

npm run lint && npm run typecheck  # Run checks

npm run bench # Run performance benchmarks node dist/cli.js info # Test CLI node dist/cli.js list-tools # List available tools

Benchmarks

Run npm run bench to execute the performance benchmark suite (10 files, 93+ scenarios) powered by Vitest Bench. Use npm run bench:verbose for detailed table output.

Performance Highlights (Node.js 24, Windows 11):

AreaBenchmarkThroughput
Tool DispatchMap.get() single tool lookup~6.9M ops/sec
WHERE ValidationSimple clause (combined regex fast-path)~3.7M ops/sec
Identifier SanitizationvalidateIdentifier()~4.4M ops/sec
Auth — Token ExtractionextractBearerToken()~2.7M ops/sec
Auth — Scope CheckinghasScope()~5.3M ops/sec
Rate LimitingSingle IP check~2.3M ops/sec
LoggerFiltered debug (no-op path)~5.4M ops/sec
Schema ParsingMigrationInitSchema.parse()~2.1M ops/sec
Metadata CacheCache hit + miss pattern~1.7M ops/sec
Sandbox CreationCodeModeSandbox.create() cold start~863 ops/sec

Full benchmark results and methodology are available on the Performance wiki page.

🔗 Database Connection Scenarios

ScenarioHost to UseExample Connection String
PostgreSQL on host machinelocalhost or host.docker.internalpostgres://user:pass@localhost:5432/db
PostgreSQL in DockerContainer name or networkpostgres://user:pass@postgres-container:5432/db
Remote/Cloud PostgreSQLHostname or IPpostgres://user:pass@db.example.com:5432/db
ProviderExample Hostname
AWS RDS PostgreSQLyour-instance.xxxx.us-east-1.rds.amazonaws.com
Google Cloud SQLproject:region:instance (via Cloud SQL Proxy)
Azure PostgreSQLyour-server.postgres.database.azure.com
Supabasedb.xxxx.supabase.co
Neonep-xxx.us-east-1.aws.neon.tech
🛠️ Tool Filtering

[!IMPORTANT]

All tool groups include Code Mode (pg_execute_code) by default. To exclude it, add -codemode to your filter: --tool-filter cron,pgcrypto,-codemode

💡 Code Mode (--tool-filter codemode) is the recommended configuration — it exposes pg_execute_code, a secure, true V8 isolate sandbox providing access to all 278 tools' worth of capability with up to 90% token savings. See Tool Filtering for alternatives.

  • Requires `admin` OAuth scope — execution is logged for audit

📖 [See Full Installation Guide →](https://github.com/neverinfamous/postgres-mcp#readme)

What Can You Filter?

The --tool-filter argument accepts groups or tool names — mix and match freely:

Filter PatternExampleDescription

| Groups only | `core,jsonb,transac

Only the beginning is shown; read the rest in the repo

Ask PopNx