MCPServers
PostgreSQL - MCP server logo

PostgreSQL

2
0

Summary

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.

Available Actions(6)

connect_db

Establish connection to PostgreSQL database using provided credentials. Parameters: host (string), port (number), user (string), password (string), database (string)

query

Execute SELECT queries with optional prepared statement parameters. Supports both PostgreSQL-style ($1, $2) and MySQL-style (?) parameter placeholders. Parameters: sql (string), params (array)

execute

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)

list_schemas

List all schemas in the connected database. No parameters required.

list_tables

List tables in the connected database. Accepts an optional schema parameter (defaults to 'public'). Parameters: schema (optional string)

describe_table

Get the structure of a specific table. Accepts an optional schema parameter (defaults to 'public'). Parameters: table (string), schema (optional string)

Last Updated: April 17, 2025

Community Reviews

0.0
0 reviews
5
0
4
0
3
0
2
0
1
0

No reviews yet. Be the first to review!

Sign in to join the conversation

Coming soon to
HighlightHighlight AI

Language

TypeScript

Categories

Tags