Feedback

PostgreSQL MCP Server (Enhanced)

@garethcott Claim

Basic information

Runtime
node
Category
License
NOASSERTION
Transports
stdio
Author
garethcott
Submitted by
Community
Quality
10
Stars
11

About PostgreSQL MCP Server (Enhanced)

# PostgreSQL MCP Server (Enhanced)

PostgreSQL MCP Server (Enhanced) is a MCP server in the Databases category listed in the AddMCP.net directory, published by GarethCott. Supported transport: stdio. Runtime: node. The repository has 11 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "enhanced-postgres-mcp-server": {
            "command": "docker",
            "args": [
                "build",
                "-t",
                "mcp/postgres",
                "-f",
                "Dockerfile",
                "."
            ]
        }
    }
}

PostgreSQL MCP Server (Enhanced) config

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

{
    "mcpServers": {
        "enhanced-postgres-mcp-server": {
            "command": "docker",
            "args": [
                "build",
                "-t",
                "mcp/postgres",
                "-f",
                "Dockerfile",
                "."
            ]
        }
    }
}

PostgreSQL MCP Server (Enhanced) tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is PostgreSQL MCP Server (Enhanced)?

A Model Context Protocol server that provides both read and write access to PostgreSQL databases. It enables LLMs to inspect database schemas, execute queries, modify data, and create or modify database schema objects. This is an enhanced version of the original read-only PostgreSQL MCP server by Anthropic, adding write capabilities and schema management.

How to use PostgreSQL MCP Server (Enhanced)?

Configure it in the "mcpServers" section of your claude_desktop_config.json. Use either Docker (run docker run -i --rm mcp/postgres) or NPX (run npx -y @modelcontextprotocol/server-postgres), providing a PostgreSQL connection URL such as postgresql://host:port/db-name. Then invoke tools like /query, /insert, /update, /createTable, /createFunction, /createTrigger with the required arguments.

Key features of PostgreSQL MCP Server (Enhanced)

  • Execute read-only SQL queries with prepared statements
  • Insert, update, and delete records in tables
  • Create and alter tables, indexes, functions, and triggers
  • Automatic schema discovery as MCP resources
  • Parameterized queries for SQL injection prevention
  • Transactional handling with proper COMMIT/ROLLBACK

Use cases of PostgreSQL MCP Server (Enhanced)

  • LLM-driven inspection of database schemas and data
  • Automated data entry and record updates via natural language commands
  • Schema evolution, such as adding columns or creating indexes
  • Setting up database functions and triggers through conversational AI

Frequently asked questions

1 How does this version differ from the original PostgreSQL MCP server?

The original server provides read-only access. This enhanced version adds write capabilities (INSERT, UPDATE, DELETE) and schema management tools like create table, function, trigger, index, and alter table.

2 What security measures are implemented?

All data modification operations use transactions with COMMIT/ROLLBACK handling. Insert/update operations use parameterized queries to prevent SQL injection. The read-only query tool uses prepared statements to block multi‑statement injection attacks.

3 How do I connect to a PostgreSQL database?

Provide a PostgreSQL connection URL in the server configuration (e.g., postgresql://user:password@host:port/db-name). For Docker on macOS, use host.docker.internal if the server runs on the host network. Add ?sslmode=no-verify to bypass SSL verification if needed.

4 Can I create functions and triggers with this server?

Yes. Tools /createFunction and /createTrigger allow creating PostgreSQL functions (specifying language, parameters, body) and triggers (defining when, events, forEach, optional condition).

5 Does the server use transactions for modifications?

Yes. Each execution of the execute tool is performed within a transaction with proper COMMIT or ROLLBACK handling. Insert, update, and delete tools also run inside a transaction context.

Comments

No comments yet

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

Sign In

Feedback 💬