@neverinfamous/mysql-mcp 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/codeql.yml +0 -8
- package/.github/workflows/docker-publish.yml +10 -8
- package/CHANGELOG.md +11 -0
- package/DOCKER_README.md +19 -225
- package/Dockerfile +5 -0
- package/README.md +37 -13
- package/VERSION +1 -1
- package/package.json +1 -1
- package/releases/v2.3.0-release-notes.md +20 -20
- package/releases/v2.3.1-release-notes.md +34 -0
|
@@ -213,16 +213,18 @@ jobs:
|
|
|
213
213
|
curl -sSfL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh | sh -s --
|
|
214
214
|
docker images local-scan:latest
|
|
215
215
|
echo "🔍 Running Docker Scout security scan"
|
|
216
|
-
if timeout 480 docker scout cves local-scan:latest
|
|
217
|
-
echo "
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
if timeout 480 docker scout cves local-scan:latest --only-fixed --exit-code 2>&1 | tee scout_output.txt; then
|
|
217
|
+
echo "✅ No fixable vulnerabilities detected"
|
|
218
|
+
else
|
|
219
|
+
SCOUT_EXIT=$?
|
|
220
|
+
if [ "$SCOUT_EXIT" -eq 2 ]; then
|
|
221
|
+
echo "❌ Fixable vulnerabilities detected — blocking deployment"
|
|
222
|
+
cat scout_output.txt
|
|
223
|
+
exit 1
|
|
221
224
|
else
|
|
222
|
-
echo "
|
|
225
|
+
echo "⚠️ Docker Scout scan failed or timed out (exit code: $SCOUT_EXIT)"
|
|
226
|
+
cat scout_output.txt
|
|
223
227
|
fi
|
|
224
|
-
else
|
|
225
|
-
echo "⚠️ Docker Scout scan timed out or failed"
|
|
226
228
|
fi
|
|
227
229
|
|
|
228
230
|
# Merge platform images into multi-arch manifest
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.3.1] - 2026-02-18
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
- **CVE Fix: `tar` Path Traversal (CVE-2026-26960)** — Patched npm's bundled `tar` (< 7.5.8) in the Dockerfile runtime stage to fix a high-severity path traversal vulnerability that allowed arbitrary file read/write via crafted hardlinks.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Docker Scout Security Gate Hardened** — Docker Scout scan in `docker-publish.yml` now **blocks deployments** on any fixable CVE (any severity) using `--only-fixed --exit-code`. Unfixable zero-day CVEs are allowed through. Previously the scan was informational only and never failed the workflow.
|
|
19
|
+
- **CodeQL Workflow PR Trigger** — Removed `paths` filter from `pull_request` trigger in `codeql.yml` so the `analyze (javascript-typescript)` required check always runs on PRs. The existing `check-files` step handles skipping analysis for non-code PRs.
|
|
20
|
+
|
|
10
21
|
## [2.3.0] - 2026-02-18
|
|
11
22
|
|
|
12
23
|
### Fixed
|
package/DOCKER_README.md
CHANGED
|
@@ -50,13 +50,18 @@
|
|
|
50
50
|
#### NPM (Recommended)
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
# Install globally
|
|
54
53
|
npm install -g @neverinfamous/mysql-mcp
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run the server:
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
```bash
|
|
57
59
|
mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or use npx without installing:
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
```bash
|
|
60
65
|
npx @neverinfamous/mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database
|
|
61
66
|
```
|
|
62
67
|
|
|
@@ -116,11 +121,15 @@ mysql-mcp --mysql mysql://root:pass@localhost/db \
|
|
|
116
121
|
|
|
117
122
|
**Start the HTTP server:**
|
|
118
123
|
|
|
124
|
+
Local installation:
|
|
125
|
+
|
|
119
126
|
```bash
|
|
120
|
-
# Local installation
|
|
121
127
|
node dist/cli.js --transport http --port 3000 --server-host 0.0.0.0 --mysql mysql://user:password@localhost:3306/database
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Docker (expose port 3000):
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
```bash
|
|
124
133
|
docker run -p 3000:3000 writenotenow/mysql-mcp \
|
|
125
134
|
--transport http \
|
|
126
135
|
--port 3000 \
|
|
@@ -191,43 +200,6 @@ docker run -p 3000:3000 writenotenow/mysql-mcp \
|
|
|
191
200
|
| **MySQL in Docker** | Container name or network | `mysql://user:pass@mysql-container:3306/db` |
|
|
192
201
|
| **Remote/Cloud MySQL** | Hostname or IP | `mysql://user:pass@db.example.com:3306/db` |
|
|
193
202
|
|
|
194
|
-
### MySQL on Host Machine
|
|
195
|
-
|
|
196
|
-
If MySQL is installed directly on your computer (via installer, Homebrew, etc.):
|
|
197
|
-
|
|
198
|
-
```json
|
|
199
|
-
"--mysql", "mysql://user:password@host.docker.internal:3306/database"
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### MySQL in Another Docker Container
|
|
203
|
-
|
|
204
|
-
Add both containers to the same Docker network, then use the container name:
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Create network and run MySQL
|
|
208
|
-
docker network create mynet
|
|
209
|
-
docker run -d --name mysql-db --network mynet -e MYSQL_ROOT_PASSWORD=pass mysql:8
|
|
210
|
-
# Run MCP server on same network
|
|
211
|
-
docker run -i --rm --network mynet writenotenow/mysql-mcp:latest \
|
|
212
|
-
--transport stdio --mysql mysql://root:pass@mysql-db:3306/mysql
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Remote/Cloud MySQL (RDS, Cloud SQL, etc.)
|
|
216
|
-
|
|
217
|
-
Use the remote hostname directly:
|
|
218
|
-
|
|
219
|
-
```json
|
|
220
|
-
"--mysql", "mysql://user:password@your-instance.region.rds.amazonaws.com:3306/database"
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
| Provider | Example Hostname |
|
|
224
|
-
| ---------------- | ------------------------------------------------ |
|
|
225
|
-
| AWS RDS | `your-instance.xxxx.us-east-1.rds.amazonaws.com` |
|
|
226
|
-
| Google Cloud SQL | `project:region:instance` (via Cloud SQL Proxy) |
|
|
227
|
-
| Azure MySQL | `your-server.mysql.database.azure.com` |
|
|
228
|
-
| PlanetScale | `aws.connect.psdb.cloud` (SSL required) |
|
|
229
|
-
| DigitalOcean | `your-cluster-do-user-xxx.db.ondigitalocean.com` |
|
|
230
|
-
|
|
231
203
|
> **Tip:** For remote connections, ensure your MySQL server allows connections from Docker's IP range and that firewalls/security groups permit port 3306.
|
|
232
204
|
|
|
233
205
|
---
|
|
@@ -312,128 +284,7 @@ The `--tool-filter` argument accepts **shortcuts**, **groups**, or **tool names*
|
|
|
312
284
|
|
|
313
285
|
---
|
|
314
286
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
Add one of these configurations to your IDE's MCP settings file (e.g., `cline_mcp_settings.json`, `.cursorrules`, or equivalent):
|
|
318
|
-
|
|
319
|
-
#### Option 1: Starter (39 Essential Tools)
|
|
320
|
-
|
|
321
|
-
**Best for:** General MySQL database work - CRUD operations, schema management, and monitoring.
|
|
322
|
-
|
|
323
|
-
```json
|
|
324
|
-
{
|
|
325
|
-
"mcpServers": {
|
|
326
|
-
"mysql-mcp": {
|
|
327
|
-
"command": "node",
|
|
328
|
-
"args": [
|
|
329
|
-
"/path/to/mysql-mcp/dist/cli.js",
|
|
330
|
-
"--transport",
|
|
331
|
-
"stdio",
|
|
332
|
-
"--tool-filter",
|
|
333
|
-
"starter"
|
|
334
|
-
],
|
|
335
|
-
"env": {
|
|
336
|
-
"MYSQL_HOST": "localhost",
|
|
337
|
-
"MYSQL_PORT": "3306",
|
|
338
|
-
"MYSQL_USER": "your_username",
|
|
339
|
-
"MYSQL_PASSWORD": "your_password",
|
|
340
|
-
"MYSQL_DATABASE": "your_database"
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
#### Option 2: Cluster (11 Tools for InnoDB Cluster Monitoring)
|
|
348
|
-
|
|
349
|
-
**Best for:** Monitoring InnoDB Cluster, Group Replication status, and cluster topology.
|
|
350
|
-
|
|
351
|
-
> **⚠️ Prerequisites:**
|
|
352
|
-
>
|
|
353
|
-
> - **InnoDB Cluster** must be configured and running with Group Replication enabled
|
|
354
|
-
> - Connect to a cluster node directly (e.g., `localhost:3307`) — NOT a standalone MySQL instance
|
|
355
|
-
> - Use `cluster_admin` or `root` user with appropriate privileges
|
|
356
|
-
> - See [MySQL Ecosystem Setup Guide](https://github.com/neverinfamous/mysql-mcp/wiki/MySQL-Ecosystem-Setup) for cluster setup instructions
|
|
357
|
-
|
|
358
|
-
```json
|
|
359
|
-
{
|
|
360
|
-
"mcpServers": {
|
|
361
|
-
"mysql-mcp-cluster": {
|
|
362
|
-
"command": "node",
|
|
363
|
-
"args": [
|
|
364
|
-
"/path/to/mysql-mcp/dist/cli.js",
|
|
365
|
-
"--transport",
|
|
366
|
-
"stdio",
|
|
367
|
-
"--tool-filter",
|
|
368
|
-
"cluster"
|
|
369
|
-
],
|
|
370
|
-
"env": {
|
|
371
|
-
"MYSQL_HOST": "localhost",
|
|
372
|
-
"MYSQL_PORT": "3307",
|
|
373
|
-
"MYSQL_USER": "cluster_admin",
|
|
374
|
-
"MYSQL_PASSWORD": "cluster_password",
|
|
375
|
-
"MYSQL_DATABASE": "mysql"
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
#### Option 3: Ecosystem (42 Tools for InnoDB Cluster Deployments)
|
|
383
|
-
|
|
384
|
-
**Best for:** MySQL Router, ProxySQL, MySQL Shell, and InnoDB Cluster deployments.
|
|
385
|
-
|
|
386
|
-
> **⚠️ Prerequisites:**
|
|
387
|
-
>
|
|
388
|
-
> - **InnoDB Cluster** with MySQL Router requires the cluster to be running for Router REST API authentication (uses `metadata_cache` backend)
|
|
389
|
-
> - Router REST API uses HTTPS with self-signed certificates by default — set `MYSQL_ROUTER_INSECURE=true` to bypass certificate verification
|
|
390
|
-
> - **X Protocol:** InnoDB Cluster includes the MySQL X Plugin by default. Set `MYSQL_XPORT` to the Router's X Protocol port (e.g., `6448`) for `mysqlsh_import_json` and `docstore` tools
|
|
391
|
-
> - See [MySQL Ecosystem Setup Guide](https://github.com/neverinfamous/mysql-mcp/wiki/MySQL-Ecosystem-Setup) for detailed instructions
|
|
392
|
-
|
|
393
|
-
```json
|
|
394
|
-
{
|
|
395
|
-
"mcpServers": {
|
|
396
|
-
"mysql-mcp-ecosystem": {
|
|
397
|
-
"command": "node",
|
|
398
|
-
"args": [
|
|
399
|
-
"/path/to/mysql-mcp/dist/cli.js",
|
|
400
|
-
"--transport",
|
|
401
|
-
"stdio",
|
|
402
|
-
"--tool-filter",
|
|
403
|
-
"ecosystem"
|
|
404
|
-
],
|
|
405
|
-
"env": {
|
|
406
|
-
"MYSQL_HOST": "localhost",
|
|
407
|
-
"MYSQL_PORT": "3307",
|
|
408
|
-
"MYSQL_XPORT": "6448",
|
|
409
|
-
"MYSQL_USER": "cluster_admin",
|
|
410
|
-
"MYSQL_PASSWORD": "cluster_password",
|
|
411
|
-
"MYSQL_DATABASE": "testdb",
|
|
412
|
-
"MYSQL_ROUTER_URL": "https://localhost:8443",
|
|
413
|
-
"MYSQL_ROUTER_USER": "rest_api",
|
|
414
|
-
"MYSQL_ROUTER_PASSWORD": "router_password",
|
|
415
|
-
"MYSQL_ROUTER_INSECURE": "true",
|
|
416
|
-
"PROXYSQL_HOST": "localhost",
|
|
417
|
-
"PROXYSQL_PORT": "6032",
|
|
418
|
-
"PROXYSQL_USER": "radmin",
|
|
419
|
-
"PROXYSQL_PASSWORD": "radmin",
|
|
420
|
-
"MYSQLSH_PATH": "/usr/local/bin/mysqlsh"
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
**Customization Notes:**
|
|
428
|
-
|
|
429
|
-
- Replace `/path/to/mysql-mcp/` with your actual installation path
|
|
430
|
-
- Update credentials with your actual values
|
|
431
|
-
- For Windows: Use forward slashes (e.g., `C:/mysql-mcp/dist/cli.js`) or escape backslashes
|
|
432
|
-
- For Windows MySQL Shell: `"MYSQLSH_PATH": "C:\\Program Files\\MySQL\\MySQL Shell 9.5\\bin\\mysqlsh.exe"`
|
|
433
|
-
- **Router Authentication:** Router REST API authenticates against the InnoDB Cluster metadata. The cluster must be running for authentication to work.
|
|
434
|
-
- **Cluster Resource:** The `mysql://cluster` resource is only available when connected to an InnoDB Cluster node
|
|
435
|
-
|
|
436
|
-
> **📖 See the [Tool Filtering Wiki](https://github.com/neverinfamous/mysql-mcp/wiki/Tool-Filtering)** for advanced examples.
|
|
287
|
+
> **📖 See the [Tool Filtering Wiki](https://github.com/neverinfamous/mysql-mcp/wiki/Tool-Filtering)** for IDE configuration examples and advanced usage.
|
|
437
288
|
|
|
438
289
|
---
|
|
439
290
|
|
|
@@ -448,56 +299,13 @@ For debugging or manual reference, see the source: [`src/constants/ServerInstruc
|
|
|
448
299
|
|
|
449
300
|
## 🤖 AI-Powered Prompts
|
|
450
301
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
| Prompt | Description |
|
|
454
|
-
| ----------------------------- | ------------------------------------------------------ |
|
|
455
|
-
| `mysql_query_builder` | Construct SQL queries with security best practices |
|
|
456
|
-
| `mysql_schema_design` | Design table schemas with indexes and relationships |
|
|
457
|
-
| `mysql_performance_analysis` | Analyze slow queries with optimization recommendations |
|
|
458
|
-
| `mysql_migration` | Generate migration scripts with rollback options |
|
|
459
|
-
| `mysql_database_health_check` | Comprehensive database health assessment |
|
|
460
|
-
| `mysql_backup_strategy` | Enterprise backup planning with RTO/RPO |
|
|
461
|
-
| `mysql_index_tuning` | Index analysis and optimization workflow |
|
|
462
|
-
| `mysql_setup_router` | MySQL Router configuration guide |
|
|
463
|
-
| `mysql_setup_proxysql` | ProxySQL configuration guide |
|
|
464
|
-
| `mysql_setup_replication` | Replication setup guide |
|
|
465
|
-
| `mysql_setup_shell` | MySQL Shell usage guide |
|
|
466
|
-
| `mysql_tool_index` | Complete tool index with categories |
|
|
467
|
-
| `mysql_quick_query` | Quick query execution shortcut |
|
|
468
|
-
| `mysql_quick_schema` | Quick schema exploration |
|
|
469
|
-
| **`mysql_setup_events`** | Event Scheduler setup guide |
|
|
470
|
-
| **`mysql_sys_schema_guide`** | sys schema usage and diagnostics |
|
|
471
|
-
| **`mysql_setup_spatial`** | Spatial/GIS data setup guide |
|
|
472
|
-
| **`mysql_setup_cluster`** | InnoDB Cluster/Group Replication guide |
|
|
473
|
-
| **`mysql_setup_docstore`** | Document Store / X DevAPI guide |
|
|
302
|
+
**19 intelligent prompts** for guided workflows including query building, schema design, performance analysis, migration planning, backup strategy, index tuning, and ecosystem setup (Router, ProxySQL, Replication, Shell, Cluster, Spatial, Events, Document Store).
|
|
474
303
|
|
|
475
304
|
---
|
|
476
305
|
|
|
477
306
|
## 📊 Resources
|
|
478
307
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
| Resource | Description |
|
|
482
|
-
| ----------------------- | ------------------------------------------- |
|
|
483
|
-
| `mysql://schema` | Full database schema |
|
|
484
|
-
| `mysql://tables` | Table listing with metadata |
|
|
485
|
-
| `mysql://variables` | Server configuration variables |
|
|
486
|
-
| `mysql://status` | Server status metrics |
|
|
487
|
-
| `mysql://processlist` | Active connections and queries |
|
|
488
|
-
| `mysql://pool` | Connection pool statistics |
|
|
489
|
-
| `mysql://capabilities` | Server version, features, tool categories |
|
|
490
|
-
| `mysql://health` | Comprehensive health status |
|
|
491
|
-
| `mysql://performance` | Query performance metrics |
|
|
492
|
-
| `mysql://indexes` | Index usage and statistics |
|
|
493
|
-
| `mysql://replication` | Replication status and lag |
|
|
494
|
-
| `mysql://innodb` | InnoDB buffer pool and engine metrics |
|
|
495
|
-
| **`mysql://events`** | Event Scheduler status and scheduled events |
|
|
496
|
-
| **`mysql://sysschema`** | sys schema diagnostics summary |
|
|
497
|
-
| **`mysql://locks`** | InnoDB lock contention detection |
|
|
498
|
-
| **`mysql://cluster`** | Group Replication/InnoDB Cluster status |
|
|
499
|
-
| **`mysql://spatial`** | Spatial columns and indexes |
|
|
500
|
-
| **`mysql://docstore`** | Document Store collections |
|
|
308
|
+
**18 real-time resources** for database observability: schema, tables, variables, status, processlist, connection pool, capabilities, health, performance, indexes, replication, InnoDB metrics, events, sys schema, locks, cluster status, spatial metadata, and document store collections.
|
|
501
309
|
|
|
502
310
|
---
|
|
503
311
|
|
|
@@ -552,20 +360,6 @@ Schema metadata is cached to reduce repeated queries during tool/resource invoca
|
|
|
552
360
|
|
|
553
361
|
---
|
|
554
362
|
|
|
555
|
-
## Contributing
|
|
556
|
-
|
|
557
|
-
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request.
|
|
558
|
-
|
|
559
|
-
## Security
|
|
560
|
-
|
|
561
|
-
For security concerns, please see our [Security Policy](SECURITY.md).
|
|
562
|
-
|
|
563
|
-
> **⚠️ Never commit credentials** - Store secrets in `.env` (gitignored)
|
|
564
|
-
|
|
565
|
-
## License
|
|
566
|
-
|
|
567
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
568
|
-
|
|
569
|
-
## Code of Conduct
|
|
363
|
+
## Contributing & Security
|
|
570
364
|
|
|
571
|
-
|
|
365
|
+
[Contributing Guidelines](CONTRIBUTING.md) • [Security Policy](SECURITY.md) • [MIT License](LICENSE) • [Code of Conduct](CODE_OF_CONDUCT.md)
|
package/Dockerfile
CHANGED
|
@@ -48,7 +48,12 @@ RUN apk upgrade --no-cache
|
|
|
48
48
|
# - CVE-2024-21538: cross-spawn < 7.0.5
|
|
49
49
|
# - CVE-2025-64756: glob < 10.5.0
|
|
50
50
|
# - CVE-2025-5889: brace-expansion <= 2.0.1
|
|
51
|
+
# - CVE-2026-26960: tar < 7.5.8 (patch npm's bundled copy)
|
|
51
52
|
RUN npm install -g npm@latest && \
|
|
53
|
+
npm install -g tar@latest && \
|
|
54
|
+
rm -rf /usr/local/lib/node_modules/npm/node_modules/tar && \
|
|
55
|
+
cp -r /usr/local/lib/node_modules/tar /usr/local/lib/node_modules/npm/node_modules/tar && \
|
|
56
|
+
npm uninstall -g tar && \
|
|
52
57
|
npm cache clean --force
|
|
53
58
|
|
|
54
59
|
# Create non-root user for security
|
package/README.md
CHANGED
|
@@ -52,13 +52,18 @@
|
|
|
52
52
|
#### NPM (Recommended)
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
# Install globally
|
|
56
55
|
npm install -g @neverinfamous/mysql-mcp
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Run the server:
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
```bash
|
|
59
61
|
mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database
|
|
62
|
+
```
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
Or use npx without installing:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
62
67
|
npx @neverinfamous/mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database
|
|
63
68
|
```
|
|
64
69
|
|
|
@@ -118,11 +123,15 @@ mysql-mcp --mysql mysql://root:pass@localhost/db \
|
|
|
118
123
|
|
|
119
124
|
**Start the HTTP server:**
|
|
120
125
|
|
|
126
|
+
Local installation:
|
|
127
|
+
|
|
121
128
|
```bash
|
|
122
|
-
# Local installation
|
|
123
129
|
node dist/cli.js --transport http --port 3000 --server-host 0.0.0.0 --mysql mysql://user:password@localhost:3306/database
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Docker (expose port 3000):
|
|
124
133
|
|
|
125
|
-
|
|
134
|
+
```bash
|
|
126
135
|
docker run -p 3000:3000 writenotenow/mysql-mcp \
|
|
127
136
|
--transport http \
|
|
128
137
|
--port 3000 \
|
|
@@ -205,11 +214,16 @@ If MySQL is installed directly on your computer (via installer, Homebrew, etc.):
|
|
|
205
214
|
|
|
206
215
|
Add both containers to the same Docker network, then use the container name:
|
|
207
216
|
|
|
217
|
+
Create a network and run MySQL:
|
|
218
|
+
|
|
208
219
|
```bash
|
|
209
|
-
# Create network and run MySQL
|
|
210
220
|
docker network create mynet
|
|
211
221
|
docker run -d --name mysql-db --network mynet -e MYSQL_ROOT_PASSWORD=pass mysql:8
|
|
212
|
-
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Run MCP server on the same network:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
213
227
|
docker run -i --rm --network mynet writenotenow/mysql-mcp:latest \
|
|
214
228
|
--transport stdio --mysql mysql://root:pass@mysql-db:3306/mysql
|
|
215
229
|
```
|
|
@@ -574,11 +588,15 @@ Schema metadata is cached to reduce repeated queries during tool/resource invoca
|
|
|
574
588
|
|
|
575
589
|
Use [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to visually test and debug mysql-mcp:
|
|
576
590
|
|
|
591
|
+
Build the server first:
|
|
592
|
+
|
|
577
593
|
```bash
|
|
578
|
-
# Build the server first
|
|
579
594
|
npm run build
|
|
595
|
+
```
|
|
580
596
|
|
|
581
|
-
|
|
597
|
+
Launch Inspector with mysql-mcp:
|
|
598
|
+
|
|
599
|
+
```bash
|
|
582
600
|
npx @modelcontextprotocol/inspector node dist/cli.js \
|
|
583
601
|
--transport stdio \
|
|
584
602
|
--mysql mysql://user:password@localhost:3306/database
|
|
@@ -588,13 +606,17 @@ Open **http://localhost:6274** to browse all 193 tools, 18 resources, and 19 pro
|
|
|
588
606
|
|
|
589
607
|
**CLI mode for scripting:**
|
|
590
608
|
|
|
609
|
+
List all tools:
|
|
610
|
+
|
|
591
611
|
```bash
|
|
592
|
-
# List all tools
|
|
593
612
|
npx @modelcontextprotocol/inspector --cli node dist/cli.js \
|
|
594
613
|
--transport stdio --mysql mysql://... \
|
|
595
614
|
--method tools/list
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
Call a specific tool:
|
|
596
618
|
|
|
597
|
-
|
|
619
|
+
```bash
|
|
598
620
|
npx @modelcontextprotocol/inspector --cli node dist/cli.js \
|
|
599
621
|
--transport stdio --mysql mysql://... \
|
|
600
622
|
--method tools/call --tool-name mysql_list_tables
|
|
@@ -607,10 +629,12 @@ npx @modelcontextprotocol/inspector --cli node dist/cli.js \
|
|
|
607
629
|
The project maintains high test coverage (~86%) using Vitest.
|
|
608
630
|
|
|
609
631
|
```bash
|
|
610
|
-
# Run tests
|
|
611
632
|
npm test
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
Run coverage report:
|
|
612
636
|
|
|
613
|
-
|
|
637
|
+
```bash
|
|
614
638
|
npm run test:coverage
|
|
615
639
|
```
|
|
616
640
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.1
|
package/package.json
CHANGED
|
@@ -25,14 +25,14 @@ The headline feature of v2.3.0. Code Mode provides a sandboxed `mysql.*` API nam
|
|
|
25
25
|
|
|
26
26
|
### Key Capabilities
|
|
27
27
|
|
|
28
|
-
| Feature
|
|
29
|
-
|
|
28
|
+
| Feature | Details |
|
|
29
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
30
30
|
| **22 API Groups** | `mysql.core`, `mysql.json`, `mysql.transactions`, `mysql.spatial`, `mysql.stats`, `mysql.security`, `mysql.cluster`, `mysql.router`, and 14 more |
|
|
31
|
-
| **168+ Methods**
|
|
32
|
-
| **VM Isolation**
|
|
33
|
-
| **Auto-Cleanup**
|
|
34
|
-
| **Help System**
|
|
35
|
-
| **Token Savings** | 70–90% reduction vs. individual tool calls for multi-step operations
|
|
31
|
+
| **168+ Methods** | Full coverage of all mysql-mcp tools |
|
|
32
|
+
| **VM Isolation** | Sandboxed execution with security validation and rate limiting |
|
|
33
|
+
| **Auto-Cleanup** | Automatic transaction rollback on completion — no dangling locks |
|
|
34
|
+
| **Help System** | `mysql.help()` and `mysql.{group}.help()` for introspection |
|
|
35
|
+
| **Token Savings** | 70–90% reduction vs. individual tool calls for multi-step operations |
|
|
36
36
|
|
|
37
37
|
### API Groups
|
|
38
38
|
|
|
@@ -48,12 +48,12 @@ Code Mode is automatically included in all preset shortcuts (`starter`, `essenti
|
|
|
48
48
|
|
|
49
49
|
Tools now accept alternative parameter names for commonly used fields, normalized automatically via Zod schema preprocessing:
|
|
50
50
|
|
|
51
|
-
| Alias
|
|
52
|
-
|
|
53
|
-
| `table` / `tableName` / `name` | table parameter
|
|
54
|
-
| `query` / `sql`
|
|
55
|
-
| `where` / `filter`
|
|
56
|
-
| `column` / `col`
|
|
51
|
+
| Alias | Canonical | Applies To |
|
|
52
|
+
| ------------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `table` / `tableName` / `name` | table parameter | Core, Text, Backup, Partitioning, Performance, Admin |
|
|
54
|
+
| `query` / `sql` | query parameter | `mysql_read_query`, `mysql_write_query`, `mysql_explain`, `mysql_explain_analyze`, `mysql_query_rewrite`, `mysql_optimizer_trace` |
|
|
55
|
+
| `where` / `filter` | WHERE clause | `mysql_export_table` and all Text tools |
|
|
56
|
+
| `column` / `col` | column parameter | Text tools |
|
|
57
57
|
|
|
58
58
|
Schema definitions use a **Dual-Schema pattern**: `SchemaBase` (with aliases visible to MCP clients) for `inputSchema`, and the runtime `Schema` (with preprocessing + transformation) for handler validation.
|
|
59
59
|
|
|
@@ -78,13 +78,13 @@ Schema definitions use a **Dual-Schema pattern**: `SchemaBase` (with aliases vis
|
|
|
78
78
|
|
|
79
79
|
Five tool groups were completely inaccessible in Code Mode due to prefix-stripping misconfigurations. All returned `TypeError: ... is not a function`:
|
|
80
80
|
|
|
81
|
-
| Group
|
|
82
|
-
|
|
83
|
-
| **Security** | 9 tools
|
|
84
|
-
| **Stats**
|
|
85
|
-
| **Spatial**
|
|
86
|
-
| **Router**
|
|
87
|
-
| **Shell**
|
|
81
|
+
| Group | Tools Affected | Root Cause |
|
|
82
|
+
| ------------ | -------------- | ------------------------------ |
|
|
83
|
+
| **Security** | 9 tools | `security` in `keepPrefix` set |
|
|
84
|
+
| **Stats** | 8 tools | `stats` in `keepPrefix` set |
|
|
85
|
+
| **Spatial** | 12 tools | `spatial` in `keepPrefix` set |
|
|
86
|
+
| **Router** | 9 tools | `router` in `keepPrefix` set |
|
|
87
|
+
| **Shell** | 10 tools | Missing `groupPrefixMap` entry |
|
|
88
88
|
|
|
89
89
|
### Code Mode Help Example Fixes
|
|
90
90
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# mysql-mcp v2.3.1 Release Notes
|
|
2
|
+
|
|
3
|
+
**Release Date:** February 18, 2026
|
|
4
|
+
|
|
5
|
+
Security patch addressing CVE-2026-26960 and hardening the Docker deployment pipeline.
|
|
6
|
+
|
|
7
|
+
## Security
|
|
8
|
+
|
|
9
|
+
- **CVE-2026-26960 (tar < 7.5.8)** — Patched npm's bundled `tar` in the Docker runtime image to fix a high-severity path traversal vulnerability that allowed arbitrary file read/write via crafted hardlinks.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- **Docker Scout Gate Hardened** — Security scan now **blocks deployments** on any fixable CVE (any severity) using `--only-fixed --exit-code`. Unfixable zero-day CVEs pass through. Previously the scan was informational only.
|
|
14
|
+
- **CodeQL Workflow PR Trigger** — Removed `paths` filter from `pull_request` trigger so the required `analyze (javascript-typescript)` check always runs on PRs, preventing non-code PRs from being blocked by branch rulesets.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
### Docker
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
docker pull writenotenow/mysql-mcp:latest
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
docker pull writenotenow/mysql-mcp:v2.3.1
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### NPM
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @neverinfamous/mysql-mcp@2.3.1
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Full Changelog:** [v2.3.0...v2.3.1](https://github.com/neverinfamous/mysql-mcp/compare/v2.3.0...v2.3.1)
|