mcp-server-mysql
Model Context Protocol Server for MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Features
- Read-only access to MySQL databases
- Schema inspection capabilities
- Safe query execution within READ ONLY transactions
- Docker support
- NPM package available
Installation
Using Docker
# Build the Docker image
make docker
# Run with Docker
docker run -i --rm mcp/mysql mysql://host:port/dbname
Installing via Smithery
To install MySQL Database Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @yuru-sha/mcp-server-mysql --client claude
Usage
With Claude Desktop
Add the following configuration to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/mysql",
"mysql://host:port/dbname"
]
}
}
}
Note: When using Docker on macOS, use host.docker.internal if the MySQL server is running on the host network.
Connection URL Format
mysql://[user][:password]@host[:port]/database
Replace /database with your database name.
Development
# Initial setup
make setup
# Build the project
make build
# Format code
make format
# Run linter
make lint
License
This project is released under the MIT License.
Security
This server enforces read-only access to protect your database. All queries are executed within READ ONLY transactions.
For enhanced security, we recommend creating a read-only user.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
MySQL Database Server
Project Details
- yuru-sha/mcp-server-mysql
- MIT License
- Last Updated: 4/16/2025
Categories
Recomended MCP Servers
This is a very basic implementation of an Mcp-Reasoning-Server for Cursor AI .
Integrate Arduino-based robotics (using the NodeMCU ESP32 or Arduino Nano 368 board) with AI using the MCP (Model...
Repository for MCP screenshot functionality
A Model Context Protocol (MCP) server that provides tools for AI, allowing it to interact with the DataWorks...
Upstash Model Context Server
An implementation of the Model Context Protocol for the World Bank open data API
An MCP service for Ant Design components query | 一个 Ant Design 组件查询的 MCP 服务,包含组件文档、API 文档、代码示例和更新日志查询
A MCP server for interacting with Bear note-taking software.
A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
Terraform Registry MCP Server
A MCP Server used to collect MCP Servers over the internet.
MCP Server for AI Agent Marketplace Index from DeepNLP





