A PostgreSQL MCP server that enables AI assistants to interact directly with PostgreSQL databases through a set of specialized tools. It provides capabilities for executing read and write SQL queries, creating tables, and listing database tables - all through the MCP protocol. Built with Go and leveraging the lib/pq driver, this implementation includes security features like query type validation and input sanitization, making it suitable for database management tasks while maintaining appropriate access controls. The server is easily configurable through environment variables and can be integrated with any MCP-compatible AI assistant.
Execute SELECT queries on the PostgreSQL database. Parameters: query (string)
Execute INSERT, UPDATE, or DELETE queries on the PostgreSQL database. Parameters: query (string)
Create a new table in the PostgreSQL database. Parameters: schema (string)
List all user tables in the database. Parameters: schema (optional string)
EXPLAIN a query on the PostgreSQL database. Parameters: query (string)
No reviews yet. Be the first to review!
Sign in to join the conversation