mcp-postgres

louisdvs/mcp-postgres

3.1

If you are the rightful owner of mcp-postgres and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a structured overview of setting up a PostgreSQL MCP server for loading CSV files and interfacing with data in a read-only mode.

Postgresql MCP example

This starts a postgresql mcp server that loads csv files when started and provides a read only mcp server to interface with the data.

Quick start

Build the mcp docker container

docker build -t mcp_benchmarks-mcp-server .

Update your claude desktop server config:

{
  "mcpServers": {
    "postgres": {
      "command": "<use the output of `which docker`>",
      "args": [
        "run", 
        "-i", 
        "--rm", 
        "--network=host",
        "mcp_benchmarks-mcp-server", 
        "postgresql://postgres:postgres@host.docker.internal:5432/benchmarks"
      ]
    }
  }
}

Start the postgresql database container: docker-compose up

Start claude desktop and ask questions about your data.