MCP Server MySQL Database Explorer
Description
# MCP Server MySQL Database Explorer This MCP server connects to your MySQL database, providing seamless access to database schemas, tables, and query capabilities through LLMs. ## Features - Connect to your MySQL database - Expose table schemas, create statement and Sample data…
About
# MCP Server MySQL Database Explorer This MCP server connects to your MySQL database, providing seamless access to database schemas, tables, and query capabilities through LLMs. ## Features - Connect to your MySQL database - Expose table schemas, create statement and Sample data as resources - Run read-only SQL…
Details
- Author
- eth-ts-x
- GitHub stars
- 1
- Downloads
- 280
- Categories
- Database
Jump to
- Connect to your MySQL database
- Expose table schemas, CREATE statements, and sample data as resources
- Run read-only SQL queries with secure validation
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:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Server MySQL Database ExplorerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with uv add "mcp[cli]" aiomysql, configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB, MYSQL_POOL_SIZE) in a .env file or directly in the environment, then run the server via uv run mcp dev main.py for testing or paste the JSON configuration into your MCP client (e.g., Cline, Cursor).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server mysql database explorer": {
"mcp-server-mysql-pool": {
"command": "uv",
"args": [
"run",
"mcp",
"dev",
"main.py"
]
}
}
}
}
McpServers
{
"mcp-server-mysql-pool": {
"command": "uv",
"args": [
"run",
"mcp",
"dev",
"main.py"
]
}
}
MCP Server MySQL Database Explorer
This MCP server connects to your MySQL database, providing seamless access to database schemas, tables, and query capabilities through LLMs.
Features
- Connect to your MySQL database
- Expose table schemas, create statement and Sample data as resources
- Run read-only SQL queries with secure validation
Setup Instructions
1. Install Dependencies
Project requires "uv" to be installed, here is "uv" installation instruction: https://docs.astral.sh/uv/getting-started/installation/#pypi
uv add "mcp[cli]" aiomysql
2. Configure Environment Variables
Create a .env file at the project root path with your database credentials:
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=YOUR_PASSWORD
MYSQL_DB=YOUR_DB
MYSQL_POOL_SIZE=10
Or set these variables directly in your environment.
3. Run in MCP interceptor
uv run mcp dev main.py
Navigate to http://127.0.0.1:6274/, then change the argument to this:
run --env-file=.env main.py
Click "Connect" to test the server
4. Install the MCP Server in MCP Client (e.g. Cline, Cursor)
Paste the JSON setting to your MCP Client:
{
"mcpServers": {
"mcp-server-mysql-pool": {
"command": "uv",
"args": [
"--directory",
"YOUR/PROJECT/ROOT/PATH",
"run",
"main.py"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "YOUR_USER",
"MYSQL_PASSWORD": "YOUR_PASSWORD",
"MYSQL_DB": "YOUR_DB",
"MYSQL_POOL_SIZE": "10"
},
"autoApprove": [
"query"
]
}
}
}
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



