A PostgreSQL database server that enables AI models to execute SQL queries, manage tables, and inspect database schemas through a standardized interface. Built with TypeScript and the MCP SDK, it features prepared statement support, automatic connection management, and support for both PostgreSQL and MySQL-style parameter placeholders. The implementation is particularly valuable for developers who want to give AI assistants secure, controlled access to PostgreSQL databases for querying and analysis tasks.
暂无评论. 成为第一个评论的人!
登录以参与讨论
Establish connection to PostgreSQL database using provided credentials. Parameters: host (string), port (number), user (string), password (string), database (string)
Execute SELECT queries with optional prepared statement parameters. Supports both PostgreSQL-style ($1, $2) and MySQL-style (?) parameter placeholders. Parameters: sql (string), params (array of values)
Execute INSERT, UPDATE, or DELETE queries with optional prepared statement parameters. Supports both PostgreSQL-style ($1, $2) and MySQL-style (?) parameter placeholders. Parameters: sql (string), params (array of values)
List all schemas in the connected database. Parameters: None
List tables in the connected database. Accepts an optional schema parameter (defaults to 'public'). Parameters: schema (optional string)
Get the structure of a specific table. Accepts an optional schema parameter (defaults to 'public'). Parameters: table (string), schema (optional string)