PostgreSQL MCP Server enables AI agents to interact with PostgreSQL databases through a standardized interface, providing tools for schema exploration, table inspection, relationship discovery, and SQL query execution. Built with Python using the FastMCP library, this implementation connects to any PostgreSQL database via a connection string and exposes database functionality through six well-defined tools that handle everything from basic metadata retrieval to complex relationship analysis. Ideal for developers and data analysts who need to give AI assistants the ability to explore and query relational databases without direct database access.
아직 리뷰가 없습니다. 첫 번째 리뷰를 작성해 보세요!
대화에 참여하려면 로그인하세요
Execute SQL queries against the database.
List all available schemas.
List all tables in a specific schema.
Get detailed information about a table's structure.
Get foreign key relationships for a table.
Discover both explicit and implied relationships for a table.
Show current db/user/host/port, search_path, and version.
Execute with typed input (`sql`, `parameters`, `row_limit`, `format: 'markdown'|'json'`).
Execute and return JSON-serializable rows.
List schemas with filters (`include_system`, `include_temp`, `require_usage`, `row_limit`).
Paginated listing with filters and `name_like` pattern.
List tables within a schema with filters (name pattern, case sensitivity, table_types, row_limit).
Paginated tables listing with filters.
List table resources for reading table rows.
Read rows from a specified table resource.
Prompt for writing a safe SQL SELECT statement.
Prompt for tips on explaining SQL execution plans.