
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Python MCP server that lets clients query, read, write, and inspect the schema of a local MySQL database over stdio.
FastMCP-based MySQL database server is cataloged as an MCP server attributed to tonycai. A Python MCP server that lets clients query, read, write, and inspect the schema of a local MySQL database over stdio. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for FastMCP-based MySQL database server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It uses standard input and output (stdio) for commands and results.
Yes, developers can add new functionalities by creating additional MCP tools decorated with `@mcp.tool()`.
README.md · 6ee13723c910 · 采集于 2026-11-13 10:42:08 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A simple Python script for interacting with a local MySQL database via standard input/output (stdio), based on FastMCP.
mcp-mysql-server provides a command-line interface for querying and inspecting the schema of a local MySQL database. It is designed for ease of use in local development environments where a lightweight, script-based interaction is preferred. The script utilizes standard input and output for commands and results, making it easy to integrate with other command-line tools and workflows.
pip install -r requirements.txt
Create a configuration file (e.g., config.ini) in the same directory as the script or specify the path when running the script. The configuration file should have the following format:
[mysql]
host = localhost
port = 3306 # Optional, defaults to 3306
user = your_mysql_user
password = your_mysql_password
database = your_database_name
Note: Ensure the MySQL user specified has the necessary privileges to perform the actions you intend to execute.
Run the script with the following command, specifying the path to your configuration file:
python mcp-mysql-server.py --config config.ini
The script exposes the following tools that you can use to interact with your MySQL database:
test_connection: Tests the connection to the database and returns server information.list_tables: Lists all tables in the current database.read_table: Reads and returns all data from a specified table.write_table: Inserts a new row of data into a specified table.get_table_schema: Returns the schema (column definitions) for a specified table.execute_sql: Executes a custom SQL query and returns the results.mcp-mysql-server.py: Main script containing the MySQL MCP server implementationconfig.ini: Configuration file for MySQL connection parametersrequirements.txt: List of Python dependencieschanges.log: Log of changes made to the projectThis project can be run in Docker containers using Docker Compose. The setup includes:
docker-compose up -d
This will:
A special configuration file (config.docker.ini) is used when running in Docker, which points to the MySQL container.
Unit tests are provided to ensure the functionality works correctly. The tests use mocking to avoid requiring an actual database connection.
# Make a copy of the main script with underscore naming
cp mcp-mysql-server.py mcp_mysql_server.py
# Run the tests
python -m unittest tests.py
docker-compose -f docker-compose.test.yml up --build
This will build a test container and run the unit tests within it.
For developers who want to extend this tool, you can add new functionalities by creating additional MCP tools. Each tool is a Python function decorated with @mcp.tool() that handles a specific database operation.
Example of adding a new tool:
@mcp.tool()
def my_new_tool(param1: str, param2: int) -> dict:
"""
Documentation for the new tool.
"""
connection = create_mysql_connection()
cursor = connection.cursor()
try:
# Your tool implementation here
return {"result": "success"}
finally:
cursor.close()
connection.close()
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for FastMCP-based MySQL database server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-mysql-server-tonycai)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.