go-mcp-mysql
@optimisticdur
About 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. mcp, mcp-server, model-context-protocol, mysql
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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
FAQ from go-mcp-mysql
What is go-mcp-mysql and how does it differ from other database MCP servers?
It is a self‑contained MCP server for MySQL that does not require Node.js or Python, making it lighter and easier to deploy. It also offers a read‑only mode and built‑in EXPLAIN query plan checks for added safety.
What are the runtime dependencies?
The only dependency is the compiled binary itself (or a Go installation if building from source). No other language runtimes are needed.
How do I enable read-only mode?
Add the --read-only flag to the server arguments. In this mode, only tools starting with list, read_, and desc_ are available. Restart the MCP server after adding the flag.
What does the EXPLAIN check do?
By default, each CRUD query is first run through EXPLAIN ? to inspect the query plan. If the plan does not match expected patterns, the query may be rejected. Adding the --with-explain-check flag disables this check.
Can I use a DSN to connect to MySQL?
Yes. Use the --dsn flag with a standard MySQL DSN string. Refer to the MySQL driver documentation for DSN format options.
Frequently asked questions
What is go-mcp-mysql and how does it differ from other database MCP servers?
It is a self‑contained MCP server for MySQL that does not require Node.js or Python, making it lighter and easier to deploy. It also offers a read‑only mode and built‑in EXPLAIN query plan checks for added safety.
What are the runtime dependencies?
The only dependency is the compiled binary itself (or a Go installation if building from source). No other language runtimes are needed.
How do I enable read-only mode?
Add the `--read-only` flag to the server arguments. In this mode, only tools starting with `list`, `read_`, and `desc_` are available. Restart the MCP server after adding the flag.
What does the EXPLAIN check do?
By default, each CRUD query is first run through `EXPLAIN ?` to inspect the query plan. If the plan does not match expected patterns, the query may be rejected. Adding the `--with-explain-check` flag disables this check.
Can I use a DSN to connect to MySQL?
Yes. Use the `--dsn` flag with a standard MySQL DSN string. Refer to the MySQL driver documentation for DSN format options.
Basic information
More Databases MCP servers
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
PostgreSQL Model Context Protocol (PG-MCP) Server
stuzeroXata MCP Server
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.
Elasticsearch MCP Server
elasticNeon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
Comments