
MCP Server
eth-ts-x
public
mcp server mysql pool
一个通过 LLM 提供 MySQL 数据库访问的 MCP 服务器。
Repository Info
1
Stars
0
Forks
1
Watchers
0
Issues
Python
Language
-
License
About This Server
一个通过 LLM 提供 MySQL 数据库访问的 MCP 服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
# 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
```bash
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
```bash
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:
```json
{
"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"
]
}
}
}
```
Quick Start
1
Clone the repository
git clone https://github.com/eth-ts-x/mcp-server-mysql-pool2
Install dependencies
cd mcp-server-mysql-pool
npm install3
Follow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Ownereth-ts-x
Repomcp-server-mysql-pool
Language
Python
License-
Last fetched8/8/2025
Recommended MCP Servers
💬
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
integrationsdiscordchat
🔗
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
integrationsautomationsaas
🕷️
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
apifycrawlerdata
🌐
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
testingqabrowsers
⚡
Zapier MCP
A Zapier server that provides automation capabilities for various apps.
zapierautomation