What is go-mcp-mysql?
go-mcp-mysql is a zero-burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL databases. It provides tools for CRUD operations on databases and tables, supports a read-only mode to prevent accidental writes, and can optionally check query plans via EXPLAIN before executing queries. No Node.js or Python runtime is required. This is a work in progress and may not yet be ready for production.
How to use go-mcp-mysql?
Download the latest release binary and place it in your $PATH, or build from source with go install -v github.com/optimisticdur/go-mcp-mysql@latest. Configure it in your MCP client using either command‑line arguments (host, user, pass, port, db) or a DSN string. Optional flags include --read-only to restrict tools to read-only operations and --with-explain-check to disable the default EXPLAIN check for CRUD queries.
Features of go-mcp-mysql
- No Node.js or Python environment needed
- Supports both command‑line arguments and DSN configuration
- Read-only mode prevents surprise write operations
- Optional EXPLAIN query plan checking before execution
- Tools for listing databases and tables
- CRUD operations: read, write, update, delete queries
Use cases of go-mcp-mysql
- Managing MySQL databases through AI‑assisted chat interfaces
- Executing read‑only queries safely during development or auditing
- Creating, altering, and describing table schemas via natural language
- Performing automated database maintenance with write‑protected safeguards
评论