go-mcp-mysql
by Zhwt·★ 53·Score 44
A production-ready Go-based MCP server for MySQL database operations with read-only mode and query plan checking.
Overview
go-mcp-mysql is a well-structured Model Context Protocol server that enables AI models to interact with MySQL databases. Built in Go, it provides a zero-dependency solution for executing CRUD operations while maintaining security through read-only mode and optional query plan validation. The server implements proper MCP protocol patterns with clearly defined tools for database schema inspection and data manipulation.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this server when you need a lightweight MySQL integration for AI systems without Node.js/Python dependencies, or when you specifically need query plan validation via EXPLAIN statements.
When NOT to choose this
Avoid this if you need advanced security features, authentication beyond basic credentials, or production stability as it's marked as work in progress.
Tools this server exposes
9 tools extracted from the READMElist_databaseList all databases in the MySQL server.
list_tableList tables in the MySQL server, optionally filtered by name.
create_tableCreate a new table in the MySQL server.
alter_tableAlter an existing table structure without dropping tables or columns.
desc_tableDescribe the structure of a table.
read_queryExecute a read-only SQL query.
write_queryExecute a write SQL query.
update_queryExecute an update SQL query.
delete_queryExecute a delete SQL query.
Comparable tools
Installation
Installation
Option 1: Download Binary
- Get the latest [release](https://github.com/Zhwt/go-mcp-mysql/releases)
- Place it in your
$PATHor easily accessible location
Option 2: Build from Source
go install -v github.com/Zhwt/go-mcp-mysql@latestConfiguration
Add to Claude Desktop configuration:
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--host", "localhost",
"--user", "root",
"--pass", "password",
"--port", "3306",
"--db", "mydb"
]
}
}
}FAQ
- Is this server safe for production use?
- The README mentions it's a work in progress and may not be ready for production use yet. However, it includes security features like read-only mode and query plan checking.
- Can I use custom MySQL connection parameters?
- Yes, you can use either individual parameters (--host, --user, etc.) or a full DSN string with --dsn flag for more complex configurations.
Compare go-mcp-mysql with
Last updated · Auto-generated from public README + GitHub signals.