perrypixel/Simple-Postgres-MCP
If you are the rightful owner of Simple-Postgres-MCP 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.
A minimal Model Context Protocol (MCP) server for executing SQL queries on PostgreSQL databases with configurable permissions.
The Simple PostgreSQL MCP Server is designed to facilitate the execution of SQL queries on PostgreSQL databases with a focus on simplicity and configurability. It allows users to run SQL commands with either read-only or write access, depending on the server-level mode set during configuration. This server is particularly useful for developers and database administrators who need a straightforward solution to manage database interactions through a Model Context Protocol. The server is easy to set up, requiring only a PostgreSQL connection string and a few command-line arguments to get started. It returns structured results with metadata, making it easier to integrate with other tools and systems. The server can be configured to operate in either read-only or write mode, providing flexibility based on the user's needs. This makes it an ideal choice for environments where database access needs to be controlled and monitored.
Features
- Execute SQL queries with optional read-only or write access
- Server-level mode (read-only/write) configurable via command line
- Returns structured results with metadata
- Simple setup using a PostgreSQL connection string
Usages
usage with write mode
{ "mcpServers": { "simple-postgresql-mcp": { "command": "node", "args": [ "/path/to/build/index.js", "postgresql://username:password@localhost:5432/database_name", "write" ] } } }
usage with read only mode
{ "mcpServers": { "simple-postgresql-mcp": { "command": "node", "args": [ "/path/to/build/index.js", "postgresql://username:password@localhost:5432/database_name", "readonly" ] } } }