mysql_mcp_server
by designcomputer·★ 1,251·Score 52
MCP server enabling secure interaction with MySQL databases through structured API.
Overview
MySQL MCP Server is a production-ready Model Context Protocol implementation that facilitates secure communication between AI applications and MySQL databases. It provides a controlled interface for database exploration and analysis with proper error handling and comprehensive logging. The server supports listing available tables, reading table contents, and executing SQL queries through environment variable-based configuration for secure database access.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this when you need secure, structured access to MySQL databases for AI applications with comprehensive logging and environment variable-based security.
When NOT to choose this
Don't choose this if you need write access to databases (current implementation appears read-only) or if you require authentication beyond environment variables.
Tools this server exposes
3 tools extracted from the READMElist_tablesList available MySQL tables as resources
read_tableRead table contents from MySQL database
execute_queryExecute SQL queries with proper error handling
Comparable tools
Installation
Installation
Manual Installation
pip install mysql-mcp-serverInstalling via Smithery
To install MySQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mysql-mcp-server):
npx -y @smithery/cli install mysql-mcp-server --client claudeConfiguration
Set the following environment variables:
MYSQL_HOST=localhost # Database host
MYSQL_PORT=3306 # Optional: Database port (defaults to 3306 if not specified)
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_databaseWith Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "uv",
"args": [
"--directory",
"path/to/mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}FAQ
- Is this server designed to be used as a standalone application?
- No, MySQL MCP Server is designed to be used as a communication protocol implementation between AI applications and MySQL databases, not as a standalone server.
- What security considerations should I keep in mind?
- Always use a dedicated MySQL user with minimal permissions, never use root credentials, restrict database access to only necessary operations, enable logging for audit purposes, and implement regular security reviews.
Compare mysql_mcp_server with
Last updated · Auto-generated from public README + GitHub signals.