MySQL MCP Server

by he426100

2.7k downloads Not rated yet MIT license

About

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases

Details

License
MIT license

Explore

- List available MySQL tables as resources
- Read table contents
- Execute SQL queries with proper error handling
- Secure database access through environment variables
- Comprehensive logging

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

git clone https://github.com/he426100/mysql-mcp-server
cd mysql-mcp-server
composer install

composer install

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mysql mcp server": {
            "mysql-mcp-server-he426100": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mysql-mcp-server",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mysql-mcp-server-he426100": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mysql-mcp-server",
            "."
        ]
    }
}

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. This server allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.

Features

- List available MySQL tables as resources
- Read table contents
- Execute SQL queries with proper error handling
- Secure database access through environment variables
- Comprehensive logging

Installation

git clone https://github.com/he426100/mysql-mcp-server
cd mysql-mcp-server
composer install

Configuration

Set the following environment variables:

DB_HOST=localhost     # Database host
DB_PORT=3306         # Optional: Database port (defaults to 3306 if not specified)
DB_USERNAME=your_username
DB_PASSWORD=your_password
DB_DATABASE=your_database

Usage

As a standalone server

```bash

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.