
go-mcp-mysql
MCP server giving AI clients CRUD and read-only access to MySQL databases, no runtime
go-mcp-mysql is an open-source MCP server for databases. It is available on CLI and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- What it can do
- Can delete data (1 tool)
- GitHub stars
- 66
- Last commit
- Language
- Go
Similar MCP servers
About go-mcp-mysql
Ships as a single Go binary, so it runs without a Node.js or Python install. Once connected, an AI client can list databases and tables, inspect table structure, run read queries, and perform inserts, updates and deletes against a MySQL server.
Connection can be set with individual host, user, password, port and database flags, or with a full MySQL DSN string when custom driver options are needed. A read-only switch limits the server to listing, describing and reading tables, which helps avoid accidental writes. An optional check runs EXPLAIN on generated statements before they execute.
The project is marked as a work in progress, so it suits developers experimenting with database-aware assistants on local or test databases more than production workloads.
Tools this server provides (9)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 9 tools deletes data and 3 change data; 2 names don't say.
From the server's own tool labels and tool names; not verified by us.
- list_databaseName suggests: reads
- List all databases in the MySQL server.
- list_tableName suggests: reads
- List tables, optionally filtered by name.
- create_tableName suggests: changes
- Create a new table using a SQL query.
- alter_table
- Alter an existing table using a SQL query.
- desc_table
- Describe the structure of a table.
- read_queryName suggests: reads
- Execute a read-only SQL query.
- write_queryName suggests: changes
- Execute a write SQL query.
- update_queryName suggests: changes
- Execute an update SQL query.
- delete_queryName suggests: deletes
- Execute a delete SQL query.
What it does
- Single binary deployment
- Runs as a compiled Go program with no Node.js or Python environment required.
- Read-only mode
- A flag restricts the server to list, describe and read tools to block writes.
- Query plan check
- Optionally runs EXPLAIN on queries before execution to confirm the expected plan.
- Flexible connection options
- Accepts discrete host, user, password, port and database flags or a full DSN string.
- Schema inspection tools
- Lists databases and tables by name pattern and describes table structure.
- Full CRUD tools
- Provides separate tools for reading, writing, updating and deleting data.
Good for
- Letting an AI assistant explore an unfamiliar MySQL schema before writing queries
- Answering ad hoc data questions from a database through a chat client
- Drafting and running insert, update or delete statements with a review step
- Running a safe read-only analytics session against a production-like replica
- Automating routine table maintenance such as creating or altering tables
Pricing
Open source
More servers for the same service
go-mcp-mysql FAQ
Do I need Node.js or Python to run go-mcp-mysql?
No. The server is distributed as a Go binary, and it can also be built from source with Go installed.
How do I stop the assistant from modifying data?
Add the --read-only flag. Only tools beginning with list, read_ and desc_ are then available.
How can I pass connection settings?
Use separate host, user, pass, port and db arguments, or supply a single MySQL DSN with the --dsn argument.
Is go-mcp-mysql ready for production?
The project describes itself as a work in progress that may not yet be ready for production use.
Is go-mcp-mysql free?
Yes. go-mcp-mysql is open source, so you can use and self-host it for free.
What are the best alternatives to go-mcp-mysql?
The closest alternatives to go-mcp-mysql are mysql_mcp_server, db-mcp-server, mysql-mcp-server, mcp-server-mysql and mysql_mcp_server_pro.
Where this comes from
- Description: written from the project's README.



