AnalyticDB PostgreSQL MCP Server
@aliyun
About AnalyticDB PostgreSQL MCP Server
No overview available yet
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"alibabacloud-adbpg-mcp-server": {
"command": "uv",
"args": [
"venv",
".venv"
]
}
}
}Tools
10Execute SELECT SQL queries on the AnalyticDB PostgreSQL server
Execute DML (INSERT, UPDATE, DELETE) SQL queries on the AnalyticDB PostgreSQL server
Execute DDL (CREATE, ALTER, DROP) SQL queries on the AnalyticDB PostgreSQL server
Collect table statistics
Get query execution plan
** Upload a text file (with its name) and file content to graphrag to generate a knowledge graph.
** Query the graphrag using the specified query string and mode。
** Add LLM long memory.
** Retrieves all memory records associated with a specific user, run or agent.
** Retrieves memories relevant to the given query for a specific user, run, or agent.
Overview
What is AnalyticDB PostgreSQL MCP Server?
AnalyticDB PostgreSQL MCP Server is a universal interface between AI Agents and AnalyticDB PostgreSQL databases. It enables seamless communication for AI Agents to retrieve database metadata and execute SQL operations.
How to use AnalyticDB PostgreSQL MCP Server?
Install via PyPI (pip install adbpg-mcp-server) or from source. Run in stdio (default) or HTTP transport mode, configured via environment variables for database connection and optional graphRAG/LLM memory services. Integrate with MCP clients by adding the server configuration to the client's config file.
Key features of AnalyticDB PostgreSQL MCP Server
- Execute SELECT, DML, and DDL SQL queries
- Analyze table statistics and explain query plans
- Upload and query graphRAG knowledge graphs
- Manage decision trees (upload, append, delete)
- Store, search, and delete LLM long-term memory
- Retrieve schemas, tables, DDL, and statistics via resources
Use cases of AnalyticDB PostgreSQL MCP Server
- AI agents querying database metadata and running SQL operations
- Building conversational agents that interact with AnalyticDB PostgreSQL
- Enabling GraphRAG-based knowledge graph insights with database context
- Integrating LLM memory persistence for personalized AI interactions
- Automated database schema exploration and performance analysis
FAQ from AnalyticDB PostgreSQL MCP Server
What are the runtime dependencies?
Python 3.11 or higher and the uv package manager for environment and package management.
What transport modes are supported?
Stdio (default) for standard MCP client integration, and Streamable‑HTTP for REST‑based access, testing, or debugging.
How do I authenticate HTTP endpoints?
Set the MCP_AUTH_TOKEN environment variable or use the --auth-token CLI argument. Clients must include the Authorization: Bearer <token> header.
What tools does the server provide?
SQL execution tools (SELECT, DML, DDL), table analysis, query explain, graphRAG upload/query, decision tree management, and LLM memory add/search/delete.
Where is the data stored?
All data resides in the connected AnalyticDB PostgreSQL instance. GraphRAG and LLM memory data are stored within the same database.
More Databases MCP servers
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
ClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB

Redis
modelcontextprotocolModel Context Protocol Servers
Comments