pgsql-mcp-server
If you are the rightful owner of pgsql-mcp-server 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 Model Context Protocol (MCP) server for interacting with a PostgreSQL database, enabling AI assistants to execute SQL queries and manage database tables.
The PostgreSQL MCP Server is a specialized server that facilitates interaction with PostgreSQL databases through the Model Context Protocol (MCP). It is designed to enable AI assistants to perform various database operations such as executing SQL queries, creating tables, and listing tables. The server is built using Go and requires a PostgreSQL database server to function. It supports both read and write operations, allowing for comprehensive database management. The server is configured using environment variables, which specify the database connection details. It also includes security features such as query validation and input sanitization to prevent SQL injection attacks. The server is compatible with AI assistants that support the MCP protocol, making it a versatile tool for database management in AI-driven applications.
Features
- read_query: Execute SELECT queries on the PostgreSQL database.
- write_query: Execute INSERT, UPDATE, or DELETE queries on the PostgreSQL database.
- create_table: Create a new table in the PostgreSQL database.
- list_tables: List all user tables in the database with optional schema filtering.
- explain_query: EXPLAIN a query on the PostgreSQL database.