Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.
PopNx MCPMCP servers for people who use AI · explained in plain words

Postgres

by marcelo-ochoaversion 1.0.8i★ 2 (Stars for the whole repo)iRuns on your computer
Registry nameio.github.marcelo-ochoa/postgres

How to install

Overview

Description from the maker (original English)

MCP server for interacting with PostgreSQL databases

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
  • You need to fill in: POSTGRES_PASSWORD

Install

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

Passed 2/2 checks · Runs on your computer

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Sign up and create a Postgres key

    Open the maker’s site, sign up and create an API key for the next step. It may cost money.

    How to get a key is in the maker’s README below

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "postgres": {
          "command": "npx",
          "args": [
            "-y",
            "@marcelo-ochoa/server-postgres"
          ],
          "env": {
            "POSTGRES_USER": "your-value",
            "POSTGRES_PASSWORD": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Postgres and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Postgres or shows a Postgres tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Postgres yet

Postgres runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Postgres

  • You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)
  • You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)
  • You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)

B · Others in Databases & datasets that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Sign up and create a Postgres key

    Open the maker’s site, sign up and create an API key for the next step. It may cost money.

    How to get a key is in the maker’s README below

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add postgres --env POSTGRES_USER=your-value --env POSTGRES_PASSWORD=your-value -- npx -y @marcelo-ochoa/server-postgres

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Postgres listed as connected

  6. Try it

    Use Postgres and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Postgres or shows a Postgres tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Sign up and create a Postgres key

    Open the maker’s site, sign up and create an API key for the next step. It may cost money.

    How to get a key is in the maker’s README below

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Postgres settings, POSTGRES_USER, POSTGRES_PASSWORD is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Postgres and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Postgres or shows a Postgres tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Postgres key (sign up on the maker’s site, may cost money) · Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Sign up and create a Postgres key

    Open the maker’s site, sign up and create an API key for the next step. It may cost money.

    How to get a key is in the maker’s README below

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Postgres settings, POSTGRES_USER, POSTGRES_PASSWORD is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Postgres and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Postgres or shows a Postgres tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Postgres💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add postgres --env POSTGRES_USER=your-value --env POSTGRES_PASSWORD=your-value -- npx -y @marcelo-ochoa/server-postgres

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-postgres"
      ],
      "env": {
        "POSTGRES_USER": "your-value",
        "POSTGRES_PASSWORD": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-postgres"
      ],
      "env": {
        "POSTGRES_USER": "your-value",
        "POSTGRES_PASSWORD": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "postgres": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-postgres"
      ],
      "env": {
        "POSTGRES_USER": "your-value",
        "POSTGRES_PASSWORD": "your-value"
      }
    }
  }
}

Values you fill in

  • POSTGRES_USER env
    PostgreSQL user
  • POSTGRES_PASSWORD secret env
    PostgreSQL password

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

At a glance

GitHub starsi
2 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
86/wk
Licencei
No licence stated
Connection
Runs on your computer
Latest versioni
1.0.8
Published to registryi
Mar 12, 2026
Code last changedi
Aug 22, 2026
Maker
marcelo-ochoa
Packages
npm: @marcelo-ochoa/server-postgres
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

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 11, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account marcelo-ochoa, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 3 months ago

  • … 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

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in with Google to post

User reviews

No reviews yet

Sign in with Google to write a review

Compared with others in Databases & datasetsi

  • More stars than 85% of the other 1164 servers in this category
  • Published to the registry more recently than 6% of the other 1164 servers in this category
  • Basic checks equal to or better than 100% of the other 1164 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 Postgres safe?

It passed 2 of 2 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?

You need to fill in: POSTGRES_PASSWORD

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 3 months ago, and the latest version (1.0.8) reached the registry 8 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 on your computer.

What can I use instead?

In the same category: Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases

Alternatives

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

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

Dbx

Query databases from AI agents using connections configured in DBX.

by t8y2Widely used↓ 9.4K/wk★ 29.9KUpdated 6 months ago

Runs on your computer

MCP Toolbox for Databases

MCP Toolbox for Databases enables your agent to connect to your database.

by googleapisWidely used★ 16.8KUpdated 6 days ago

Runs on your computer

MCP Toolbox for Databases

MCP Toolbox for Databases enables your agent to connect to your database.

by googleapisWidely used★ 16.8KUpdated 8 months ago

Runs on your computer

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.

PostgreSQL

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

Components

Tools
  • pg-query
  • Execute read-only SQL queries against the connected database
  • Input: sql (string): The SQL query to execute
  • All queries are executed within a READ ONLY transaction
  • pg-stats
  • Get statistics for a specific table
  • Input: name (string): The name of the table to get statistics for
  • pg-explain
  • Explain Plan for a given SQL query
  • Input: sql (string): The SQL query to explain
  • pg-connect
  • Connect to a PostgreSQL database
  • Inputs:
  • connectionString (string): The PostgreSQL connection string without credentials (e.g. postgresql://host:port/dbname or host:port/dbname)
  • user (string): The PostgreSQL username
  • password (string): The PostgreSQL password

Example: pg-connect host.docker.internal:5432/postgres postgres pg_2025

  • pg-awr
  • Generate a PostgreSQL performance report similar to Oracle AWR. Includes database statistics, top queries (requires pg_stat_statements extension), table/index statistics, connection info, and optimization recommendations.
Resources

The server provides schema information for each table in the database:

  • Table Schemas (postgres:// / /schema)
  • JSON schema information for each table
  • Includes column names and data types
  • Automatically discovered from database metadata

Change Log

See Change Log for the history of changes.

Configuration

The PostgreSQL server uses environment variables or the pg-connect tool for secure credential management:

  • `PG_USER`: PostgreSQL username (optional if using pg-connect)
  • `PG_PASSWORD`: PostgreSQL password (optional if using pg-connect)
Connection String

The connection string should contain only the host, port, and database information (without embedded credentials). Providing it as a command-line argument is optional. If omitted at startup, you must use the pg-connect tool to establish a connection before using other functionality.

Supported connection string formats:

  • postgresql://host:port/dbname
  • host:port/dbname

To enable encryption (SSL), append ?sslmode=require to the connection string or set the PG_SSL environment variable to true.

Usage with Claude Desktop

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

Docker
  • When running Docker on macOS, use host.docker.internal if the PostgreSQL server is running on the host network (e.g., localhost)
  • Credentials are passed via environment variables PG_USER and PG_PASSWORD
{

"mcpServers": { "postgres": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "PG_USER=myuser", "-e", "PG_PASSWORD=mypassword", "mochoa/mcp-postgres" ] } } }

Note: You can still provide the connection string as a final argument if you want to connect automatically on startup: "args": [..., "mochoa/mcp-postgres", "postgresql://host.docker.internal:5432/mydb"].

NPX
{

"mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "@marcelo-ochoa/server-postgres", "postgresql://localhost:5432/mydb" ], "env": { "PG_USER": "myuser", "PG_PASSWORD": "mypassword" } } } }

Replace /mydb with your database name.

Note: Replace the following placeholders with your actual values:

  • myuser and mypassword with your PostgreSQL credentials
  • localhost:5432 with your PostgreSQL server host and port
  • mydb with your database name
Usage with VS Code

For quick installation, use one of the one-click install buttons below...

%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-postgres%22%2C%22%24%7Binput%3Apg_url%7D%22%5D%7D) %22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-postgres%22%2C%22%24%7Binput%3Apg_url%7D%22%5D%7D&quality=insiders)

%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Fpostgres%22%2C%22%24%7Binput%3Apg_url%7D%22%5D%7D) %22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Fpostgres%22%2C%22%24%7Binput%3Apg_url%7D%22%5D%7D&quality=insiders)

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

Docker

Note: When using Docker and connecting to a PostgreSQL server on your host machine, use host.docker.internal instead of localhost in the connection URL.

{

"mcp": { "inputs": [ { "type": "promptString", "id": "pg_user", "description": "PostgreSQL username" }, { "type": "promptString", "id": "pg_password", "description": "PostgreSQL password", "password": true } ], "servers": { "postgres": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "PG_USER=${input:pg_user}", "-e", "PG_PASSWORD=${input:pg_password}", "mochoa/mcp-postgres", "postgresql://localhost:5432/mydb" ] } } } }

Note: You can add an input for pg_url and append it to args if you want to connect on startup.

NPX
{

"mcp": { "inputs": [ { "type": "promptString", "id": "pg_user", "description": "PostgreSQL username" }, { "type": "promptString", "id": "pg_password", "description": "PostgreSQL password", "password": true } ], "servers": { "postgres": { "command": "npx", "args": [ "-y", "@marcelo-ochoa/server-postgres", "postgresql://localhost:5432/mydb" ], "env": { "PG_USER": "${input:pg_user}", "PG_PASSWORD": "${input:pg_password}" } } } } }

PostgreSQL AWR in action

See PostgreSQL AWR in action for an example of a performance report generated by the pg-awr tool for a production Moodle database, highlighting critical performance issues and optimization opportunities.

Demos

See Demos for usage examples with Claude Desktop, Docker AI, Gemini CLI, and Antigravity Code Editor.

Building

Docker:

docker build -t mochoa/mcp-postgres -f src/postgres/Dockerfile .

Sources

As usual the code of this extension is at GitHub, feel free to suggest changes and make contributions, note that I am a beginner developer of React and TypeScript so contributions to make this UI better are welcome.

📜 License

This project is licensed under the Apache License, Version 2.0 for new contributions, with existing code under MIT - see the LICENSE file for details.