- Explore MCP Servers
- mcp-server-mysql-pool
Mcp Server Mysql Pool
What is Mcp Server Mysql Pool
mcp-server-mysql-pool is a server that connects to MySQL databases, allowing users to access database schemas, tables, and execute read-only SQL queries through LLMs.
Use cases
Use cases include database management, data analysis, generating reports, and integrating with applications that require dynamic access to MySQL databases.
How to use
To use mcp-server-mysql-pool, install the required dependencies, configure your database credentials in a .env file, and run the server using the command ‘uv run mcp dev main.py’. Connect via a web interface to test the server.
Key features
Key features include the ability to connect to MySQL databases, expose table schemas, create statements, provide sample data, and run secure read-only SQL queries.
Where to use
mcp-server-mysql-pool is suitable for applications that require database exploration and querying capabilities, particularly in data analysis, reporting, and application development.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Server Mysql Pool
mcp-server-mysql-pool is a server that connects to MySQL databases, allowing users to access database schemas, tables, and execute read-only SQL queries through LLMs.
Use cases
Use cases include database management, data analysis, generating reports, and integrating with applications that require dynamic access to MySQL databases.
How to use
To use mcp-server-mysql-pool, install the required dependencies, configure your database credentials in a .env file, and run the server using the command ‘uv run mcp dev main.py’. Connect via a web interface to test the server.
Key features
Key features include the ability to connect to MySQL databases, expose table schemas, create statements, provide sample data, and run secure read-only SQL queries.
Where to use
mcp-server-mysql-pool is suitable for applications that require database exploration and querying capabilities, particularly in data analysis, reporting, and application development.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
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
- 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
- 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.
- **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
- **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"
]
}
}
}
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










