mysql-mcp
Provides read-only access to MySQL databases, allowing AI agents to execute SQL queries, list configured database connections, and switch between multiple MySQL instances safely.
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
A lightweight MCP server that provides safe, read-only access to MySQL databases.
Features
Multi-database — connect to multiple MySQL instances, switch between them on the fly
Read-only — write operations (
INSERT,UPDATE,DELETE,DROP, etc.) are blockedLazy connections — pools are created on first use, not at startup
MCP native — built on
@modelcontextprotocol/sdk, works with any MCP client
Related MCP server: mcp-database
Setup
Create a JSON config file with your database connections:
{
"my-db": {
"host": "db.example.com",
"port": 3306,
"user": "readonly",
"password": "secret",
"database": "mydb",
"environment": "production",
"ssl": false
}
}Set the
MYSQL_DATABASES_CONFIGenvironment variable pointing to that file.Run the server:
npx tsx index.tsTools
Tool | Description |
| List all configured databases and the active one |
| Switch the active database connection |
| Execute a read-only SQL query |
MCP Client Configuration
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["tsx", "/path/to/mysql-mcp/index.ts"],
"env": {
"MYSQL_DATABASES_CONFIG": "/path/to/databases.json"
}
}
}
}License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that provides read-only access to MySQL databases.4896 npm75MIT
- AlicenseAqualityCmaintenanceRead-only MySQL/MariaDB MCP server for running SELECT queries safely, with automatic read-only enforcement and query limits.314 npmMIT
- AlicenseNot gradedqualityDmaintenanceA readonly MCP server for MySQL databases that ensures safety by whitelisting only SELECT, SHOW, DESCRIBE, and EXPLAIN statements, with table blacklist support and configurable limits.MIT
- AlicenseNot gradedqualityDmaintenanceA secure, read-only MySQL database proxy using MCP protocol, enabling SQL queries and table inspections via HTTP.14 npm1MIT