Go MCP MySQL

v1.0.0Databasesstable

Zero burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL and automation. No Node.js or Python environment needed.

mcpmcp-servermodel-context-protocolmysql
Share:
53
Stars
0
Downloads
0
Weekly
0/5

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

MySQL database interaction without Node/Python
Zero-dependency database automation
Zhwt

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx go-mcp-mysql

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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/releases
2

Verify the binary is accessible

Confirm go-mcp-mysql is installed and accessible on your PATH.

go-mcp-mysql --help
3

Configure 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"
      ]
    }
  }
}
4

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"
      ]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "go-mcp-mysql": { "command": "npx", "args": ["-y", "go-mcp-mysql"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides