Content
# mysql_mcpserver_stdio
The MCP format is so standardized that it can definitely generate server files in bulk.
Batch generate MCP servers based on MySQL database, supporting stdio transmission.
Language: Python, Frontend: FLASK
Installation: Install requirements from requirments.txt in a virtual environment.
Run: `python app.py`
In your browser, enter the address: `127.0.0.1:5000` to access the server file generation page. Input the MySQL database parameters, including: IP, port, username (it's best to create a dedicated account), password, and database name. The generated MCP server name needs to end with .py. The .py files will be generated in the directory. By default, it includes a `check_database` function for checking the database connection.
To access the tool function addition page: input the name of your defined tool function, the SQL statement (the MCP server file in MySQL should start with a query tool),
and the output format after the SQL query (this can be left blank). Refer to the example below:
```python
for row in rows:
content.append("Device Account: " + row['username'])
content.append("IPv4 Address: " + row['user_ip4'])
content.append("MAC Address: " + row['user_mac'].replace(":", "-"))
```
Note the alignment; there are four spaces before `content`.
The generated server file can be tested with MCP Inspector to check if the tool calls are functioning properly.
For the MCP client, you can directly use existing tools. It is recommended to use CherryStudio, which is quite convenient.
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.