Logo di AlibabaCloud DMS MCP Server

AlibabaCloud DMS MCP Server

Organizzazione
aliyun

A universal multi-cloud data MCP Server supporting over 40 types of data source connections, providing secure, unified data access in a single platform.
Supports full range of Alibaba Cloud services and Mainstream databases/data warehouses.

Pubblicato daaliyun
Repositoryalibabacloud-dms-mcp-server
LinguaPython
Fork
17
Stelle
53
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaApache-2.0
Link
  • Collega gli strumenti ai flussi di lavoro IA

    AlibabaCloud DMS MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 53; fork: 17 (repository collegato).

AlibabaCloud DMS MCP Server

AI-Era Data Security Access Gateway |Intelligent Data Query Engine|Supports 40+ Data Sources


Core Features

Secure Access

  • Account and Password Security Management:Safely manage database account passwords without manual maintenance, effectively preventing sensitive information leakage.
  • Intranet Access Support:Enables database access through an internal network, keeping data within the premises and significantly enhancing data security and privacy protection.
  • Fine-grained Permission Control:Supports instance, database, table, field, and row-level access control, precisely restricting caller permissions to prevent unauthorized operations and ensure data security.
  • High-risk SQL Identification and Blocking: Built-in rich rule engine that identifies and blocks potential high-risk SQL in real time to mitigate security risks.
  • SQL Audit Trail: Records all SQL operation logs, supporting full traceability and compliance audits to meet regulatory requirements.

Intelligent Data Inquiry

  • Built-in NL2SQL Algorithm: Based on natural language input questions, it intelligently matches data tables, understands business semantics within tables, generates and executes SQL queries, and quickly obtains results.
  • Personalized Knowledge Base: Built-in metadata and knowledge base for data inquiry, supports custom business knowledge and query patterns to build tailored intelligent data inquiry capabilities aligned with business scenarios.

Multi-data Source Support

  • Wide Range of Data Source Support: Supports over 40 mainstream databases/data warehouses, enabling unified access and integration from multiple sources.
  • Unified Management Across Environments: Supports centralized management of database instances across development, testing, and production environments to improve operational efficiency.
  • Seamless Integration Across Platforms: Covers major cloud platforms such as Alibaba Cloud and AWS, as well as self-built databases/data warehouses, effectively reducing maintenance costs.

Supported Ecosystem

  • Supports all Alibaba Cloud data sources: RDS, PolarDB, ADB series, Lindorm series, TableStore series, Maxcompute series.
  • Supports mainstream databases/data warehouses: MySQL, MariaDB, PostgreSQL, Oracle, SQLServer, Redis, MongoDB, StarRocks, Clickhouse, SelectDB, DB2, OceanBase, Gauss, BigQuery, etc.

Core Architecture


Usage Methods

DMS MCP Server currently supports two usage modes.

Mode One: Multi-instance Mode

  • Supports adding instances to DMS, allowing access to multiple database instances.
  • Suitable for scenarios where managing and accessing multiple database instances is required.

Scenario Example:

You are a company DBA who needs to manage and access various types of database instances (e.g., MySQL, Oracle, PostgreSQL) in production, test, and development environments. With DMS MCP Server, you can achieve unified access and centralized management of these heterogeneous databases.

Typical Question Examples:

  • Which of my instances are in the production environment?
  • Get a list of all databases named test.
  • Retrieve details of the test_db database from the myHost:myPort instance.
  • What tables are in the test_db database?
  • Use a tool to query data from the test_db database and answer: "What is today's user traffic?"

Mode Two: Single Database Mode

  • Directly specify the target database by configuring the CONNECTION_STRING parameter in the server (format: dbName@host:port).
  • Suitable for scenarios that focus on accessing a single database.

Scenario Example 1:

You are a developer who frequently accesses a fixed database (e.g., mydb@192.168.1.100:3306) for development and testing. Set the CONNECTION_STRING parameter in the DMS MCP Server configuration as follows:

ini
CONNECTION_STRING = mydb@192.168.1.100:3306

Afterward, every time the service starts, the DMS MCP Server will directly access this specified database without needing to switch instances.

Typical Question Examples:

  • What tables do I have?
  • Show the field structure of the test_table table.
  • Retrieve the first 20 rows from the test_table table.
  • Use a tool to answer: "What is today's user traffic?"

Scenario Example 2:

You are a data analyst at an e-commerce company, needing to frequently query and analyze business data such as orders, users, and products. The company's core business database is located at ecommerce@10.20.30.40:3306.

Configure the following parameters in DMS MCP Server:

ini
CONNECTION_STRING = ecommerce@10.20.30.40:3306

Simply ask questions in natural language, and DMS MCP will parse the question into SQL and return the results.

Typical Question Examples:

  • What is the total number of orders today?
  • How are the order counts ranked by province?
  • What is the number of new users each day over the past 7 days?
  • Which product category has the highest sales revenue?

Tool List

Tool NameDescriptionApplicable Mode
addInstanceAdds an instance to DMS. Only Aliyun instances are supported.Multi-instance Mode
listInstancesSearch for instances from DMS.Multi-instance Mode
getInstanceRetrieves detailed information about an instance based on host and port.Multi-instance Mode
searchDatabaseSearches databases based on schemaName.Multi-instance Mode
getDatabaseRetrieves detailed information about a specific database.Multi-instance Mode
listTablesLists tables under a specified database.Multi-instance Mode & Single Database Mode
getTableDetailInfoRetrieves detailed information about a specific table.Multi-instance Mode & Single Database Mode
executeScriptExecutes an SQL script and returns the result.Multi-instance Mode & Single Database Mode
createDataChangeOrderCreates a data change order in DMS.Multi-instance Mode & Single Database Mode
getOrderInfoRetrieves order information from DMS.Multi-instance Mode & Single Database Mode
submitOrderApprovalSubmits the order for approval in DMS.Multi-instance Mode & Single Database Mode
approveOrderApproves or rejects an order in DMS.Multi-instance Mode & Single Database Mode
generateSqlConverts natural language questions into SQL queries.Multi-instance Mode
askDatabaseNatural language querying of a database (NL2SQL + execute SQL).Single Database Mode
fixSqlAnalyzes and fixes SQL errors.Multi-instance Mode & Single Database Mode
answerSqlSyntaxAnswers SQL syntax-related questions.Multi-instance Mode & Single Database Mode
optimizeSqlAnalyzes and optimizes SQL performance.Multi-instance Mode & Single Database Mode

Supported Data Sources

DataSource/ToolNL2SQL nlsqlExecute script executeScriptShow schema getTableDetailInfoAccess control defaultAudit log default
MySQL✅✅✅✅✅
MariaDB✅✅✅✅✅
PostgreSQL✅✅✅✅✅
Oracle✅✅✅✅✅
SQLServer✅✅✅✅✅
Redis❌❌✅✅✅
MongoDB❌❌✅✅✅
StarRocks✅✅✅✅✅
Clickhouse✅✅✅✅✅
SelectDB✅✅✅✅✅
DB2✅✅✅✅✅
OceanBase✅✅✅✅✅
Gauss✅✅✅✅✅
BigQuery✅✅✅✅✅
PolarDB✅✅✅✅✅
PolarDB-X✅✅✅✅✅
AnalyticDB✅✅✅✅✅
Lindorm✅✅✅✅✅
TableStore❌❌✅✅✅
Maxcompute✅✅✅✅✅
Hologres✅✅✅✅✅

Prerequisites


Pre-configuration

Before accessing a database instance via DMS, you must first add the instance to DMS.

There are two methods to add an instance:

Method One: Use the addInstance tool provided by DMS MCP to add an instance
The DMS MCP Server provides the addInstance tool for quickly adding an instance to DMS.
For more details, see the description of the addInstance tool in the "Tool List."

Method Two: Add an instance via the DMS console

  1. Log in to the DMS Console.
  2. On the home page of the console, click the Add Instance icon in the database instance area on the left.
  3. On the Add Instance page, enter the instance information (e.g., instance address, port, username, password).
  4. Click Submit to complete the instance addition.

Getting Started

Option 1: Run from Source Code

Download the Code

bash
git clone https://github.com/aliyun/alibabacloud-dms-mcp-server.git

Configure MCP Client

Add the following content to the configuration file:

Multi-instance Mode

json
{
  "mcpServers": {
    "dms-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
        "run",
        "server.py"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
        "ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
      }
    }
  }
}

Single Database Mode

json
{
  "mcpServers": {
    "dms-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
        "run",
        "server.py"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
        "ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token",
        "CONNECTION_STRING": "dbName@host:port"
      }
    }
  }
}

Option 2: Run via PyPI Package

Multi-instance Mode

json
{
  "mcpServers": {
    "dms-mcp-server": {
      "command": "uvx",
      "args": [
        "alibabacloud-dms-mcp-server@latest"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
        "ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
      }
    }
  }
}

Single Database Mode

json
{
  "mcpServers": {
    "dms-mcp-server": {
      "command": "uvx",
      "args": [
        "alibabacloud-dms-mcp-server@latest"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
        "ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token",
        "CONNECTION_STRING": "dbName@host:port"
      }
    }
  }
}

Contact us

For any questions or suggestions, join the Alibaba Cloud DMS MCP Group (DingTalk Group ID: 129600002740) .

Security

Network Binding

This MCP Server only binds to 127.0.0.1 (localhost). It does not support remote network access. All connections must originate from the local machine. This design ensures that even if the server is accidentally started, it will not be exposed to the network.

SQL Execution Disclaimer

IMPORTANT: This tool is designed to provide full SQL execution capabilities, including SELECT, INSERT, UPDATE, DELETE, and DDL statements.

By using this MCP Server, you acknowledge and accept the following:

  1. You are solely responsible for ensuring that the AK/SK (AccessKey) used has appropriate, minimal permissions configured in Alibaba Cloud RAM.
  2. It is strongly recommended to enable DMS Safe Hosting Mode for your database instances, which provides built-in SQL review, risk identification, and approval workflows.
  3. The maintainers of this project are not responsible for any data loss, corruption, or security incidents resulting from SQL execution through this tool.
  4. Best practices:
    • Use read-only AK/SK for query-only scenarios
    • Enable DMS fine-grained permission control
    • Enable SQL audit logging for compliance
    • Regularly review and rotate access credentials

Security Design

  • No command injection risk: The codebase does not use subprocess, os.system, eval(), or exec(). All operations are performed through the Alibaba Cloud SDK.
  • No SSRF risk: All network requests are sent to a fixed Alibaba Cloud endpoint (dms-enterprise.cn-hangzhou.aliyuncs.com) via the SDK. No user-controlled URLs are fetched.
  • Input validation: Search interfaces validate input length and reject potentially dangerous SQL patterns to prevent injection through non-SQL-execution interfaces.

License

This project is licensed under the Apache 2.0 License.


Agent Skills (Independent of MCP)

In addition to the MCP Server, this project also hosts AI Agent skills for DMS Enterprise. These skills enable any AI agent (Codex, ChatGPT, Cursor, etc.) to manage DMS resources directly via OpenAPI — no MCP protocol required.

Quick Start (Skills)

  1. Read the skill definition:
    skills/database/dms/alicloud-database-dms-enterprise/SKILL.md

  2. Discover available APIs:

    bash
    python3 skills/database/dms/alicloud-database-dms-enterprise/scripts/list_openapi_meta_apis.py
  3. Configure AccessKey:

    bash
    export ALICLOUD_ACCESS_KEY_ID="your-ak"
    export ALICLOUD_ACCESS_KEY_SECRET="your-sk"
    export ALICLOUD_REGION_ID="cn-hangzhou"

Skill Capabilities

CategoryOperations
Instance ManagementRegister, list, update, delete database instances
SQL Execution & AuditExecute scripts, NL2SQL, SQL review & optimization
Permission ManagementCreate permission orders, grant/revoke user permissions
Data SecuritySensitive column identification, data masking, audit logs
Task OrchestrationCreate, execute, monitor task flows (DAG)
Metadata KnowledgeGet/edit table business knowledge

Prompt Examples

See skills/examples/prompts/ for DMS scenario-based prompt templates:

  • Instance management & resource query
  • SQL execution & audit
  • Permission & security management
  • Task orchestration & data changes
  • API discovery & metadata

Skill Index

CategorySkillDescriptionPath
database/dmsalicloud-database-dms-enterpriseManage Alibaba Cloud Data Management Service (DMS Enterprise) via OpenAPI. Use for database instance management, SQL audit, data security, task orchestration, sensitive data protection, permission management, and database operation workflows.skills/database/dms/alicloud-database-dms-enterprise

For agent-specific guidelines, see AGENTS.md.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "aliyun-alibabacloud-dms-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Usa AlibabaCloud DMS MCP Server MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso AlibabaCloud DMS MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi AlibabaCloud DMS MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di AlibabaCloud DMS MCP Server.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "aliyun-alibabacloud-dms-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "alibabacloud-dms-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di AlibabaCloud DMS MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di AlibabaCloud DMS MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare AlibabaCloud DMS MCP Server per aiutarmi con questa attività?
AlibabaCloud DMS MCP Server
Certo. L’ho letto.
Ecco cosa ho trovato con AlibabaCloud DMS MCP Server.

Domande frequenti

A cosa serve il server MCP AlibabaCloud DMS MCP Server?

AlibabaCloud DMS MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP AlibabaCloud DMS MCP Server con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare AlibabaCloud DMS MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP AlibabaCloud DMS MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando AlibabaCloud DMS MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP AlibabaCloud DMS MCP Server a TypingMind?

AlibabaCloud DMS MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP AlibabaCloud DMS MCP Server in TypingMind?

AlibabaCloud DMS MCP Server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP AlibabaCloud DMS MCP Server?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se AlibabaCloud DMS MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇