MySQL MCP Server

by wuwen1030

1 stars
192 downloads
Not rated
GitHub

About

A MySQL implementation of the Model Context Protocol (MCP) server. This server allows AI models to interact with MySQL databases through a standardized interface.

Details

Author
wuwen1030
GitHub stars
1
Downloads
192
Categories
Database

- List available database tables
- Get table schemas
- Execute read-only SQL queries
- Safe transaction handling with automatic rollback

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MySQL MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install with npm install and build with npm run build, then configure the server in your Claude Desktop app's claude_desktop_config.json by providing the absolute path to the built index.js and setting environment variables for MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mysql mcp server": {
            "mysql": {
                "command": "node",
                "args": [
                    "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mysql-mcp-server/dist/index.js"
                ],
                "env": {
                    "MYSQL_HOST": "",
                    "MYSQL_PORT": "",
                    "MYSQL_USER": "",
                    "MYSQL_PASSWORD": "",
                    "MYSQL_DATABASE": ""
                }
            }
        }
    }
}

McpServers

{
    "mysql": {
        "command": "node",
        "args": [
            "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mysql-mcp-server/dist/index.js"
        ],
        "env": {
            "MYSQL_HOST": "",
            "MYSQL_PORT": "",
            "MYSQL_USER": "",
            "MYSQL_PASSWORD": "",
            "MYSQL_DATABASE": ""
        }
    }
}

MySQL MCP Server

A MySQL implementation of the Model Context Protocol (MCP) server. This server allows AI models to interact with MySQL databases through a standardized interface.

Features

- List available database tables
- Get table schemas
- Execute read-only SQL queries
- Safe transaction handling with automatic rollback

Installation

npm install
npm run build

Usage

Claude Desktop App

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": [
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mysql-mcp-server/dist/index.js",
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "",
        "MYSQL_DATABASE": "test"
      }
    }
  }
}

Replace the env config with yours!

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.