MySQL MCP: Documentation
Updated:
Connection
npx -y @benborla29/mcp-server-mysql (stdio) with MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB env vars; an HTTP remote mode with bearer-token auth is also available. SSH tunneling is configured via separate SSH_* variables. The server is read-only by default — writes are enabled with the ALLOW_INSERT, ALLOW_UPDATE, ALLOW_DELETE flags.
Tools
The main tool is mysql_query (runs SQL respecting the current access mode), plus a mysql://tables resource returning the schema of every table in the database. Supports working across multiple databases at once and automatically redacts PII (emails, phone numbers, etc.) in returned data.
Agent flow
"How many orders came from Moscow last month?", "show me the users table structure on prod through the bastion", "find duplicate emails in the customers table".
Important
mcp-server-mysql is an independent community project by developer benborla, not affiliated with Oracle or the MySQL team. Oracle currently has no official MySQL MCP server.
Pricing
The MCP server is free (open source). MySQL Community Edition is free; Enterprise/Cloud editions are billed per Oracle's plans.