Multi Mysql Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Multi Mysql Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server for MySQL and MariaDB — designed for AI coding assistants like Claude Code, Cursor, Windsurf, GitHub Copilot, and any MCP-compatible client.
One server, many databases. Connect multiple MySQL and MariaDB databases through a single MCP server with built-in SQL injection protection, read-only mode, connection pooling, and hot-reload configuration.
--label to expose only relevant databases| Tool | Description |
|---|---|
mysql_list_databases | List all configured database connections with status |
mysql_query | Execute SQL queries with read-only enforcement and SQL injection protection |
mysql_list_tables | List tables with row counts, storage engine (InnoDB, MyISAM), and data size |
mysql_describe_table | Show columns, types, indexes, primary keys, foreign keys, and constraints |
mysql_list_schemas | List all databases/schemas available on the MySQL server |
mysql_health_check | Test connectivity, MySQL version, and response latency |
mysql_explain | Run EXPLAIN ANALYZE with automatic ROLLBACK for safety |
#### Install
git clone https://github.com/VKirill/multi-mysql-mcp-server.git
cd multi-mysql-mcp-server
npm install
npm run build#### Configure
Create ~/.mcp-mysql/config.json (or use --config to specify a custom path):
{
"connections": [
{
"label": "local",
"host": "localhost",
"port": 3306,
"user": "dev",
"password": "devpass123",
"database": "myapp"
},
{
"label": "production",
"url": "mysql://${PROD_USER}:${PROD_PASS}@db.example.com:3306/prod_db",
"readOnly": true,
"ssl": true
}
]
}#### Add to Claude Code
claude mcp add mysql -- node /path/to/dist/index.js --config ~/.mcp-mysql/config.jsonOr add to ~/.claude.json:
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "node",
"args": ["/path/to/dist/index.js", "--config", "/path/to/config.json"]
}
}
}#### Add to Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["/path/to/dist/index.js", "--config", "/path/to/config.json"]
}
}
}#### Docker
docker build -t mcp-mysql .
docker run -v /path/to/config.json:/app/config.json mcp-mysql --config /app/config.json#### Connection Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
label | string | Yes | — | Unique identifier for the database |
host | string | * | — | MySQL server hostname |
port | number | No | 3306 | MySQL server port |
user | string | * | — | Database username |
password | string | No | "" | Database password |
database | string | * | — | Default database/schema name |
url | string | * | — | MySQL connection URL (alternative to host/user/database) |
ssl | bool/object | No | — | Enable SSL/TLS (supports AWS RDS, Azure, GCP Cloud SQL) |
readOnly | boolean | No | true | Enforce read-only transactions |
enabled | boolean | No | true | Enable/disable this connection |
poolSize | number | No | 5 | Maximum pool connections (1–100) |
\ Either `url` or* host + user + database is required.
#### Environment Variables in Config
Use ${VAR} or ${VAR:-default} syntax in any config string value:
{
"host": "${MYSQL_HOST:-localhost}",
"user": "${MYSQL_USER}",
"password": "${MYSQL_PASSWORD}"
}#### CLI Options
| Option | Description |
|---|---|
--config <path> | Path to config file (default: ~/.mcp-mysql/config.json) |
--label <name> | Restrict server to a single database (per-project isolation) |
Environment variable: MCP_MYSQL_CONFIG — alternative config file path.
# comments, backslash escapes)connection.execute() with ? placeholdersSET SESSION TRANSACTION READ ONLY wraps all queries in transactionsSee SECURITY.md for the full security model and responsible disclosure policy.
MCP-сервер для MySQL и MariaDB — предназначен для AI-ассистентов: Claude Code, Cursor, Windsurf, GitHub Copilot и любых MCP-совместимых клиентов.
Один сервер — много баз данных. Подключайте несколько MySQL и MariaDB баз через один MCP-сервер со встроенной защитой от SQL-инъекций, режимом read-only, пулом соединений и горячей перезагрузкой конфигурации.
--label показывает только нужные базы| Инструмент | Описание |
|---|---|
mysql_list_databases | Список всех настроенных подключений к БД |
mysql_query | Выполнение SQL-запросов с read-only и защитой от инъекций |
mysql_list_tables | Список таблиц: кол-во строк, движок (InnoDB, MyISAM), размер |
mysql_describe_table | Колонки, типы, индексы, первичные и внешние ключи, ограничения |
mysql_list_schemas | Список всех баз данных/схем на сервере MySQL |
mysql_health_check | Проверка соединения, версия MySQL, задержка |
mysql_explain | EXPLAIN ANALYZE с автоматическим ROLLBACK |
git clone https://github.com/VKirill/multi-mysql-mcp-server.git
cd multi-mysql-mcp-server
npm install
npm run buildСоздайте ~/.mcp-mysql/config.json:
{
"connections": [
{
"label": "local",
"host": "localhost",
"port": 3306,
"user": "dev",
"password": "devpass123",
"database": "myapp"
}
]
}Добавьте в Claude Code (~/.claude.json):
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "node",
"args": ["путь/до/dist/index.js", "--config", "путь/до/config.json"]
}
}
}# комментарии, \ экранированиеconnection.execute() с ? плейсхолдерамиSET SESSION TRANSACTION READ ONLYMySQL 和 MariaDB 的 MCP 服务器 — 专为 AI 编码助手设计:Claude Code、Cursor、Windsurf、GitHub Copilot 以及任何 MCP 兼容客户端。
一个服务器,多个数据库。 通过单个 MCP 服务器连接多个 MySQL 和 MariaDB 数据库,内置 SQL 注入防护、只读模式、连接池和热重载配置。
--label 仅暴露相关数据库| 工具 | 说明 |
|---|---|
mysql_list_databases | 列出所有已配置的数据库连接及状态 |
mysql_query | 执行 SQL 查询,强制只读模式并防止 SQL 注入 |
mysql_list_tables | 列出表:行数、存储引擎(InnoDB、MyISAM)、数据大小 |
mysql_describe_table | 显示列、类型、索引、主键、外键和约束 |
mysql_list_schemas | 列出 MySQL 服务器上所有数据库/模式 |
mysql_health_check | 测试连接、MySQL 版本和响应延迟 |
mysql_explain | 执行 EXPLAIN ANALYZE 并自动 ROLLBACK |
git clone https://github.com/VKirill/multi-mysql-mcp-server.git
cd multi-mysql-mcp-server
npm install
npm run build创建 ~/.mcp-mysql/config.json:
{
"connections": [
{
"label": "local",
"host": "localhost",
"port": 3306,
"user": "dev",
"password": "devpass123",
"database": "myapp"
}
]
}添加到 Claude Code 配置(~/.claude.json):
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "node",
"args": ["dist/index.js的路径", "--config", "config.json的路径"]
}
}
}# 注释、\ 转义connection.execute() 使用 ? 占位符SET SESSION TRANSACTION READ ONLYSee CONTRIBUTING.md for development setup and guidelines.
MIT — see LICENSE for details.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.