Skip to content

An MCP server example that loads a set of csvs into postgres and then exposes a read only MCP server that introspects that DB.

Notifications You must be signed in to change notification settings

louisdvs/mcp-postgres

Repository files navigation

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.

About

An MCP server example that loads a set of csvs into postgres and then exposes a read only MCP server that introspects that DB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published