MySQL MCP Server
Provides read-only access to MySQL databases with tools for executing SELECT queries and automatic discovery of table schemas, columns, types, keys, and constraints.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MySQL MCP Server
A Model Context Protocol server that provides read-only access to MySQL databases.
Features
Tools
query - Execute read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN)
All queries run within READ ONLY transactions
Resources
Table schemas - Automatic discovery of tables and columns with their types, keys, and constraints
Related MCP server: Simple MCP MySQL Server
Installation
Docker
docker build -t mcp/mysql .
docker run -i --rm mcp/mysql mysql://user:password@host:3306/databaseNPM
npm install -g @modelcontextprotocol/server-mysqlNPX
npx -y @modelcontextprotocol/server-mysql mysql://user:password@localhost:3306/databaseUsage
Add to your MCP's config:
Using Docker image (recommended)
docker pull guidomarinho/mcp-mysql{
"mcpServers": {
"your_mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"guidomarinho/mcp-mysql:latest",
"mysql://root:password@host.docker.internal:3306/you_db"
],
"env": {}
}
}
}Using local Docker
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/mysql",
"mysql://root:password@host.docker.internal:3306/database"
]
}
}
}Using NPX
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql",
"mysql://user:password@localhost:3306/database"
]
}
}
}Note: When using Docker to connect to a MySQL server on your host machine, use host.docker.internal instead of localhost.
Connection String Format
mysql://username:password@host:port/databaseDevelopment
npm install
npm run build
node dist/index.js mysql://user:password@localhost:3306/databaseLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables read-only MySQL database access, allowing listing databases, tables, describing schemas, and executing SELECT/SHOW/DESCRIBE/EXPLAIN queries.715 npm4MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with MySQL databases, including listing tables, viewing schemas, and executing read-only SQL queries through natural language.7-
- AlicenseNot gradedqualityDmaintenanceEnables schema introspection and safe read-only queries on MySQL databases, supporting table/column discovery, relationship exploration, and controlled SELECT queries.8 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables secure SQL query execution on MySQL databases with authentication and permission control, allowing users to explore database tables and run read-only queries.-