AnalyticDB PostgreSQL MCP Server

# AnalyticDB PostgreSQL MCP Server AnalyticDB PostgreSQL MCP Server serves as a universal interface between AI Agents and AnalyticDB PostgreSQL

Local serverstdioPython

What is the AnalyticDB PostgreSQL MCP Server?

AnalyticDB PostgreSQL MCP Server AnalyticDB PostgreSQL MCP Server serves as a universal interface between AI Agents and AnalyticDB PostgreSQL databases. It

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
execute_select_sqlExecute SELECT SQL queries on the AnalyticDB PostgreSQL server
execute_dml_sqlExecute DML (INSERT, UPDATE, DELETE) SQL queries on the AnalyticDB PostgreSQL server
execute_ddl_sqlExecute DDL (CREATE, ALTER, DROP) SQL queries on the AnalyticDB PostgreSQL server
analyze_tableCollect table statistics
explain_queryGet query execution plan
adbpg_graphrag_upload**Description:** Upload a text file (with its name) and file content to graphrag to generate a knowledge graph.
adbpg_graphrag_query**Description:** Query the graphrag using the specified query string and mode。
adbpg_llm_memory_add**Description:** Add LLM long memory.
adbpg_llm_memory_get_all**Description:** Retrieves all memory records associated with a specific user, run or agent.
adbpg_llm_memory_search**Description:** Retrieves memories relevant to the given query for a specific user, run, or agent.
adbpg_llm_memory_delete_all- **Description:** Delete all memory records associated with a specific user, run or agent.

How to install the AnalyticDB PostgreSQL MCP Server

{
  "mcpServers": {
    "alibabacloud-adbpg": {
      "command": "uvx",
      "args": ["adbpg-mcp-server"],
      "env": {
        "ADBPG_HOST": "your-value",
        "ADBPG_PORT": "your-value",
        "ADBPG_USER": "your-value",
        "ADBPG_PASSWORD": "your-value",
        "ADBPG_DATABASE": "your-value",
        "GRAPHRAG_API_KEY": "your-value",
        "GRAPHRAG_BASE_URL": "your-value",
        "GRAPHRAG_LLM_MODEL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
ADBPG_HOSTEndpoint or connection string the server talks to.Optional
ADBPG_PORTConfiguration value read at startup.Optional
ADBPG_USERConfiguration value read at startup.Optional
ADBPG_PASSWORDConfiguration value read at startup.Optional
ADBPG_DATABASEConfiguration value read at startup.Optional
GRAPHRAG_API_KEYCredential the server authenticates with.Yes
GRAPHRAG_BASE_URLEndpoint or connection string the server talks to.Yes
GRAPHRAG_LLM_MODELConfiguration value read at startup.Optional

Example prompts to try

  • “Use AnalyticDB PostgreSQL to execute select sql.”
  • “Use AnalyticDB PostgreSQL to execute dml sql.”
  • “Use AnalyticDB PostgreSQL to execute ddl sql.”

Frequently asked questions

Python 3.11 or higher and the `uv` package manager for environment and package management.