MySQL

A server application designed on top of MCP to interact with Cursor and MySQL.
  • python

28

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mineru98-mysql-mcp-server": {
      "command": "python",
      "args": [
        "mysql_mcp_server/main.py",
        "run"
      ],
      "env": {
        "MCP_PORT": "8081",
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_DATABASE": "mcp_test",
        "MYSQL_PASSWORD": "YOUR_PASSWORD"
      }
    }
  }
}

You deploy and use a MySQL MCP Server to let AI models interact with a MySQL database through a structured MCP (Model Context Protocol) interface. It provides tools for creating, querying, explaining, and reporting on data, enabling model-driven database operations with clear separation between request handling and actual SQL execution.

How to use

You connect your MCP client to the MySQL MCP Server and request the list of available tools, then select a tool to perform a database operation. The server handles the execution and returns results that you can use for analysis, reporting, or feeding back into your model-driven workflow.

How to install

Prerequisites you need before starting:

  • Python 3.8+ installed on your system
  • pip available to install dependencies
  • Docker and Docker Compose if you want containerized setup
# Direct Python run (no Docker)
pip install -r requirements.txt
python mysql_mcp_server/main.py run
## Run with Python directly

pip install -r requirements.txt python mysql_mcp_server/main.py run

## Run with Docker

docker run -d --name mcp-mysql
-e MYSQL_HOST=localhost
-e MYSQL_PORT=3306
-e MYSQL_USER=root
-e MYSQL_PASSWORD=mcpTest1234!!!
-e MYSQL_DATABASE=mcp_test
-e MCP_PORT=8081
-p 3306:3306 mineru/mcp-mysql:1.0.0

## Run with Docker Compose

docker-compose up -d


## Available tools

### execute\_create\_table

Create a new table in the connected MySQL database by executing a CREATE TABLE statement through the MCP tool interface.

### execute\_desc\_table

Describe the schema of a specified table by retrieving column definitions and constraints.

### execute\_explain

Obtain a query execution plan for a given SQL query to understand optimization steps.

### execute\_insert\_query

Execute an INSERT statement against the database and return affected row information.

### execute\_insight\_starter

Check the database schema to prepare data insights and structured reports.

### execute\_invoke\_viz\_pro

Provide recommendations for visualization charts based on data and requested analysis.

### execute\_select\_query

Run a SELECT query and return the result set.

### execute\_show\_tables

List all tables present in the connected database.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational