ADBPG MCP Server
Project description
AnalyticDB PostgreSQL MCP Server
AnalyticDB PostgreSQL MCP Server serves as a universal interface between AI Agents and AnalyticDB PostgreSQL databases. It enables seamless communication between AI Agents and AnalyticDB PostgreSQL, helping AI Agents retrieve database metadata and execute SQL operations.
Configuration
Download
Download from Github
git clone https://github.com/aliyun/alibabacloud-adbpg-mcp-server.git
MCP Integration
Add the following configuration to the MCP client configuration file:
"mcpServers": {
"adbpg-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/adbpg-mcp-server",
"run",
"adbpg-mcp-server"
],
"env": {
"ADBPG_HOST": "host",
"ADBPG_PORT": "port",
"ADBPG_USER": "username",
"ADBPG_PASSWORD": "password",
"ADBPG_DATABASE": "database"
}
}
}
Components
Tools
execute_select_sql: Execute SELECT SQL queries on the AnalyticDB PostgreSQL serverexecute_dml_sql: Execute DML (INSERT, UPDATE, DELETE) SQL queries on the AnalyticDB PostgreSQL serverexecute_ddl_sql: Execute DDL (CREATE, ALTER, DROP) SQL queries on the AnalyticDB PostgreSQL serveranalyze_table: Collect table statisticsexplain_query: Get query execution plan
Resources
Built-in Resources
adbpg:///schemas: Get all schemas in the database
Resource Templates
adbpg:///{schema}/tables: List all tables in a specific schemaadbpg:///{schema}/{table}/ddl: Get table DDLadbpg:///{schema}/{table}/statistics: Show table statistics
Environment Variables
MCP Server requires the following environment variables to connect to AnalyticDB PostgreSQL instance:
ADBPG_HOST: Database host addressADBPG_PORT: Database portADBPG_USER: Database usernameADBPG_PASSWORD: Database passwordADBPG_DATABASE: Database name
Dependencies
- Python 3.10 or higher
- Required packages:
- mcp >= 1.4.0
- psycopg >= 3.1.0
- python-dotenv >= 1.0.0
- pydantic >= 2.0.0
Running
# Create and activate virtual environment
uv venv .venv
source .venv/bin/activate # Linux/Mac
# or
.venv\Scripts\activate # Windows
# Install dependencies
uv pip install -e .
# Run server
uv run adbpg-mcp-server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adbpg_mcp_server-1.0.4.tar.gz.
File metadata
- Download URL: adbpg_mcp_server-1.0.4.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3ecfbec11fb6d536d927ceb27a903e1a42b813dfbce7390cf9d684089c3da6e
|
|
| MD5 |
e16e64c8a44be74f4aadf6428e6f854f
|
|
| BLAKE2b-256 |
3680d09758150709d4f54b9aee0bd0fec643f120f1aef47e0667c0481059e05b
|
File details
Details for the file adbpg_mcp_server-1.0.4-py3-none-any.whl.
File metadata
- Download URL: adbpg_mcp_server-1.0.4-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c5f7a4392799c86da5de98c9620ba763e37340da81ac5e81ceae658207ad82
|
|
| MD5 |
a342c7db80ffdd62cf4a58158c3e0c58
|
|
| BLAKE2b-256 |
cab46658511bd43b6fe8d4458d0de88740f48860c0b8a8d1f5f5684bc09db899
|