Feedback

Postgresql MCP — by sarmadparvez

@sarmadparvez Claim

Basic information

Category
License
ISC
Transports
stdio
Author
sarmadparvez
Submitted by
Community
Quality
15

About Postgresql MCP Server

A general-purpose PostgreSQL MCP server with full read-write support, atomic transactions, and schema inspection. Connect Claude, Cursor, Windsurf, or any MCP-compatible AI client to any PostgreSQL database — local, Supabase, AWS RDS, or self-hosted. No cloud lock-in, no Azure de

Postgresql MCP is a MCP server in the Databases category listed in the AddMCP.net directory, published by sarmadparvez. It exposes 5 tools, including query, execute, schema, list_tables and more. Supported transport: stdio. License: ISC. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "postgres": {
            "command": "npx",
            "args": [
                "-y",
                "@sarmadparvez/postgresql-mcp",
                "postgresql://user:pass@localhost:5432/mydb"
            ]
        }
    }
}

Postgresql MCP — by sarmadparvez config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "postgres": {
            "command": "npx",
            "args": [
                "-y",
                "@sarmadparvez/postgresql-mcp",
                "postgresql://user:pass@localhost:5432/mydb"
            ]
        }
    }
}

Postgresql MCP — by sarmadparvez tools

  • query — Execute a read-only SQL SELECT query and return results as JSON
    sql:string*
  • execute — Execute a write SQL statement (INSERT, UPDATE, DELETE, TRUNCATE, CREATE, DROP). Returns rows affected.
    sql:string*
  • schema — List all tables with their columns, types, and constraints for a given schema (default: public)
    schema_name:string, table_name:string
  • list_tables — List all tables in the database with row counts
    schema_name:string
  • transaction — Execute multiple SQL statements as a single atomic transaction. Rolls back all on any error.
    statements:array*

Overview

What is Postgresql MCP?

Postgresql MCP is a general-purpose MCP server for PostgreSQL databases that provides full read-write support, atomic transactions, and schema inspection. It connects MCP-compatible AI clients such as Claude, Cursor, and Windsurf to any PostgreSQL database—local, Supabase, AWS RDS, or self-hosted—without cloud lock-in or Azure dependency.

How to use Postgresql MCP?

Configure the server by providing a connection string to your PostgreSQL database. An optional read-only mode can be enabled via a flag in the connection string. Once connected, you can execute SELECT, INSERT, UPDATE, DELETE, DDL statements, and multi-statement transactions with automatic rollback on failure.

Key features of Postgresql MCP

  • Full read-write support for PostgreSQL databases
  • Atomic transactions with automatic rollback
  • Schema inspection capabilities
  • Optional read-only mode via connection string flag
  • Supports SELECT, INSERT, UPDATE, DELETE, and DDL
  • Compatible with any MCP AI client (Claude, Cursor, Windsurf)

Use cases of Postgresql MCP

  • Allow AI assistants to run database queries and retrieve live data
  • Enable AI agents to perform schema analysis and table creation
  • Facilitate automated data entry and updates through natural language
  • Support safe read-only exploration of production databases

Frequently asked questions

1 What database operations does Postgresql MCP support?

It supports SELECT, INSERT, UPDATE, DELETE, DDL statements, and multi-statement transactions with automatic rollback.

2 Can I use Postgresql MCP in read-only mode?

Yes, an optional read-only mode can be enabled via the connection string flag.

3 What kinds of PostgreSQL databases can I connect to?

Any PostgreSQL database—local instances, Supabase, AWS RDS, or self-hosted setups.

4 Is Postgresql MCP tied to any cloud provider?

No. It has no cloud lock-in and no dependency on Azure or any other provider.

5 Which AI clients are compatible with Postgresql MCP?

It works with any MCP-compatible AI client, including Claude, Cursor, and Windsurf.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬