Supermarket Database is an MCP server project that connects Claude Desktop to a containerized PostgreSQL supermarket database. It provides an automated Docker environment packaging both PostgreSQL and pgAdmin alongside sample retail schema and backup datasets. Developers, database students, and data analysts use this server to explore complex retail data models directly through an AI interface. By using the official PostgreSQL Model Context Protocol server, it enables Claude to inspect live database schemas, run ad-hoc SQL queries against local tables, analyze grocery inventory and sales records, and explain database relationships. The project removes manual database provisioning by bundling configuration files and setup instructions for Docker Compose, allowing local inspection through a web browser or direct automated conversational queries within desktop AI tools.
Category: Databases & Data Stores
Tags: database, docker, postgresql, SQL
bash docker-compose up -d 3. Access pgAdmin at http://localhost:8080, register the server (host: postgres, port: 5432, user: admin, password: admin), and run CREATE ROLE postgres; in the Query Tool. 4. Restore the database using supermarket.backup via pgAdmin. 5. Open your Claude Desktop configuration file (claude_desktop_config.json) and add the server configuration: json { "mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-postgres", "postgresql://admin:admin@localhost:5432/admin_db" ] } } } 6. Restart Claude Desktop to apply the changes.Part of MCP Servers
Supermarket Database is an open-source project that runs a dockerized PostgreSQL instance populated with supermarket data and connects it to Claude Desktop via the official PostgreSQL Model Context Protocol server.
The project is primarily documented for Claude Desktop on Windows, macOS, and Linux, but any MCP-compliant client that supports standard command-based configurations can connect to the underlying PostgreSQL server.
You need Docker v20.10 or higher, Docker Compose v2.0 or higher, and Claude Desktop if you want to use the MCP integration. Node.js with npx is required to run the MCP connector.
Yes, Supermarket Database is an open-source project hosted on GitHub under the repository Juanmartin19l/DB_SUPERMARKET_MCP.
The provided database backup contains ownership and permission references tied to the postgres role. Creating this role beforehand prevents permission errors during the backup restoration process in pgAdmin.