Simple Postgres MCP Server

Simple MCP server for executing PostgreSQL queries

Local serverstdio

What is the Simple Postgres MCP MCP server?

Simple MCP server for executing PostgreSQL queries. That is what the simple postgres mcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A minimal Model Context Protocol (MCP) server for executing SQL queries on PostgreSQL databases with configurable permissions.

  • Execute SQL queries with optional read-only or write access
  • Server-level mode (read-only/write) configurable via command line
  • Returns structured results with metadata
  • Simple setup using a PostgreSQL connection string

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

How it compares

Plenty of database access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. It is maintained by perrypixel; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How to install the Simple Postgres MCP MCP server

### Read-Only Mode

```json
{
  "mcpServers": {
    "simple-postgresql-mcp": {
      "command": "node",
      "args": [
        "/path/to/build/index.js",
        "postgresql://username:password@localhost:5432/database_name",
        "readonly"
      ]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Frequently asked questions

It connects Simple Postgres MCP to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Simple Postgres MCP directly.