PostgreSQL Full Access MCP Server

A fully featured PostgreSQL server adapter for the Model Context Protocol (MCP), providing robust read/write access and enhanced schema metadata for

Local serverstdio

What is the PostgreSQL Full Access MCP server?

A fully featured PostgreSQL server adapter for the Model Context Protocol (MCP), providing robust read/write access and enhanced schema metadata for LLM and AI-powered applications. Supports full SQL DML/DDL operations. That is what the postgresql full access 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

This project is an independently maintained and extended fork of the original mcp-postgres-full-access by Syahiid Kamil.

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.

The tools it exposes

The server publishes 9 tools. What each one is for:

  • execute_query — Execute read-only SQL queries (SELECT statements)
  • Input — sql (string): The SQL query to execute
  • execute_dml_ddl_dcl_tcl — Execute data modification operations (INSERT, UPDATE, DELETE) or schema changes (CREATE, ALTER, DROP)
  • execute_maintenance — Execute maintenance commands like VACUUM, ANALYZE, or CREATE DATABASE outside of transactions
  • execute_commit — Explicitly commit a transaction by its ID
  • execute_rollback — Explicitly rollback a transaction by its ID
  • list_tables — Get a comprehensive list of all tables in the database
  • describe_table — Get detailed information about a specific table structure
  • list_schemas — Get a list of all schemas in the database

What it needs from you

Configuration is passed through the environment: TRANSACTION_TIMEOUT_MS, MAX_CONCURRENT_TRANSACTIONS, PG_STATEMENT_TIMEOUT_MS. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

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.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch PostgreSQL Full Access.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

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. PostgreSQL Full Access's toolset — execute_query, Input, execute_dml_ddl_dcl_tcl and 6 more — is a fair guide to whether it matches your workflow. It is maintained by kamusis; 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.

Available tools

ToolWhat it does
execute_queryExecute read-only SQL queries (SELECT statements)
Inputsql (string): The SQL query to execute
execute_dml_ddl_dcl_tclExecute data modification operations (INSERT, UPDATE, DELETE) or schema changes (CREATE, ALTER, DROP)
execute_maintenanceExecute maintenance commands like VACUUM, ANALYZE, or CREATE DATABASE outside of transactions
execute_commitExplicitly commit a transaction by its ID
execute_rollbackExplicitly rollback a transaction by its ID
list_tablesGet a comprehensive list of all tables in the database
describe_tableGet detailed information about a specific table structure
list_schemasGet a list of all schemas in the database

How to install the PostgreSQL Full Access MCP server

{
  "mcpServers": {
    "postgres-full": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-postgres-full-access-extended",
        "postgresql://username:password@localhost:5432/database"
      ],
      "env": {
        "TRANSACTION_TIMEOUT_MS": "60000",
        "MAX_CONCURRENT_TRANSACTIONS": "5",
        "PG_STATEMENT_TIMEOUT_MS": "30000"
      }
    }
  }
}

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

Configuration

VariableDescriptionRequired
TRANSACTION_TIMEOUT_MSConfiguration value read at startup.Optional
MAX_CONCURRENT_TRANSACTIONSConfiguration value read at startup.Optional
PG_STATEMENT_TIMEOUT_MSConfiguration value read at startup.Optional

Example prompts to try

  • Use PostgreSQL Full Access to execute query.
  • Use PostgreSQL Full Access to Input.
  • Use PostgreSQL Full Access to execute dml ddl dcl tcl.

Frequently asked questions

The official server is read-only; this server provides full read-write access with transaction management and safety controls.