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"] 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. 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