@berthojoris/mcp-mysql-server 1.35.0 → 1.37.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,34 @@ All notable changes to the MySQL MCP Server will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.37.0] - 2026-03-06
9
+
10
+ ### Removed
11
+ - **Documentation Categories**: Removed `import_export` and `data_migration` categories from documentation to reduce bundle size
12
+ - **Import/Export Category** (6 tools): `export_query_to_json`, `export_table_to_json`, `export_table_to_sql`, `import_from_csv`, `import_from_json`, `safe_export_table`
13
+ - **Data Migration Category** (5 tools): `clone_table`, `compare_table_structure`, `copy_table_data`, `move_table_data`, `sync_table_data`
14
+
15
+ ### Changed
16
+ - Updated DOCUMENTATIONS.md to remove Data Export and Data Import sections (117 → 106 tools, 21 → 19 categories)
17
+ - Updated README.md with new tool count (106 tools) and removed categories from Documentation Categories table
18
+ - Updated package description to remove "data import/export" reference
19
+ - Bumped package version to `1.37.0`
20
+
21
+ ## [1.36.0] - 2026-03-05
22
+
23
+ ### Removed
24
+ - **Data Migration Tools**: Removed 5 unused tools from `migrationTools.ts` (`copy_table_data`, `move_table_data`, `clone_table`, `compare_table_structure`, `sync_table_data`)
25
+ - **Import/Export Tools**: Removed 4 unused tools from `dataExportTools.ts` (`export_query_to_csv`, `export_query_to_json`, `export_table_to_sql`, `import_from_csv`)
26
+ - **Backup & Restore Tools**: Removed 5 unused tools from `backupRestoreTools.ts` (`backup_table`, `backup_database`, `restore_from_sql`, `get_create_table_statement`, `get_database_schema`)
27
+ - **Performance Monitoring Tools**: Removed 3 unused tools from `performanceTools.ts` (`get_top_queries_by_time`, `get_top_queries_by_count`, `get_slow_queries`)
28
+ - **Server Management Tools**: Removed 4 unused tools from `processTools.ts` (`show_engine_status`, `get_server_info`, `show_binary_logs`, `show_replication_status`)
29
+
30
+ ### Changed
31
+ - Updated tool registrations in `mcp-server.ts` to remove deleted tools
32
+ - Updated DOCUMENTATIONS.md to reflect tool/category count changes (134 → 117 tools, 23 → 21 categories)
33
+ - Updated README.md with new tool count (117 tools)
34
+ - Bumped package version to `1.36.0`
35
+
8
36
  ## [1.35.0] - 2026-03-04
9
37
 
10
38
  ### Removed
@@ -14,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
42
  ### Changed
15
43
  - Updated category filtering config by removing `DocCategory.AI_ENHANCEMENT` and related mappings.
16
44
  - Updated README.md and DOCUMENTATIONS.md tool/category listings and totals (150 → 134 tools).
45
+ - Fixed DOCUMENTATIONS.md to replace "AI-Enhanced Analysis" category with "Analysis" category to match actual code implementation.
17
46
  - Bumped package version to `1.35.0`.
18
47
 
19
48
  ## [1.34.0] - 2026-03-04
package/DOCUMENTATIONS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # MySQL MCP Server - Documentation
2
2
 
3
- **Last Updated:** 2026-03-04 12:00:00
4
- **Version:** 1.35.0
5
- **Total Tools:** 134
3
+ **Last Updated:** 2026-03-06 00:00:00
4
+ **Version:** 1.37.0
5
+ **Total Tools:** 106
6
6
 
7
7
  Comprehensive documentation for the MySQL MCP Server. For quick start, see [README.md](README.md).
8
8
 
@@ -99,8 +99,8 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
99
99
  - `get_all_tables_relationships` - Get all FK relationships
100
100
  - `list_all_tools` - List available MCP tools
101
101
 
102
- ### 2. AI-Enhanced Analysis (4 tools)
103
- - `get_database_summary` - AI-optimized database overview
102
+ ### 2. Analysis (4 tools)
103
+ - `get_database_summary` - Database overview with statistics
104
104
  - `get_schema_erd` - Generate Mermaid.js ER diagram
105
105
  - `get_schema_rag_context` - Compact schema for LLM context
106
106
  - `get_column_statistics` - Column data profiling
@@ -194,11 +194,8 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
194
194
  - `get_transaction_status` - Check transaction state
195
195
  - `execute_in_transaction` - Execute within transaction
196
196
 
197
- ### 14. Performance Monitoring (10 tools)
197
+ ### 14. Performance Monitoring (7 tools)
198
198
  - `get_performance_metrics` - Get overall performance metrics
199
- - `get_top_queries_by_time` - Get queries by execution time
200
- - `get_top_queries_by_count` - Get queries by execution count
201
- - `get_slow_queries` - Get slow query log
202
199
  - `get_table_io_stats` - Get table I/O statistics
203
200
  - `get_index_usage_stats` - Get index usage statistics
204
201
  - `get_unused_indexes` - Find unused indexes
@@ -211,16 +208,12 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
211
208
  - `get_optimization_hints` - Get optimizer hints
212
209
  - `repair_query` - Repair broken SQL queries
213
210
 
214
- ### 16. Server Management (9 tools)
211
+ ### 16. Server Management (5 tools)
215
212
  - `show_process_list` - Show running processes
216
213
  - `kill_process` - Terminate processes
217
214
  - `show_status` - Server status variables
218
215
  - `show_variables` - Server configuration
219
216
  - `explain_query` - Query execution plan
220
- - `show_engine_status` - Storage engine status
221
- - `get_server_info` - Comprehensive server info
222
- - `show_binary_logs` - Show binary log files
223
- - `show_replication_status` - Show replication status
224
217
 
225
218
  ### 17. Cache Management (4 tools)
226
219
  - `get_cache_stats` - Query cache statistics
@@ -228,39 +221,13 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
228
221
  - `configure_cache` - Configure cache settings
229
222
  - `clear_cache` - Clear cached results
230
223
 
231
- ### 18. Data Export (6 tools)
232
- - `export_table_to_csv` - Export table to CSV
233
- - `export_query_to_csv` - Export query to CSV
234
- - `export_table_to_json` - Export table to JSON
235
- - `export_query_to_json` - Export query to JSON
236
- - `safe_export_table` - Export with PII masking
237
- - `export_table_to_sql` - Export table to SQL dump
238
-
239
- ### 19. Backup & Restore (5 tools)
240
- - `backup_table` - Backup single table
241
- - `backup_database` - Backup entire database
242
- - `restore_from_sql` - Restore from SQL dump
243
- - `get_create_table_statement` - Get CREATE TABLE
244
- - `get_database_schema` - Get complete schema
245
-
246
- ### 20. Utilities (4 tools)
224
+ ### 18. Utilities (4 tools)
247
225
  - `test_connection` - Test connectivity
248
226
  - `describe_connection` - Connection info
249
227
  - `read_changelog` - Read changelog
250
228
  - `invalidate_table_cache` - Clear table cache
251
229
 
252
- ### 21. Data Import (2 tools)
253
- - `import_from_csv` - Import data from CSV file
254
- - `import_from_json` - Import data from JSON file
255
-
256
- ### 22. Data Migration (5 tools)
257
- - `copy_table_data` - Copy data from one table to another
258
- - `move_table_data` - Move data between tables
259
- - `clone_table` - Clone a table with its structure and data
260
- - `compare_table_structure` - Compare structure between two tables
261
- - `sync_table_data` - Synchronize data between tables
262
-
263
- ### 23. Schema Migrations (9 tools)
230
+ ### 19. Schema Migrations (9 tools)
264
231
  - `init_migrations_table` - Initialize migrations tracking table
265
232
  - `create_migration` - Create a new migration
266
233
  - `apply_migrations` - Apply pending migrations
@@ -346,9 +313,9 @@ await mcp.call("get_optimization_hints", {
346
313
 
347
314
  ## Advanced Features
348
315
 
349
- ### AI-Enhanced Analysis
316
+ ### Analysis
350
317
 
351
- The server includes AI-optimized tools for intelligent database analysis:
318
+ The server includes analysis tools for database insights:
352
319
 
353
320
  - **Database Summary**: Provides readable overviews with statistics
354
321
  - **ER Diagram Generation**: Automatic Mermaid.js diagrams
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **A production-ready Model Context Protocol (MCP) server for MySQL database integration with AI agents**
6
6
 
7
- **Last Updated:** 2026-03-04 12:00:00
7
+ **Last Updated:** 2026-03-06 00:00:00
8
8
 
9
9
  [![npm version](https://img.shields.io/npm/v/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
10
10
  [![npm downloads](https://img.shields.io/npm/dm/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
@@ -264,8 +264,6 @@ Use documentation categories to fine-tune which tools are exposed (Layer 2):
264
264
  | `cache_management` | Manage query cache and optimization | `clear_cache, configure_cache_settings, get_cache_config, get_cache_stats, invalidate_cache_for_table` |
265
265
  | `query_optimization` | Analyze and optimize SQL queries | `analyze_query, get_optimization_hints` |
266
266
  | `backup_restore` | Create backups and restore databases | `backup_database, backup_table, get_create_table_statement, get_database_schema, restore_from_sql` |
267
- | `import_export` | Import and export data in various formats | `export_query_to_json, export_table_to_json, export_table_to_sql, import_from_csv, import_from_json, safe_export_table` |
268
- | `data_migration` | Migrate data between databases or systems | `clone_table, compare_table_structure, copy_table_data, move_table_data, sync_table_data` |
269
267
  | `schema_migrations` | Version control for database schema changes | `apply_migrations, create_migration, generate_migration_from_diff, get_migration_status, get_schema_version, init_migrations_table, reset_failed_migration, rollback_migration, validate_migrations` |
270
268
  | `analysis` | Data analysis and reporting tools | `get_column_statistics, get_database_summary, get_schema_erd, get_schema_rag_context` |
271
269
 
@@ -273,7 +271,7 @@ Use documentation categories to fine-tune which tools are exposed (Layer 2):
273
271
  <summary>Copy/paste list (comma-separated, no spaces)</summary>
274
272
 
275
273
  ```text
276
- database_discovery,crud_operations,bulk_operations,custom_queries,schema_management,utilities,transaction_management,stored_procedures,views_management,triggers_management,functions_management,index_management,constraint_management,table_maintenance,server_management,performance_monitoring,cache_management,query_optimization,backup_restore,import_export,data_migration,schema_migrations,analysis
274
+ database_discovery,crud_operations,bulk_operations,custom_queries,schema_management,utilities,transaction_management,stored_procedures,views_management,triggers_management,functions_management,index_management,constraint_management,table_maintenance,server_management,performance_monitoring,cache_management,query_optimization,backup_restore,schema_migrations,analysis
277
275
  ```
278
276
 
279
277
  </details>
@@ -284,7 +282,7 @@ Full category → tool mapping (and examples) lives in **[DOCUMENTATIONS.md →
284
282
 
285
283
  ## Available Tools
286
284
 
287
- The server exposes **134 tools** organized into categories (CRUD, schema, backups, migrations, and perf/monitoring).
285
+ The server exposes **106 tools** organized into categories (CRUD, schema, migrations, and perf/monitoring).
288
286
 
289
287
  - Complete list of tools: **[DOCUMENTATIONS.md → Complete Tools Reference](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
290
288
 
@@ -14,7 +14,7 @@ export declare enum ToolCategory {
14
14
  PROCEDURE = "procedure"
15
15
  }
16
16
  /**
17
- * Documentation categories from README (21 categories)
17
+ * Documentation categories from README (19 categories)
18
18
  * More intuitive and matches user mental model
19
19
  */
20
20
  export declare enum DocCategory {
@@ -37,8 +37,6 @@ export declare enum DocCategory {
37
37
  CACHE_MANAGEMENT = "cache_management",
38
38
  QUERY_OPTIMIZATION = "query_optimization",
39
39
  BACKUP_RESTORE = "backup_restore",
40
- IMPORT_EXPORT = "import_export",
41
- DATA_MIGRATION = "data_migration",
42
40
  SCHEMA_MIGRATIONS = "schema_migrations",
43
41
  ANALYSIS = "analysis"
44
42
  }
@@ -24,7 +24,7 @@ var ToolCategory;
24
24
  ToolCategory["PROCEDURE"] = "procedure";
25
25
  })(ToolCategory || (exports.ToolCategory = ToolCategory = {}));
26
26
  /**
27
- * Documentation categories from README (21 categories)
27
+ * Documentation categories from README (19 categories)
28
28
  * More intuitive and matches user mental model
29
29
  */
30
30
  var DocCategory;
@@ -48,8 +48,6 @@ var DocCategory;
48
48
  DocCategory["CACHE_MANAGEMENT"] = "cache_management";
49
49
  DocCategory["QUERY_OPTIMIZATION"] = "query_optimization";
50
50
  DocCategory["BACKUP_RESTORE"] = "backup_restore";
51
- DocCategory["IMPORT_EXPORT"] = "import_export";
52
- DocCategory["DATA_MIGRATION"] = "data_migration";
53
51
  DocCategory["SCHEMA_MIGRATIONS"] = "schema_migrations";
54
52
  DocCategory["ANALYSIS"] = "analysis";
55
53
  })(DocCategory || (exports.DocCategory = DocCategory = {}));
@@ -331,19 +329,6 @@ exports.toolDocCategoryMap = {
331
329
  restoreFromSql: DocCategory.BACKUP_RESTORE,
332
330
  getCreateTableStatement: DocCategory.BACKUP_RESTORE,
333
331
  getDatabaseSchema: DocCategory.BACKUP_RESTORE,
334
- // Import/Export
335
- exportTableToJSON: DocCategory.IMPORT_EXPORT,
336
- exportQueryToJSON: DocCategory.IMPORT_EXPORT,
337
- exportTableToSql: DocCategory.IMPORT_EXPORT,
338
- safe_export_table: DocCategory.IMPORT_EXPORT,
339
- importFromCSV: DocCategory.IMPORT_EXPORT,
340
- importFromJSON: DocCategory.IMPORT_EXPORT,
341
- // Data Migration
342
- copyTableData: DocCategory.DATA_MIGRATION,
343
- moveTableData: DocCategory.DATA_MIGRATION,
344
- cloneTable: DocCategory.DATA_MIGRATION,
345
- compareTableStructure: DocCategory.DATA_MIGRATION,
346
- syncTableData: DocCategory.DATA_MIGRATION,
347
332
  // Schema Migrations
348
333
  initMigrationsTable: DocCategory.SCHEMA_MIGRATIONS,
349
334
  createMigration: DocCategory.SCHEMA_MIGRATIONS,
@@ -390,18 +375,14 @@ const legacyToDocCategoryMap = {
390
375
  create: [
391
376
  DocCategory.CRUD_OPERATIONS,
392
377
  DocCategory.BULK_OPERATIONS,
393
- DocCategory.IMPORT_EXPORT,
394
- DocCategory.DATA_MIGRATION,
395
378
  ],
396
379
  update: [
397
380
  DocCategory.CRUD_OPERATIONS,
398
381
  DocCategory.BULK_OPERATIONS,
399
- DocCategory.DATA_MIGRATION,
400
382
  ],
401
383
  delete: [
402
384
  DocCategory.CRUD_OPERATIONS,
403
385
  DocCategory.BULK_OPERATIONS,
404
- DocCategory.DATA_MIGRATION,
405
386
  ],
406
387
  execute: [DocCategory.CUSTOM_QUERIES, DocCategory.SERVER_MANAGEMENT],
407
388
  ddl: [
@@ -412,7 +393,6 @@ const legacyToDocCategoryMap = {
412
393
  DocCategory.CONSTRAINT_MANAGEMENT,
413
394
  DocCategory.TABLE_MAINTENANCE,
414
395
  DocCategory.BACKUP_RESTORE,
415
- DocCategory.DATA_MIGRATION,
416
396
  DocCategory.SCHEMA_MIGRATIONS,
417
397
  ],
418
398
  utility: [
@@ -422,7 +402,6 @@ const legacyToDocCategoryMap = {
422
402
  DocCategory.CACHE_MANAGEMENT,
423
403
  DocCategory.QUERY_OPTIMIZATION,
424
404
  DocCategory.BACKUP_RESTORE,
425
- DocCategory.IMPORT_EXPORT,
426
405
  ],
427
406
  transaction: [DocCategory.TRANSACTION_MANAGEMENT],
428
407
  procedure: [DocCategory.STORED_PROCEDURES, DocCategory.FUNCTIONS_MANAGEMENT],
package/dist/index.d.ts CHANGED
@@ -321,183 +321,6 @@ export declare class MySQLMCP {
321
321
  data?: any;
322
322
  error?: string;
323
323
  }>;
324
- exportQueryToCSV(params: {
325
- query: string;
326
- params?: any[];
327
- include_headers?: boolean;
328
- }): Promise<{
329
- status: string;
330
- data?: any;
331
- error?: string;
332
- }>;
333
- exportTableToJSON(params: {
334
- table_name: string;
335
- filters?: any[];
336
- pagination?: {
337
- page: number;
338
- limit: number;
339
- };
340
- sorting?: {
341
- field: string;
342
- direction: "asc" | "desc";
343
- };
344
- pretty?: boolean;
345
- database?: string;
346
- }): Promise<{
347
- status: string;
348
- data?: any;
349
- error?: string;
350
- }>;
351
- exportQueryToJSON(params: {
352
- query: string;
353
- params?: any[];
354
- pretty?: boolean;
355
- }): Promise<{
356
- status: string;
357
- data?: any;
358
- error?: string;
359
- }>;
360
- exportTableToSql(params: {
361
- table_name: string;
362
- filters?: any[];
363
- include_create_table?: boolean;
364
- batch_size?: number;
365
- database?: string;
366
- }): Promise<{
367
- status: string;
368
- data?: any;
369
- error?: string;
370
- }>;
371
- importFromCSV(params: {
372
- table_name: string;
373
- csv_data: string;
374
- has_headers?: boolean;
375
- column_mapping?: Record<string, string>;
376
- skip_errors?: boolean;
377
- batch_size?: number;
378
- database?: string;
379
- }): Promise<{
380
- status: string;
381
- data?: any;
382
- error?: string;
383
- }>;
384
- importFromJSON(params: {
385
- table_name: string;
386
- json_data: string;
387
- column_mapping?: Record<string, string>;
388
- skip_errors?: boolean;
389
- batch_size?: number;
390
- database?: string;
391
- }): Promise<{
392
- status: string;
393
- data?: any;
394
- error?: string;
395
- }>;
396
- backupTable(params: {
397
- table_name: string;
398
- include_data?: boolean;
399
- include_drop?: boolean;
400
- database?: string;
401
- }): Promise<{
402
- status: string;
403
- data?: any;
404
- error?: string;
405
- }>;
406
- backupDatabase(params: {
407
- include_data?: boolean;
408
- include_drop?: boolean;
409
- tables?: string[];
410
- database?: string;
411
- }): Promise<{
412
- status: string;
413
- data?: any;
414
- error?: string;
415
- }>;
416
- restoreFromSql(params: {
417
- sql_dump: string;
418
- stop_on_error?: boolean;
419
- database?: string;
420
- }): Promise<{
421
- status: string;
422
- data?: any;
423
- error?: string;
424
- }>;
425
- getCreateTableStatement(params: {
426
- table_name: string;
427
- database?: string;
428
- }): Promise<{
429
- status: string;
430
- data?: any;
431
- error?: string;
432
- }>;
433
- getDatabaseSchema(params: {
434
- database?: string;
435
- include_views?: boolean;
436
- include_procedures?: boolean;
437
- include_functions?: boolean;
438
- include_triggers?: boolean;
439
- }): Promise<{
440
- status: string;
441
- data?: any;
442
- error?: string;
443
- }>;
444
- copyTableData(params: {
445
- source_table: string;
446
- target_table: string;
447
- column_mapping?: Record<string, string>;
448
- filters?: any[];
449
- batch_size?: number;
450
- database?: string;
451
- }): Promise<{
452
- status: string;
453
- data?: any;
454
- error?: string;
455
- }>;
456
- moveTableData(params: {
457
- source_table: string;
458
- target_table: string;
459
- column_mapping?: Record<string, string>;
460
- filters?: any[];
461
- batch_size?: number;
462
- database?: string;
463
- }): Promise<{
464
- status: string;
465
- data?: any;
466
- error?: string;
467
- }>;
468
- cloneTable(params: {
469
- source_table: string;
470
- new_table_name: string;
471
- include_data?: boolean;
472
- include_indexes?: boolean;
473
- database?: string;
474
- }): Promise<{
475
- status: string;
476
- data?: any;
477
- error?: string;
478
- }>;
479
- compareTableStructure(params: {
480
- table1: string;
481
- table2: string;
482
- database?: string;
483
- }): Promise<{
484
- status: string;
485
- data?: any;
486
- error?: string;
487
- }>;
488
- syncTableData(params: {
489
- source_table: string;
490
- target_table: string;
491
- key_column: string;
492
- columns_to_sync?: string[];
493
- sync_mode?: "insert_only" | "update_only" | "upsert";
494
- batch_size?: number;
495
- database?: string;
496
- }): Promise<{
497
- status: string;
498
- data?: any;
499
- error?: string;
500
- }>;
501
324
  /**
502
325
  * Initialize the migrations tracking table
503
326
  */
@@ -1093,57 +916,11 @@ export declare class MySQLMCP {
1093
916
  data?: any;
1094
917
  error?: string;
1095
918
  }>;
1096
- showEngineStatus(params?: {
1097
- engine?: string;
1098
- }): Promise<{
1099
- status: string;
1100
- data?: any;
1101
- error?: string;
1102
- }>;
1103
- getServerInfo(): Promise<{
1104
- status: string;
1105
- data?: any;
1106
- error?: string;
1107
- }>;
1108
- showBinaryLogs(): Promise<{
1109
- status: string;
1110
- data?: any[];
1111
- error?: string;
1112
- }>;
1113
- showReplicationStatus(params?: {
1114
- type?: "MASTER" | "REPLICA" | "SLAVE";
1115
- }): Promise<{
1116
- status: string;
1117
- data?: any;
1118
- error?: string;
1119
- }>;
1120
919
  getPerformanceMetrics(): Promise<{
1121
920
  status: string;
1122
921
  data?: any;
1123
922
  error?: string;
1124
923
  }>;
1125
- getTopQueriesByTime(params?: {
1126
- limit?: number;
1127
- }): Promise<{
1128
- status: string;
1129
- data?: any[];
1130
- error?: string;
1131
- }>;
1132
- getTopQueriesByCount(params?: {
1133
- limit?: number;
1134
- }): Promise<{
1135
- status: string;
1136
- data?: any[];
1137
- error?: string;
1138
- }>;
1139
- getSlowQueries(params?: {
1140
- limit?: number;
1141
- threshold_seconds?: number;
1142
- }): Promise<{
1143
- status: string;
1144
- data?: any[];
1145
- error?: string;
1146
- }>;
1147
924
  getTableIOStats(params?: {
1148
925
  limit?: number;
1149
926
  table_schema?: string;