From fddc1eb593c428640d0b1f0ad5daa1a6e0c901d4 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 31 Mar 2025 07:06:02 -0700 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..75a0b03 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +FROM python:3.13-slim + +# Install build dependencies needed for building Python packages +RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/* + +# Set work directory +WORKDIR /app + +# Copy project files +COPY . /app + +# Upgrade pip +RUN pip install --upgrade pip + +# Install the package and its dependencies +RUN pip install . + +# Set the entrypoint to the MCP server command +CMD ["adb-mysql-mcp-server"] From 019929974abe13b00fb2f08904b2d99bc6bb802c Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 31 Mar 2025 07:06:03 -0700 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..0067a59 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,52 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - adbMysqlHost + - adbMysqlUser + - adbMysqlPassword + - adbMysqlDatabase + properties: + adbMysqlHost: + type: string + description: Hostname or IP address of the Adb MySQL server + adbMysqlPort: + type: number + default: 3306 + description: Port number of the Adb MySQL server + adbMysqlUser: + type: string + default: "" + description: Username for the Adb MySQL database + adbMysqlPassword: + type: string + default: "" + description: Password for the Adb MySQL database + adbMysqlDatabase: + type: string + default: "" + description: Name of the Adb MySQL database + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ + command: 'adb-mysql-mcp-server', + args: [], + env: { + ADB_MYSQL_HOST: config.adbMysqlHost, + ADB_MYSQL_PORT: String(config.adbMysqlPort || 3306), + ADB_MYSQL_USER: config.adbMysqlUser, + ADB_MYSQL_PASSWORD: config.adbMysqlPassword, + ADB_MYSQL_DATABASE: config.adbMysqlDatabase + } + }) + exampleConfig: + adbMysqlHost: 127.0.0.1 + adbMysqlPort: 3306 + adbMysqlUser: root + adbMysqlPassword: secret + adbMysqlDatabase: sample_db From 8580fc1e2a31a7e6d1102e3f3370be2dae079d40 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 31 Mar 2025 07:06:04 -0700 Subject: [PATCH 3/3] Update README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25ddae4..d47b32f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,19 @@ # Adb MySQL MCP Server +[![smithery badge](https://smithery.ai/badge/@aliyun/alibabacloud-adb-mysql-mcp-server)](https://smithery.ai/server/@aliyun/alibabacloud-adb-mysql-mcp-server) Adb MySQL MCP Server serves as a universal interface between AI Agents and Adb MySQL databases. It enables seamless communication between AI Agents and Adb MySQL, helping AI Agents retrieve Adb MySQL database metadata and execute SQL operations. ## 1. MCP Client Configuration +### Installing via Smithery + +To install Adb MySQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@aliyun/alibabacloud-adb-mysql-mcp-server): + +```bash +npx -y @smithery/cli install @aliyun/alibabacloud-adb-mysql-mcp-server --client claude +``` + ### Mode 1: Using Local File - #### Download the GitHub repository @@ -128,4 +137,4 @@ uv --directory /path/to/alibabacloud-adb-mysql-mcp-server run adb-mysql-mcp-serv - ### Prompts -Not provided at the present moment. \ No newline at end of file +Not provided at the present moment.