@berthojoris/mcp-mysql-server 1.35.0 → 1.36.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 +16 -0
- package/DOCUMENTATIONS.md +13 -38
- package/README.md +2 -2
- package/dist/index.d.ts +0 -180
- package/dist/index.js +0 -135
- package/dist/mcp-server.js +0 -65
- package/dist/tools/backupRestoreTools.d.ts +0 -68
- package/dist/tools/backupRestoreTools.js +0 -516
- package/dist/tools/dataExportTools.d.ts +0 -38
- package/dist/tools/dataExportTools.js +0 -248
- package/dist/tools/migrationTools.d.ts +0 -73
- package/dist/tools/migrationTools.js +0 -508
- package/dist/tools/performanceTools.d.ts +0 -25
- package/dist/tools/performanceTools.js +0 -129
- package/dist/tools/processTools.d.ts +0 -36
- package/dist/tools/processTools.js +0 -122
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ 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.36.0] - 2026-03-05
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
- **Data Migration Tools**: Removed 5 unused tools from `migrationTools.ts` (`copy_table_data`, `move_table_data`, `clone_table`, `compare_table_structure`, `sync_table_data`)
|
|
12
|
+
- **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`)
|
|
13
|
+
- **Backup & Restore Tools**: Removed 5 unused tools from `backupRestoreTools.ts` (`backup_table`, `backup_database`, `restore_from_sql`, `get_create_table_statement`, `get_database_schema`)
|
|
14
|
+
- **Performance Monitoring Tools**: Removed 3 unused tools from `performanceTools.ts` (`get_top_queries_by_time`, `get_top_queries_by_count`, `get_slow_queries`)
|
|
15
|
+
- **Server Management Tools**: Removed 4 unused tools from `processTools.ts` (`show_engine_status`, `get_server_info`, `show_binary_logs`, `show_replication_status`)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Updated tool registrations in `mcp-server.ts` to remove deleted tools
|
|
19
|
+
- Updated DOCUMENTATIONS.md to reflect tool/category count changes (134 → 117 tools, 23 → 21 categories)
|
|
20
|
+
- Updated README.md with new tool count (117 tools)
|
|
21
|
+
- Bumped package version to `1.36.0`
|
|
22
|
+
|
|
8
23
|
## [1.35.0] - 2026-03-04
|
|
9
24
|
|
|
10
25
|
### Removed
|
|
@@ -14,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
29
|
### Changed
|
|
15
30
|
- Updated category filtering config by removing `DocCategory.AI_ENHANCEMENT` and related mappings.
|
|
16
31
|
- Updated README.md and DOCUMENTATIONS.md tool/category listings and totals (150 → 134 tools).
|
|
32
|
+
- Fixed DOCUMENTATIONS.md to replace "AI-Enhanced Analysis" category with "Analysis" category to match actual code implementation.
|
|
17
33
|
- Bumped package version to `1.35.0`.
|
|
18
34
|
|
|
19
35
|
## [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-
|
|
4
|
-
**Version:** 1.
|
|
5
|
-
**Total Tools:**
|
|
3
|
+
**Last Updated:** 2026-03-05 00:00:00
|
|
4
|
+
**Version:** 1.36.0
|
|
5
|
+
**Total Tools:** 117
|
|
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.
|
|
103
|
-
- `get_database_summary` -
|
|
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 (
|
|
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 (
|
|
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,21 @@ 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 (
|
|
224
|
+
### 18. Data Export (4 tools)
|
|
232
225
|
- `export_table_to_csv` - Export table to CSV
|
|
233
|
-
- `export_query_to_csv` - Export query to CSV
|
|
234
226
|
- `export_table_to_json` - Export table to JSON
|
|
235
|
-
- `export_query_to_json` - Export query to JSON
|
|
236
227
|
- `safe_export_table` - Export with PII masking
|
|
237
|
-
- `export_table_to_sql` - Export table to SQL dump
|
|
238
228
|
|
|
239
|
-
### 19.
|
|
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)
|
|
229
|
+
### 19. Utilities (4 tools)
|
|
247
230
|
- `test_connection` - Test connectivity
|
|
248
231
|
- `describe_connection` - Connection info
|
|
249
232
|
- `read_changelog` - Read changelog
|
|
250
233
|
- `invalidate_table_cache` - Clear table cache
|
|
251
234
|
|
|
252
|
-
###
|
|
253
|
-
- `import_from_csv` - Import data from CSV file
|
|
235
|
+
### 20. Data Import (1 tool)
|
|
254
236
|
- `import_from_json` - Import data from JSON file
|
|
255
237
|
|
|
256
|
-
###
|
|
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)
|
|
238
|
+
### 21. Schema Migrations (9 tools)
|
|
264
239
|
- `init_migrations_table` - Initialize migrations tracking table
|
|
265
240
|
- `create_migration` - Create a new migration
|
|
266
241
|
- `apply_migrations` - Apply pending migrations
|
|
@@ -346,9 +321,9 @@ await mcp.call("get_optimization_hints", {
|
|
|
346
321
|
|
|
347
322
|
## Advanced Features
|
|
348
323
|
|
|
349
|
-
###
|
|
324
|
+
### Analysis
|
|
350
325
|
|
|
351
|
-
The server includes
|
|
326
|
+
The server includes analysis tools for database insights:
|
|
352
327
|
|
|
353
328
|
- **Database Summary**: Provides readable overviews with statistics
|
|
354
329
|
- **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-
|
|
7
|
+
**Last Updated:** 2026-03-05 00:00:00
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
|
|
10
10
|
[](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
|
|
@@ -284,7 +284,7 @@ Full category → tool mapping (and examples) lives in **[DOCUMENTATIONS.md →
|
|
|
284
284
|
|
|
285
285
|
## Available Tools
|
|
286
286
|
|
|
287
|
-
The server exposes **
|
|
287
|
+
The server exposes **117 tools** organized into categories (CRUD, schema, migrations, and perf/monitoring).
|
|
288
288
|
|
|
289
289
|
- Complete list of tools: **[DOCUMENTATIONS.md → Complete Tools Reference](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
|
|
290
290
|
|
package/dist/index.d.ts
CHANGED
|
@@ -321,15 +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
324
|
exportTableToJSON(params: {
|
|
334
325
|
table_name: string;
|
|
335
326
|
filters?: any[];
|
|
@@ -348,26 +339,6 @@ export declare class MySQLMCP {
|
|
|
348
339
|
data?: any;
|
|
349
340
|
error?: string;
|
|
350
341
|
}>;
|
|
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
342
|
importFromCSV(params: {
|
|
372
343
|
table_name: string;
|
|
373
344
|
csv_data: string;
|
|
@@ -393,111 +364,6 @@ export declare class MySQLMCP {
|
|
|
393
364
|
data?: any;
|
|
394
365
|
error?: string;
|
|
395
366
|
}>;
|
|
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
367
|
/**
|
|
502
368
|
* Initialize the migrations tracking table
|
|
503
369
|
*/
|
|
@@ -1093,57 +959,11 @@ export declare class MySQLMCP {
|
|
|
1093
959
|
data?: any;
|
|
1094
960
|
error?: string;
|
|
1095
961
|
}>;
|
|
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
962
|
getPerformanceMetrics(): Promise<{
|
|
1121
963
|
status: string;
|
|
1122
964
|
data?: any;
|
|
1123
965
|
error?: string;
|
|
1124
966
|
}>;
|
|
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
967
|
getTableIOStats(params?: {
|
|
1148
968
|
limit?: number;
|
|
1149
969
|
table_schema?: string;
|
package/dist/index.js
CHANGED
|
@@ -346,13 +346,6 @@ class MySQLMCP {
|
|
|
346
346
|
}
|
|
347
347
|
return await this.dataExportTools.exportTableToCSV(params);
|
|
348
348
|
}
|
|
349
|
-
async exportQueryToCSV(params) {
|
|
350
|
-
const check = this.checkToolEnabled("exportQueryToCSV");
|
|
351
|
-
if (!check.enabled) {
|
|
352
|
-
return { status: "error", error: check.error };
|
|
353
|
-
}
|
|
354
|
-
return await this.dataExportTools.exportQueryToCSV(params);
|
|
355
|
-
}
|
|
356
349
|
// Extended Data Export Tools (JSON, SQL)
|
|
357
350
|
async exportTableToJSON(params) {
|
|
358
351
|
const check = this.checkToolEnabled("exportTableToJSON");
|
|
@@ -361,20 +354,6 @@ class MySQLMCP {
|
|
|
361
354
|
}
|
|
362
355
|
return await this.dataExportTools.exportTableToJSON(params);
|
|
363
356
|
}
|
|
364
|
-
async exportQueryToJSON(params) {
|
|
365
|
-
const check = this.checkToolEnabled("exportQueryToJSON");
|
|
366
|
-
if (!check.enabled) {
|
|
367
|
-
return { status: "error", error: check.error };
|
|
368
|
-
}
|
|
369
|
-
return await this.dataExportTools.exportQueryToJSON(params);
|
|
370
|
-
}
|
|
371
|
-
async exportTableToSql(params) {
|
|
372
|
-
const check = this.checkToolEnabled("exportTableToSql");
|
|
373
|
-
if (!check.enabled) {
|
|
374
|
-
return { status: "error", error: check.error };
|
|
375
|
-
}
|
|
376
|
-
return await this.dataExportTools.exportTableToSql(params);
|
|
377
|
-
}
|
|
378
357
|
// Data Import Tools
|
|
379
358
|
async importFromCSV(params) {
|
|
380
359
|
const check = this.checkToolEnabled("importFromCSV");
|
|
@@ -390,78 +369,6 @@ class MySQLMCP {
|
|
|
390
369
|
}
|
|
391
370
|
return await this.dataExportTools.importFromJSON(params);
|
|
392
371
|
}
|
|
393
|
-
// Backup and Restore Tools
|
|
394
|
-
async backupTable(params) {
|
|
395
|
-
const check = this.checkToolEnabled("backupTable");
|
|
396
|
-
if (!check.enabled) {
|
|
397
|
-
return { status: "error", error: check.error };
|
|
398
|
-
}
|
|
399
|
-
return await this.backupRestoreTools.backupTable(params);
|
|
400
|
-
}
|
|
401
|
-
async backupDatabase(params) {
|
|
402
|
-
const check = this.checkToolEnabled("backupDatabase");
|
|
403
|
-
if (!check.enabled) {
|
|
404
|
-
return { status: "error", error: check.error };
|
|
405
|
-
}
|
|
406
|
-
return await this.backupRestoreTools.backupDatabase(params);
|
|
407
|
-
}
|
|
408
|
-
async restoreFromSql(params) {
|
|
409
|
-
const check = this.checkToolEnabled("restoreFromSql");
|
|
410
|
-
if (!check.enabled) {
|
|
411
|
-
return { status: "error", error: check.error };
|
|
412
|
-
}
|
|
413
|
-
return await this.backupRestoreTools.restoreFromSql(params);
|
|
414
|
-
}
|
|
415
|
-
async getCreateTableStatement(params) {
|
|
416
|
-
const check = this.checkToolEnabled("getCreateTableStatement");
|
|
417
|
-
if (!check.enabled) {
|
|
418
|
-
return { status: "error", error: check.error };
|
|
419
|
-
}
|
|
420
|
-
return await this.backupRestoreTools.getCreateTableStatement(params);
|
|
421
|
-
}
|
|
422
|
-
async getDatabaseSchema(params) {
|
|
423
|
-
const check = this.checkToolEnabled("getDatabaseSchema");
|
|
424
|
-
if (!check.enabled) {
|
|
425
|
-
return { status: "error", error: check.error };
|
|
426
|
-
}
|
|
427
|
-
return await this.backupRestoreTools.getDatabaseSchema(params);
|
|
428
|
-
}
|
|
429
|
-
// Data Migration Tools
|
|
430
|
-
async copyTableData(params) {
|
|
431
|
-
const check = this.checkToolEnabled("copyTableData");
|
|
432
|
-
if (!check.enabled) {
|
|
433
|
-
return { status: "error", error: check.error };
|
|
434
|
-
}
|
|
435
|
-
return await this.migrationTools.copyTableData(params);
|
|
436
|
-
}
|
|
437
|
-
async moveTableData(params) {
|
|
438
|
-
const check = this.checkToolEnabled("moveTableData");
|
|
439
|
-
if (!check.enabled) {
|
|
440
|
-
return { status: "error", error: check.error };
|
|
441
|
-
}
|
|
442
|
-
return await this.migrationTools.moveTableData(params);
|
|
443
|
-
}
|
|
444
|
-
async cloneTable(params) {
|
|
445
|
-
const check = this.checkToolEnabled("cloneTable");
|
|
446
|
-
if (!check.enabled) {
|
|
447
|
-
return { status: "error", error: check.error };
|
|
448
|
-
}
|
|
449
|
-
return await this.migrationTools.cloneTable(params);
|
|
450
|
-
}
|
|
451
|
-
async compareTableStructure(params) {
|
|
452
|
-
const check = this.checkToolEnabled("compareTableStructure");
|
|
453
|
-
if (!check.enabled) {
|
|
454
|
-
return { status: "error", error: check.error };
|
|
455
|
-
}
|
|
456
|
-
return await this.migrationTools.compareTableStructure(params);
|
|
457
|
-
}
|
|
458
|
-
async syncTableData(params) {
|
|
459
|
-
const check = this.checkToolEnabled("syncTableData");
|
|
460
|
-
if (!check.enabled) {
|
|
461
|
-
return { status: "error", error: check.error };
|
|
462
|
-
}
|
|
463
|
-
return await this.migrationTools.syncTableData(params);
|
|
464
|
-
}
|
|
465
372
|
// ==========================================
|
|
466
373
|
// Schema Versioning and Migrations Tools
|
|
467
374
|
// ==========================================
|
|
@@ -998,30 +905,6 @@ class MySQLMCP {
|
|
|
998
905
|
return { status: "error", error: check.error };
|
|
999
906
|
return await this.processTools.explainQuery(params);
|
|
1000
907
|
}
|
|
1001
|
-
async showEngineStatus(params) {
|
|
1002
|
-
const check = this.checkToolEnabled("showEngineStatus");
|
|
1003
|
-
if (!check.enabled)
|
|
1004
|
-
return { status: "error", error: check.error };
|
|
1005
|
-
return await this.processTools.showEngineStatus(params);
|
|
1006
|
-
}
|
|
1007
|
-
async getServerInfo() {
|
|
1008
|
-
const check = this.checkToolEnabled("getServerInfo");
|
|
1009
|
-
if (!check.enabled)
|
|
1010
|
-
return { status: "error", error: check.error };
|
|
1011
|
-
return await this.processTools.getServerInfo();
|
|
1012
|
-
}
|
|
1013
|
-
async showBinaryLogs() {
|
|
1014
|
-
const check = this.checkToolEnabled("showBinaryLogs");
|
|
1015
|
-
if (!check.enabled)
|
|
1016
|
-
return { status: "error", error: check.error };
|
|
1017
|
-
return await this.processTools.showBinaryLogs();
|
|
1018
|
-
}
|
|
1019
|
-
async showReplicationStatus(params) {
|
|
1020
|
-
const check = this.checkToolEnabled("showReplicationStatus");
|
|
1021
|
-
if (!check.enabled)
|
|
1022
|
-
return { status: "error", error: check.error };
|
|
1023
|
-
return await this.processTools.showReplicationStatus(params);
|
|
1024
|
-
}
|
|
1025
908
|
// ==========================================
|
|
1026
909
|
// Performance Monitoring Tools
|
|
1027
910
|
// ==========================================
|
|
@@ -1031,24 +914,6 @@ class MySQLMCP {
|
|
|
1031
914
|
return { status: "error", error: check.error };
|
|
1032
915
|
return await this.performanceTools.getPerformanceMetrics();
|
|
1033
916
|
}
|
|
1034
|
-
async getTopQueriesByTime(params) {
|
|
1035
|
-
const check = this.checkToolEnabled("getTopQueriesByTime");
|
|
1036
|
-
if (!check.enabled)
|
|
1037
|
-
return { status: "error", error: check.error };
|
|
1038
|
-
return await this.performanceTools.getTopQueriesByTime(params);
|
|
1039
|
-
}
|
|
1040
|
-
async getTopQueriesByCount(params) {
|
|
1041
|
-
const check = this.checkToolEnabled("getTopQueriesByCount");
|
|
1042
|
-
if (!check.enabled)
|
|
1043
|
-
return { status: "error", error: check.error };
|
|
1044
|
-
return await this.performanceTools.getTopQueriesByCount(params);
|
|
1045
|
-
}
|
|
1046
|
-
async getSlowQueries(params) {
|
|
1047
|
-
const check = this.checkToolEnabled("getSlowQueries");
|
|
1048
|
-
if (!check.enabled)
|
|
1049
|
-
return { status: "error", error: check.error };
|
|
1050
|
-
return await this.performanceTools.getSlowQueries(params);
|
|
1051
|
-
}
|
|
1052
917
|
async getTableIOStats(params) {
|
|
1053
918
|
const check = this.checkToolEnabled("getTableIOStats");
|
|
1054
919
|
if (!check.enabled)
|
package/dist/mcp-server.js
CHANGED
|
@@ -3174,9 +3174,6 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
3174
3174
|
case "export_table_to_csv":
|
|
3175
3175
|
result = await mysqlMCP.exportTableToCSV((args || {}));
|
|
3176
3176
|
break;
|
|
3177
|
-
case "export_query_to_csv":
|
|
3178
|
-
result = await mysqlMCP.exportQueryToCSV((args || {}));
|
|
3179
|
-
break;
|
|
3180
3177
|
// Cache Management Tools
|
|
3181
3178
|
case "get_cache_stats":
|
|
3182
3179
|
result = mysqlMCP.getCacheStats();
|
|
@@ -3333,70 +3330,17 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
3333
3330
|
case "explain_query":
|
|
3334
3331
|
result = await mysqlMCP.explainQuery((args || {}));
|
|
3335
3332
|
break;
|
|
3336
|
-
case "show_engine_status":
|
|
3337
|
-
result = await mysqlMCP.showEngineStatus((args || {}));
|
|
3338
|
-
break;
|
|
3339
|
-
case "get_server_info":
|
|
3340
|
-
result = await mysqlMCP.getServerInfo();
|
|
3341
|
-
break;
|
|
3342
|
-
case "show_binary_logs":
|
|
3343
|
-
result = await mysqlMCP.showBinaryLogs();
|
|
3344
|
-
break;
|
|
3345
|
-
case "show_replication_status":
|
|
3346
|
-
result = await mysqlMCP.showReplicationStatus((args || {}));
|
|
3347
|
-
break;
|
|
3348
|
-
// Backup and Restore Tools
|
|
3349
|
-
case "backup_table":
|
|
3350
|
-
result = await mysqlMCP.backupTable((args || {}));
|
|
3351
|
-
break;
|
|
3352
|
-
case "backup_database":
|
|
3353
|
-
result = await mysqlMCP.backupDatabase((args || {}));
|
|
3354
|
-
break;
|
|
3355
|
-
case "restore_from_sql":
|
|
3356
|
-
result = await mysqlMCP.restoreFromSql((args || {}));
|
|
3357
|
-
break;
|
|
3358
|
-
case "get_create_table_statement":
|
|
3359
|
-
result = await mysqlMCP.getCreateTableStatement((args || {}));
|
|
3360
|
-
break;
|
|
3361
|
-
case "get_database_schema":
|
|
3362
|
-
result = await mysqlMCP.getDatabaseSchema((args || {}));
|
|
3363
|
-
break;
|
|
3364
3333
|
// Extended Data Export Tools
|
|
3365
3334
|
case "export_table_to_json":
|
|
3366
3335
|
result = await mysqlMCP.exportTableToJSON((args || {}));
|
|
3367
3336
|
break;
|
|
3368
|
-
case "export_query_to_json":
|
|
3369
|
-
result = await mysqlMCP.exportQueryToJSON((args || {}));
|
|
3370
|
-
break;
|
|
3371
3337
|
case "safe_export_table":
|
|
3372
3338
|
result = await mysqlMCP.safeExportTable((args || {}));
|
|
3373
3339
|
break;
|
|
3374
|
-
case "export_table_to_sql":
|
|
3375
|
-
result = await mysqlMCP.exportTableToSql((args || {}));
|
|
3376
|
-
break;
|
|
3377
3340
|
// Data Import Tools
|
|
3378
|
-
case "import_from_csv":
|
|
3379
|
-
result = await mysqlMCP.importFromCSV((args || {}));
|
|
3380
|
-
break;
|
|
3381
3341
|
case "import_from_json":
|
|
3382
3342
|
result = await mysqlMCP.importFromJSON((args || {}));
|
|
3383
3343
|
break;
|
|
3384
|
-
// Data Migration Tools
|
|
3385
|
-
case "copy_table_data":
|
|
3386
|
-
result = await mysqlMCP.copyTableData((args || {}));
|
|
3387
|
-
break;
|
|
3388
|
-
case "move_table_data":
|
|
3389
|
-
result = await mysqlMCP.moveTableData((args || {}));
|
|
3390
|
-
break;
|
|
3391
|
-
case "clone_table":
|
|
3392
|
-
result = await mysqlMCP.cloneTable((args || {}));
|
|
3393
|
-
break;
|
|
3394
|
-
case "compare_table_structure":
|
|
3395
|
-
result = await mysqlMCP.compareTableStructure((args || {}));
|
|
3396
|
-
break;
|
|
3397
|
-
case "sync_table_data":
|
|
3398
|
-
result = await mysqlMCP.syncTableData((args || {}));
|
|
3399
|
-
break;
|
|
3400
3344
|
// Schema Versioning and Migrations Tools
|
|
3401
3345
|
case "init_migrations_table":
|
|
3402
3346
|
result = await mysqlMCP.initMigrationsTable((args || {}));
|
|
@@ -3429,15 +3373,6 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
3429
3373
|
case "get_performance_metrics":
|
|
3430
3374
|
result = await mysqlMCP.getPerformanceMetrics();
|
|
3431
3375
|
break;
|
|
3432
|
-
case "get_top_queries_by_time":
|
|
3433
|
-
result = await mysqlMCP.getTopQueriesByTime((args || {}));
|
|
3434
|
-
break;
|
|
3435
|
-
case "get_top_queries_by_count":
|
|
3436
|
-
result = await mysqlMCP.getTopQueriesByCount((args || {}));
|
|
3437
|
-
break;
|
|
3438
|
-
case "get_slow_queries":
|
|
3439
|
-
result = await mysqlMCP.getSlowQueries((args || {}));
|
|
3440
|
-
break;
|
|
3441
3376
|
case "get_table_io_stats":
|
|
3442
3377
|
result = await mysqlMCP.getTableIOStats((args || {}));
|
|
3443
3378
|
break;
|