
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol tool server that enables interaction with PostgreSQL databases via MCP calls.
PgSQL MCP Server is cataloged as an MCP server attributed to twn39. A Model Context Protocol tool server that enables interaction with PostgreSQL databases via MCP calls. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for PgSQL MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It provides schema inspection tools such as get_schema_names, get_tables, get_columns, get_indexes, and get_foreign_keys, plus run_dql_query, run_dml_query, run_ddl_query, and run_dcl_query for executing statements.
DDL, DML, and DCL operations are executed within transactions with error handling and rollback mechanisms.
README.md · 1562d7862dc8 · Fetched 2026-11-13 10:28:54 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
English | 简体中文
A powerful tool server based on the Model Context Protocol (MCP), enabling interaction with PostgreSQL databases via MCP calls.
This project is built on the FastMCP framework and leverages the SQLAlchemy and asyncpg libraries to deliver high-performance asynchronous database operations, ensuring efficiency and responsiveness when handling database requests.
asyncio, utilizing asyncpg for a high-performance asynchronous PostgreSQL driver.Ensure you have Python 3.10+ installed. Recommendation:
uv tool install pgsql-mcp-server
Then run it:
pgsql-mcp-server --dsn "postgresql://user:password@localhost:5432/db"
Or run directly without installation:
uvx pgsql-mcp-server --dsn "postgresql://user:password@localhost:5432/db"
pip install pgsql-mcp-server
The server provides the following tools for database interaction:
get_schema_names: List all schemas in the database.get_tables: List all tables in a specific schema (defaults to public).get_columns: Get detailed column information for a specific table.get_indexes: Get index details for a specific table.get_foreign_keys: Get foreign key constraints for a specific table.run_dql_query: Execute Data Query Language (DQL) statements like SELECT, SHOW, EXPLAIN.run_dml_query: Execute Data Manipulation Language (DML) statements like INSERT, UPDATE, DELETE.run_ddl_query: Execute Data Definition Language (DDL) statements like CREATE, ALTER, DROP.run_dcl_query: Execute Data Control Language (DCL) statements like GRANT, REVOKE.You can use the official MCP Inspector tool to visually inspect the tools provided by this server, view their parameters and descriptions, and perform test calls directly.
npx @modelcontextprotocol/inspector uvx pgsql-mcp-server --dsn "postgresql://user:password@host:port/database"
This will start a local web service. Open the provided URL in your browser to begin debugging.
This project uses pytest for testing.
uv run pytest
uv run pytest tests/test_app.py
Integration tests require a local PostgreSQL instance. They default to localhost:5432/postgres.
uv run pytest tests/test_integration.py
Contributions are welcome! If you have suggestions for improvements, feature requests, or find any bugs, please feel free to:
git checkout -b feature/AmazingFeature).git commit -m 'Add some AmazingFeature').git push origin feature/AmazingFeature).Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for PgSQL MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/pgsql-mcp-server-twn39)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.