alibabacloud-adbpg-mcp-server
2
The AnalyticDB PostgreSQL MCP Server provides a bridge between AI agents and AnalyticDB PostgreSQL databases, allowing for the seamless retrieval and execution of SQL operations. It includes diverse tools for executing various query types and analyzing database objects.
AnalyticDB PostgreSQL MCP Server
AnalyticDB PostgreSQL MCP Server acts as a universal interface between AI Agents and AnalyticDB PostgreSQL databases, facilitating communication, retrieving database metadata, and executing SQL operations.
Features
- Supports execution of SELECT, DML (INSERT, UPDATE, DELETE), and DDL (CREATE, ALTER, DROP) SQL queries.
- Provides tools to analyze tables and explain queries.
- Offers resources to fetch schemas, list tables, and retrieve table statistics.
Installation
- Mode 1: Clone the repository from GitHub.
- Mode 2: Install via pip.
Environment Variables
ADBPG_HOST
,ADBPG_PORT
,ADBPG_USER
,ADBPG_PASSWORD
,ADBPG_DATABASE
are required for database connectivity.
Dependencies
- Python 3.10+
- mcp >= 1.4.0, psycopg >= 3.1.0, python-dotenv >= 1.0.0, pydantic >= 2.0.0.