pg-mcp-server
pg-mcp-server is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of pg-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
unknown
connect
Register a database connection string and return its connection ID. Args: connection_string: PostgreSQL connection string (required) ctx: Request context (injected by the framework) Returns: Dictionary containing the connection ID
Try it
Result:
disconnect
Close a specific database connection and remove it from the pool. Args: conn_id: Connection ID to disconnect (required) ctx: Request context (injected by the framework) Returns: Dictionary indicating success status
Try it
Result:
pg_query
Execute a read-only SQL query against the PostgreSQL database. Args: query: The SQL query to execute (must be read-only) conn_id: Connection ID previously obtained from the connect tool params: Parameters for the query (optional) Returns: Query results as a list of dictionaries
Try it
Result:
pg_explain
Execute an EXPLAIN (FORMAT JSON) query to get PostgreSQL execution plan. Args: query: The SQL query to analyze conn_id: Connection ID previously obtained from the connect tool params: Parameters for the query (optional) Returns: Complete JSON-formatted execution plan
Try it
Result:
pg_metadata
Analyzes a SQL query and produces visualization metadata. Args: conn_id: Connection ID previously obtained from the connect tool sql_query: The SQL query to analyze Returns: JSON metadata about the query results structure