Go MCP MySQL
Zero burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL and automation. No Node.js or Python environment needed.
What is Go MCP MySQL?
Go MCP MySQL is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to zero burden, ready-to-use model context protocol (mcp) server for interacting with mysql and automation. no node.js or python environment needed.
Zero burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL and automation. No Node.js or Python environment needed.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Zero burden, ready-to-use Model Context Protocol (MCP) serve
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx go-mcp-mysqlConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Go MCP MySQL
go-mcp-mysql is a zero-dependency MCP server for MySQL written in Go, distributed as a single self-contained binary that requires no Node.js, Python, or other runtime. It exposes tools for listing databases and tables, running read queries, write queries, updates, deletes, creating tables, and describing schema — with an optional read-only mode that disables all write operations. Database administrators and developers use it to give AI assistants direct natural language access to MySQL databases for querying, schema exploration, and automated data tasks without installing any additional language runtimes.
Prerequisites
- A running MySQL database instance (local or remote) that the AI client host machine can reach
- The go-mcp-mysql binary: download from GitHub releases OR build with 'go install github.com/Zhwt/go-mcp-mysql@latest'
- MySQL connection credentials: host, port, username, password, and database name (or a full DSN string)
- Claude Desktop or another MCP-compatible AI client
Download or build the binary
Download the pre-built binary for your platform from the GitHub releases page, or install from source using the Go toolchain.
# Install from source using Go
go install -v github.com/Zhwt/go-mcp-mysql@latest
# Or download the binary from releases and place it in your PATH
# https://github.com/Zhwt/go-mcp-mysql/releasesVerify the binary is accessible
Confirm go-mcp-mysql is installed and accessible on your PATH.
go-mcp-mysql --helpConfigure Claude Desktop using individual connection arguments
Add go-mcp-mysql to your Claude Desktop config. Use individual --host, --user, --pass, --port, and --db flags to specify connection details.
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--host", "localhost",
"--user", "root",
"--pass", "your_password",
"--port", "3306",
"--db", "your_database"
]
}
}
}Alternative: configure using a DSN connection string
Instead of individual flags, you can provide a full MySQL DSN string using the --dsn argument.
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--dsn",
"username:password@tcp(localhost:3306)/mydb?parseTime=true&loc=Local"
]
}
}
}Enable read-only mode for production safety
Add the --read-only flag to restrict the server to read and schema-inspection operations only, preventing any writes or schema changes from the AI assistant.
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--dsn", "user:pass@tcp(host:3306)/db?parseTime=true",
"--read-only"
]
}
}
}Go MCP MySQL Examples
Client configuration
Claude Desktop configuration for go-mcp-mysql connecting to a local MySQL instance.
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--host", "localhost",
"--user", "root",
"--pass", "your_password",
"--port", "3306",
"--db", "myapp_production"
]
}
}
}Prompts to try
Example prompts for querying and exploring MySQL databases through Claude.
- "List all tables in the current MySQL database"
- "Show me the schema for the 'users' table"
- "How many orders were placed in the last 7 days?"
- "Find the top 10 customers by total spend in the orders table"
- "Create a new table called 'audit_log' with columns for user_id, action, and timestamp"
- "What indexes exist on the 'products' table?"Troubleshooting Go MCP MySQL
Connection refused or 'unknown host' when starting
Verify MySQL is running and the host/port are correct. If connecting to a remote database, ensure the MySQL instance allows remote connections (check bind-address in my.cnf) and that your firewall allows port 3306. For Docker-hosted MySQL, use the container's IP or hostname rather than localhost.
Access denied for user when connecting
The MySQL user must have sufficient privileges for the target database. Grant access with: GRANT ALL PRIVILEGES ON your_database.* TO 'your_user'@'%'; FLUSH PRIVILEGES; For read-only mode, GRANT SELECT privileges are sufficient.
Write queries fail even though --read-only is not set
Check if the MySQL user account itself is restricted to SELECT only at the database level. Also verify the database name in --db matches exactly (case-sensitive on some MySQL configurations). Use SHOW GRANTS FOR 'your_user'@'%'; in MySQL to inspect the user's actual permissions.
Frequently Asked Questions about Go MCP MySQL
What is Go MCP MySQL?
Go MCP MySQL is a Model Context Protocol (MCP) server that zero burden, ready-to-use model context protocol (mcp) server for interacting with mysql and automation. no node.js or python environment needed. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Go MCP MySQL?
Follow the installation instructions on the Go MCP MySQL GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Go MCP MySQL?
Go MCP MySQL works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Go MCP MySQL free to use?
Yes, Go MCP MySQL is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Go MCP MySQL Alternatives — Similar Databases Servers
Looking for alternatives to Go MCP MySQL? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Go MCP MySQL in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Go MCP MySQL?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.