Connections & Capabilities
Connects To
Capabilities
Quickstart
Config
{
"mcpServers": {
"mysql": {
"command": "go-mcp-mysql",
"args": [
"--host", "localhost",
"--user", "root",
"--pass", "password",
"--port", "3306",
"--db", "mydb"
]
}
}
}Exposed MCP Tools (9)
list_databaseLists all databases available on the MySQL server.
Read-only operation, no data modification.
list_tableLists tables in the MySQL server, optionally filtered by name.
Read-only operation, no data modification.
create_tableCreates a new table in the MySQL server using a provided SQL query.
Modifies the database schema, potentially causing disruption.
alter_tableAlters an existing table in the MySQL server using a provided SQL query.
Modifies the database schema, potentially causing disruption.
desc_tableDescribes the structure of a specified table.
Read-only operation, no data modification.
read_queryExecutes a read-only SQL query against the database.
Read-only operation, no data modification.
write_queryExecutes a write SQL query against the database.
Modifies data in the database.
update_queryExecutes an update SQL query against the database.
Modifies data in the database.
delete_queryExecutes a delete SQL query against the database.
Deletes data from the database.
Safety Assessment
This MCP server offers a balance between functionality and risk. The read-only mode and explain check provide some safety, but the ability to execute arbitrary write queries and the handling of credentials require careful management and oversight. It is safest when used in read-only mode with trusted queries, and riskiest when write access is enabled without proper input validation.
- Optional read-only mode restricts potentially harmful operations.
- Includes a query plan check using `EXPLAIN` before executing queries.
- No external internet exposure by default; operates within the local environment.
- Uses command-line arguments or DSN for configuration, avoiding hardcoded credentials in code.
- Write operations allowed by default, posing a risk of unintended data modification.
- Secrets (database credentials) are passed as command-line arguments or within the DSN string.
- No built-in RBAC or fine-grained permission controls.
- Potential for SQL injection if queries are not properly sanitized by the LLM.
