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 a SQL query with typed input. Parameters: input (object containing sql, parameters, row_limit, format).
Execute a SQL query and return JSON-serializable rows. Parameters: input (object containing sql, row_limit).
List schemas with filters. Parameters: input (object containing include_system, include_temp, require_usage, row_limit).
Paginated listing of schemas with filters. Parameters: input (object containing include_system, include_temp, require_usage, page_size, cursor, name_like, case_sensitive).
List tables within a schema with filters. Parameters: input (object containing db_schema, name_like, case_sensitive, table_types, row_limit).
Paginated tables listing with filters. Parameters: input (object containing db_schema, page_size, cursor, name_like).
List resources for a given table schema.
Read rows from a specified table resource. Parameters: schema, table, row_limit.
Prompt for a safe SELECT statement.
Provide tips for understanding query execution plans.