@berthojoris/mcp-mysql-server 1.38.0 → 1.40.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 +82 -0
- package/DOCUMENTATIONS.md +4 -37
- package/README.md +3 -7
- package/dist/config/featureConfig.d.ts +1 -5
- package/dist/config/featureConfig.js +2 -90
- package/dist/index.d.ts +0 -245
- package/dist/index.js +1 -246
- package/dist/mcp-server.js +0 -583
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,88 @@ 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.40.0] - 2026-03-06
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
- **Performance Monitoring Category**: Removed entire `performance_monitoring` category and all 10 tools to reduce bundle size and simplify the codebase
|
|
12
|
+
- `get_performance_metrics` - Get overall performance metrics
|
|
13
|
+
- `get_table_io_stats` - Get table I/O statistics
|
|
14
|
+
- `get_index_usage_stats` - Get index usage statistics
|
|
15
|
+
- `get_unused_indexes` - Find unused indexes
|
|
16
|
+
- `get_connection_pool_stats` - Get connection pool statistics
|
|
17
|
+
- `get_database_health_check` - Get database health status
|
|
18
|
+
- `reset_performance_stats` - Reset performance statistics
|
|
19
|
+
- `get_top_queries_by_time` - Get top queries by execution time
|
|
20
|
+
- `get_top_queries_by_count` - Get top queries by execution count
|
|
21
|
+
- `get_slow_queries` - Get slow queries
|
|
22
|
+
- **Cache Management Category**: Removed entire `cache_management` category and all 5 tools
|
|
23
|
+
- `get_cache_stats` - Query cache statistics
|
|
24
|
+
- `get_cache_config` - Cache configuration
|
|
25
|
+
- `configure_cache_settings` - Configure cache settings
|
|
26
|
+
- `clear_cache` - Clear cached results
|
|
27
|
+
- `invalidate_cache_for_table` - Invalidate cache for table
|
|
28
|
+
- **Server Management Category**: Removed entire `server_management` category and all 9 tools
|
|
29
|
+
- `show_process_list` - Show running processes
|
|
30
|
+
- `kill_process` - Terminate processes
|
|
31
|
+
- `show_status` - Server status variables
|
|
32
|
+
- `show_variables` - Server configuration
|
|
33
|
+
- `explain_query` - Query execution plan
|
|
34
|
+
- `show_engine_status` - Storage engine status
|
|
35
|
+
- `get_server_info` - Server information
|
|
36
|
+
- `show_binary_logs` - Binary log files
|
|
37
|
+
- `show_replication_status` - Replication status
|
|
38
|
+
- **Tool Modules**: Removed imports and initialization for `PerformanceTools` and `ProcessTools` from `index.ts`
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- Updated tool count: 97 → 73 tools (-24 tools)
|
|
42
|
+
- Updated category count: 20 → 15 categories (removed `performance_monitoring`, `cache_management`, `server_management`)
|
|
43
|
+
- Updated `mcp-server.ts` to remove tool registrations and routing for all 24 tools
|
|
44
|
+
- Updated `index.ts` to remove MySQLMCP methods and tool imports
|
|
45
|
+
- Updated `featureConfig.ts` to remove all performance/cache/server tool mappings and categories
|
|
46
|
+
- Updated README.md and DOCUMENTATIONS.md to reflect tool/category count changes
|
|
47
|
+
- Simplified package description
|
|
48
|
+
- Bumped package version to `1.40.0`
|
|
49
|
+
|
|
50
|
+
### Rationale
|
|
51
|
+
- These tools were rarely used by AI agents in production
|
|
52
|
+
- Added significant complexity to the codebase (~2,000+ lines)
|
|
53
|
+
- Performance monitoring is typically handled by dedicated tools (MySQL Enterprise Monitor, Percona Monitoring Tools, etc.)
|
|
54
|
+
- Cache management is internal implementation detail, rarely needs manual intervention
|
|
55
|
+
- Server management commands are administrative tasks outside typical AI agent workflows
|
|
56
|
+
- Removal reduces bundle size by ~80KB and simplifies maintenance
|
|
57
|
+
|
|
58
|
+
## [1.39.0] - 2026-03-06
|
|
59
|
+
|
|
60
|
+
### Removed
|
|
61
|
+
- **Schema Migrations Category**: Removed entire `schema_migrations` category and all 9 migration tools to reduce bundle size and simplify the codebase
|
|
62
|
+
- `init_migrations_table` - Initialize migrations tracking table
|
|
63
|
+
- `create_migration` - Create a new migration
|
|
64
|
+
- `apply_migrations` - Apply pending migrations
|
|
65
|
+
- `rollback_migration` - Rollback a specific migration
|
|
66
|
+
- `get_migration_status` - Get migration status
|
|
67
|
+
- `get_schema_version` - Get current schema version
|
|
68
|
+
- `validate_migrations` - Validate migration files
|
|
69
|
+
- `reset_failed_migration` - Reset a failed migration
|
|
70
|
+
- `generate_migration_from_diff` - Generate migration from schema diff
|
|
71
|
+
- **Schema Migrations Tools Module**: Removed `src/tools/schemaVersioningTools.ts` (1,231 lines)
|
|
72
|
+
- **Documentation Category**: Removed `SCHEMA_MIGRATIONS` from `DocCategory` enum in `featureConfig.ts`
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
- Updated tool count: 106 → 97 tools (-9 tools)
|
|
76
|
+
- Updated category count: 21 → 20 categories (removed `schema_migrations`)
|
|
77
|
+
- Updated `mcp-server.ts` to remove tool registrations and routing for all migration tools
|
|
78
|
+
- Updated `index.ts` to remove MySQLMCP methods and SchemaVersioningTools import
|
|
79
|
+
- Updated `featureConfig.ts` to remove all schema migrations tool mappings
|
|
80
|
+
- Updated README.md and DOCUMENTATIONS.md to reflect tool/category count changes
|
|
81
|
+
- Simplified package description to remove "schema migration" reference
|
|
82
|
+
- Bumped package version to `1.39.0`
|
|
83
|
+
|
|
84
|
+
### Rationale
|
|
85
|
+
- These tools were rarely used by AI agents
|
|
86
|
+
- Added significant complexity to the codebase
|
|
87
|
+
- Most users prefer external migration tools (Flyway, Liquibase, etc.)
|
|
88
|
+
- Removal reduces bundle size by ~40KB
|
|
89
|
+
|
|
8
90
|
## [1.38.0] - 2026-03-06
|
|
9
91
|
|
|
10
92
|
### Fixed
|
package/DOCUMENTATIONS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# MySQL MCP Server - Documentation
|
|
2
2
|
|
|
3
3
|
**Last Updated:** 2026-03-06 00:00:00
|
|
4
|
-
**Version:** 1.
|
|
5
|
-
**Total Tools:**
|
|
4
|
+
**Version:** 1.40.0
|
|
5
|
+
**Total Tools:** 73
|
|
6
6
|
|
|
7
7
|
Comprehensive documentation for the MySQL MCP Server. For quick start, see [README.md](README.md).
|
|
8
8
|
|
|
@@ -194,50 +194,17 @@ 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.
|
|
198
|
-
- `get_performance_metrics` - Get overall performance metrics
|
|
199
|
-
- `get_table_io_stats` - Get table I/O statistics
|
|
200
|
-
- `get_index_usage_stats` - Get index usage statistics
|
|
201
|
-
- `get_unused_indexes` - Find unused indexes
|
|
202
|
-
- `get_connection_pool_stats` - Get connection pool statistics
|
|
203
|
-
- `get_database_health_check` - Get database health status
|
|
204
|
-
- `reset_performance_stats` - Reset performance statistics
|
|
205
|
-
|
|
206
|
-
### 15. Query Optimization (3 tools)
|
|
197
|
+
### 14. Query Optimization (3 tools)
|
|
207
198
|
- `analyze_query` - Analyze query performance
|
|
208
199
|
- `get_optimization_hints` - Get optimizer hints
|
|
209
200
|
- `repair_query` - Repair broken SQL queries
|
|
210
201
|
|
|
211
|
-
###
|
|
212
|
-
- `show_process_list` - Show running processes
|
|
213
|
-
- `kill_process` - Terminate processes
|
|
214
|
-
- `show_status` - Server status variables
|
|
215
|
-
- `show_variables` - Server configuration
|
|
216
|
-
- `explain_query` - Query execution plan
|
|
217
|
-
|
|
218
|
-
### 17. Cache Management (4 tools)
|
|
219
|
-
- `get_cache_stats` - Query cache statistics
|
|
220
|
-
- `get_cache_config` - Cache configuration
|
|
221
|
-
- `configure_cache` - Configure cache settings
|
|
222
|
-
- `clear_cache` - Clear cached results
|
|
223
|
-
|
|
224
|
-
### 18. Utilities (4 tools)
|
|
202
|
+
### 15. Utilities (4 tools)
|
|
225
203
|
- `test_connection` - Test connectivity
|
|
226
204
|
- `describe_connection` - Connection info
|
|
227
205
|
- `read_changelog` - Read changelog
|
|
228
206
|
- `invalidate_table_cache` - Clear table cache
|
|
229
207
|
|
|
230
|
-
### 19. Schema Migrations (9 tools)
|
|
231
|
-
- `init_migrations_table` - Initialize migrations tracking table
|
|
232
|
-
- `create_migration` - Create a new migration
|
|
233
|
-
- `apply_migrations` - Apply pending migrations
|
|
234
|
-
- `rollback_migration` - Rollback a specific migration
|
|
235
|
-
- `get_migration_status` - Get migration status
|
|
236
|
-
- `get_schema_version` - Get current schema version
|
|
237
|
-
- `validate_migrations` - Validate migration files
|
|
238
|
-
- `reset_failed_migration` - Reset a failed migration
|
|
239
|
-
- `generate_migration_from_diff` - Generate migration from schema diff
|
|
240
|
-
|
|
241
208
|
---
|
|
242
209
|
|
|
243
210
|
## Core Operations
|
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-06
|
|
7
|
+
**Last Updated:** 2026-03-06 16:45: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)
|
|
@@ -259,19 +259,15 @@ Use documentation categories to fine-tune which tools are exposed (Layer 2):
|
|
|
259
259
|
| `index_management` | Optimize performance with index management | `analyze_index, create_index, drop_index, get_index_info, list_indexes` |
|
|
260
260
|
| `constraint_management` | Manage data integrity constraints | `add_check_constraint, add_foreign_key, add_unique_constraint, drop_constraint, drop_foreign_key, list_constraints, list_foreign_keys` |
|
|
261
261
|
| `table_maintenance` | Table optimization, repair, and maintenance | `analyze_table, check_table, flush_table, get_table_size, get_table_status, optimize_table, repair_table, truncate_table` |
|
|
262
|
-
| `server_management` | MySQL server configuration and administration | `explain_query, get_server_info, kill_process, show_binary_logs, show_engine_status, show_process_list, show_replication_status, show_status, show_variables` |
|
|
263
|
-
| `performance_monitoring` | Monitor and analyze database performance | `get_connection_pool_stats, get_database_health_check, get_index_usage_stats, get_performance_metrics, get_slow_queries, get_table_io_stats, get_top_queries_by_count, get_top_queries_by_time, get_unused_indexes, reset_performance_stats` |
|
|
264
|
-
| `cache_management` | Manage query cache and optimization | `clear_cache, configure_cache_settings, get_cache_config, get_cache_stats, invalidate_cache_for_table` |
|
|
265
262
|
| `query_optimization` | Analyze and optimize SQL queries | `analyze_query, get_optimization_hints` |
|
|
266
263
|
| `backup_restore` | Create backups and restore databases | `backup_database, backup_table, get_create_table_statement, get_database_schema, restore_from_sql` |
|
|
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` |
|
|
268
264
|
| `analysis` | Data analysis and reporting tools | `get_column_statistics, get_database_summary, get_schema_erd, get_schema_rag_context` |
|
|
269
265
|
|
|
270
266
|
<details>
|
|
271
267
|
<summary>Copy/paste list (comma-separated, no spaces)</summary>
|
|
272
268
|
|
|
273
269
|
```text
|
|
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,
|
|
270
|
+
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,query_optimization,backup_restore,analysis
|
|
275
271
|
```
|
|
276
272
|
|
|
277
273
|
</details>
|
|
@@ -282,7 +278,7 @@ Full category → tool mapping (and examples) lives in **[DOCUMENTATIONS.md →
|
|
|
282
278
|
|
|
283
279
|
## Available Tools
|
|
284
280
|
|
|
285
|
-
The server exposes **
|
|
281
|
+
The server exposes **73 tools** organized into categories (CRUD, schema, and utilities).
|
|
286
282
|
|
|
287
283
|
- Complete list of tools: **[DOCUMENTATIONS.md → Complete Tools Reference](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
|
|
288
284
|
|
|
@@ -14,7 +14,7 @@ export declare enum ToolCategory {
|
|
|
14
14
|
PROCEDURE = "procedure"
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Documentation categories from README (
|
|
17
|
+
* Documentation categories from README (15 categories)
|
|
18
18
|
* More intuitive and matches user mental model
|
|
19
19
|
*/
|
|
20
20
|
export declare enum DocCategory {
|
|
@@ -32,12 +32,8 @@ export declare enum DocCategory {
|
|
|
32
32
|
INDEX_MANAGEMENT = "index_management",
|
|
33
33
|
CONSTRAINT_MANAGEMENT = "constraint_management",
|
|
34
34
|
TABLE_MAINTENANCE = "table_maintenance",
|
|
35
|
-
SERVER_MANAGEMENT = "server_management",
|
|
36
|
-
PERFORMANCE_MONITORING = "performance_monitoring",
|
|
37
|
-
CACHE_MANAGEMENT = "cache_management",
|
|
38
35
|
QUERY_OPTIMIZATION = "query_optimization",
|
|
39
36
|
BACKUP_RESTORE = "backup_restore",
|
|
40
|
-
SCHEMA_MIGRATIONS = "schema_migrations",
|
|
41
37
|
ANALYSIS = "analysis"
|
|
42
38
|
}
|
|
43
39
|
/**
|
|
@@ -24,7 +24,7 @@ var ToolCategory;
|
|
|
24
24
|
ToolCategory["PROCEDURE"] = "procedure";
|
|
25
25
|
})(ToolCategory || (exports.ToolCategory = ToolCategory = {}));
|
|
26
26
|
/**
|
|
27
|
-
* Documentation categories from README (
|
|
27
|
+
* Documentation categories from README (15 categories)
|
|
28
28
|
* More intuitive and matches user mental model
|
|
29
29
|
*/
|
|
30
30
|
var DocCategory;
|
|
@@ -43,12 +43,8 @@ var DocCategory;
|
|
|
43
43
|
DocCategory["INDEX_MANAGEMENT"] = "index_management";
|
|
44
44
|
DocCategory["CONSTRAINT_MANAGEMENT"] = "constraint_management";
|
|
45
45
|
DocCategory["TABLE_MAINTENANCE"] = "table_maintenance";
|
|
46
|
-
DocCategory["SERVER_MANAGEMENT"] = "server_management";
|
|
47
|
-
DocCategory["PERFORMANCE_MONITORING"] = "performance_monitoring";
|
|
48
|
-
DocCategory["CACHE_MANAGEMENT"] = "cache_management";
|
|
49
46
|
DocCategory["QUERY_OPTIMIZATION"] = "query_optimization";
|
|
50
47
|
DocCategory["BACKUP_RESTORE"] = "backup_restore";
|
|
51
|
-
DocCategory["SCHEMA_MIGRATIONS"] = "schema_migrations";
|
|
52
48
|
DocCategory["ANALYSIS"] = "analysis";
|
|
53
49
|
})(DocCategory || (exports.DocCategory = DocCategory = {}));
|
|
54
50
|
/**
|
|
@@ -103,15 +99,6 @@ exports.toolCategoryMap = {
|
|
|
103
99
|
createStoredProcedure: ToolCategory.PROCEDURE,
|
|
104
100
|
dropStoredProcedure: ToolCategory.PROCEDURE,
|
|
105
101
|
showCreateProcedure: ToolCategory.LIST,
|
|
106
|
-
// Cache management tools
|
|
107
|
-
getCacheStats: ToolCategory.UTILITY,
|
|
108
|
-
getCacheConfig: ToolCategory.UTILITY,
|
|
109
|
-
configureCacheSettings: ToolCategory.UTILITY,
|
|
110
|
-
clearCache: ToolCategory.UTILITY,
|
|
111
|
-
invalidateCacheForTable: ToolCategory.UTILITY,
|
|
112
|
-
// Query optimization tools
|
|
113
|
-
analyzeQuery: ToolCategory.UTILITY,
|
|
114
|
-
getOptimizationHints: ToolCategory.UTILITY,
|
|
115
102
|
// View tools
|
|
116
103
|
listViews: ToolCategory.LIST,
|
|
117
104
|
getViewInfo: ToolCategory.LIST,
|
|
@@ -155,45 +142,12 @@ exports.toolCategoryMap = {
|
|
|
155
142
|
getTableStatus: ToolCategory.LIST,
|
|
156
143
|
flushTable: ToolCategory.UTILITY,
|
|
157
144
|
getTableSize: ToolCategory.LIST,
|
|
158
|
-
// Process and server management tools
|
|
159
|
-
showProcessList: ToolCategory.LIST,
|
|
160
|
-
killProcess: ToolCategory.EXECUTE,
|
|
161
|
-
showStatus: ToolCategory.LIST,
|
|
162
|
-
showVariables: ToolCategory.LIST,
|
|
163
|
-
explainQuery: ToolCategory.UTILITY,
|
|
164
|
-
showEngineStatus: ToolCategory.LIST,
|
|
165
|
-
getServerInfo: ToolCategory.LIST,
|
|
166
|
-
showBinaryLogs: ToolCategory.LIST,
|
|
167
|
-
showReplicationStatus: ToolCategory.LIST,
|
|
168
145
|
// Backup and restore tools
|
|
169
146
|
backupTable: ToolCategory.UTILITY,
|
|
170
147
|
backupDatabase: ToolCategory.UTILITY,
|
|
171
148
|
restoreFromSql: ToolCategory.UTILITY,
|
|
172
149
|
getCreateTableStatement: ToolCategory.UTILITY,
|
|
173
150
|
getDatabaseSchema: ToolCategory.UTILITY,
|
|
174
|
-
// Schema versioning and migrations tools
|
|
175
|
-
initMigrationsTable: ToolCategory.DDL,
|
|
176
|
-
createMigration: ToolCategory.DDL,
|
|
177
|
-
applyMigrations: ToolCategory.DDL,
|
|
178
|
-
rollbackMigration: ToolCategory.DDL,
|
|
179
|
-
getMigrationStatus: ToolCategory.LIST,
|
|
180
|
-
getSchemaVersion: ToolCategory.LIST,
|
|
181
|
-
validateMigrations: ToolCategory.LIST,
|
|
182
|
-
resetFailedMigration: ToolCategory.DDL,
|
|
183
|
-
generateMigrationFromDiff: ToolCategory.DDL,
|
|
184
|
-
// Analysis tools - MOVED here to avoid duplication
|
|
185
|
-
// Note: keys must be unique in the object literal
|
|
186
|
-
// Performance monitoring tools
|
|
187
|
-
getPerformanceMetrics: ToolCategory.UTILITY,
|
|
188
|
-
getTopQueriesByTime: ToolCategory.UTILITY,
|
|
189
|
-
getTopQueriesByCount: ToolCategory.UTILITY,
|
|
190
|
-
getSlowQueries: ToolCategory.UTILITY,
|
|
191
|
-
getTableIOStats: ToolCategory.UTILITY,
|
|
192
|
-
getIndexUsageStats: ToolCategory.UTILITY,
|
|
193
|
-
getUnusedIndexes: ToolCategory.UTILITY,
|
|
194
|
-
getConnectionPoolStats: ToolCategory.UTILITY,
|
|
195
|
-
getDatabaseHealthCheck: ToolCategory.UTILITY,
|
|
196
|
-
resetPerformanceStats: ToolCategory.UTILITY,
|
|
197
151
|
// Full-Text Search Tools
|
|
198
152
|
createFulltextIndex: ToolCategory.DDL,
|
|
199
153
|
fulltextSearch: ToolCategory.READ,
|
|
@@ -291,33 +245,6 @@ exports.toolDocCategoryMap = {
|
|
|
291
245
|
getTableStatus: DocCategory.TABLE_MAINTENANCE,
|
|
292
246
|
flushTable: DocCategory.TABLE_MAINTENANCE,
|
|
293
247
|
getTableSize: DocCategory.TABLE_MAINTENANCE,
|
|
294
|
-
// Server Management
|
|
295
|
-
showProcessList: DocCategory.SERVER_MANAGEMENT,
|
|
296
|
-
killProcess: DocCategory.SERVER_MANAGEMENT,
|
|
297
|
-
showStatus: DocCategory.SERVER_MANAGEMENT,
|
|
298
|
-
showVariables: DocCategory.SERVER_MANAGEMENT,
|
|
299
|
-
explainQuery: DocCategory.SERVER_MANAGEMENT,
|
|
300
|
-
showEngineStatus: DocCategory.SERVER_MANAGEMENT,
|
|
301
|
-
getServerInfo: DocCategory.SERVER_MANAGEMENT,
|
|
302
|
-
showBinaryLogs: DocCategory.SERVER_MANAGEMENT,
|
|
303
|
-
showReplicationStatus: DocCategory.SERVER_MANAGEMENT,
|
|
304
|
-
// Performance Monitoring
|
|
305
|
-
getPerformanceMetrics: DocCategory.PERFORMANCE_MONITORING,
|
|
306
|
-
getTopQueriesByTime: DocCategory.PERFORMANCE_MONITORING,
|
|
307
|
-
getTopQueriesByCount: DocCategory.PERFORMANCE_MONITORING,
|
|
308
|
-
getSlowQueries: DocCategory.PERFORMANCE_MONITORING,
|
|
309
|
-
getTableIOStats: DocCategory.PERFORMANCE_MONITORING,
|
|
310
|
-
getIndexUsageStats: DocCategory.PERFORMANCE_MONITORING,
|
|
311
|
-
getUnusedIndexes: DocCategory.PERFORMANCE_MONITORING,
|
|
312
|
-
getConnectionPoolStats: DocCategory.PERFORMANCE_MONITORING,
|
|
313
|
-
getDatabaseHealthCheck: DocCategory.PERFORMANCE_MONITORING,
|
|
314
|
-
resetPerformanceStats: DocCategory.PERFORMANCE_MONITORING,
|
|
315
|
-
// Cache Management
|
|
316
|
-
getCacheStats: DocCategory.CACHE_MANAGEMENT,
|
|
317
|
-
getCacheConfig: DocCategory.CACHE_MANAGEMENT,
|
|
318
|
-
configureCacheSettings: DocCategory.CACHE_MANAGEMENT,
|
|
319
|
-
clearCache: DocCategory.CACHE_MANAGEMENT,
|
|
320
|
-
invalidateCacheForTable: DocCategory.CACHE_MANAGEMENT,
|
|
321
248
|
// Query Optimization
|
|
322
249
|
analyzeQuery: DocCategory.QUERY_OPTIMIZATION,
|
|
323
250
|
getOptimizationHints: DocCategory.QUERY_OPTIMIZATION,
|
|
@@ -328,16 +255,6 @@ exports.toolDocCategoryMap = {
|
|
|
328
255
|
restoreFromSql: DocCategory.BACKUP_RESTORE,
|
|
329
256
|
getCreateTableStatement: DocCategory.BACKUP_RESTORE,
|
|
330
257
|
getDatabaseSchema: DocCategory.BACKUP_RESTORE,
|
|
331
|
-
// Schema Migrations
|
|
332
|
-
initMigrationsTable: DocCategory.SCHEMA_MIGRATIONS,
|
|
333
|
-
createMigration: DocCategory.SCHEMA_MIGRATIONS,
|
|
334
|
-
applyMigrations: DocCategory.SCHEMA_MIGRATIONS,
|
|
335
|
-
rollbackMigration: DocCategory.SCHEMA_MIGRATIONS,
|
|
336
|
-
getMigrationStatus: DocCategory.SCHEMA_MIGRATIONS,
|
|
337
|
-
getSchemaVersion: DocCategory.SCHEMA_MIGRATIONS,
|
|
338
|
-
validateMigrations: DocCategory.SCHEMA_MIGRATIONS,
|
|
339
|
-
resetFailedMigration: DocCategory.SCHEMA_MIGRATIONS,
|
|
340
|
-
generateMigrationFromDiff: DocCategory.SCHEMA_MIGRATIONS,
|
|
341
258
|
// Analysis
|
|
342
259
|
getDatabaseSummary: DocCategory.ANALYSIS,
|
|
343
260
|
getSchemaERD: DocCategory.ANALYSIS,
|
|
@@ -365,8 +282,6 @@ const legacyToDocCategoryMap = {
|
|
|
365
282
|
DocCategory.INDEX_MANAGEMENT,
|
|
366
283
|
DocCategory.CONSTRAINT_MANAGEMENT,
|
|
367
284
|
DocCategory.TABLE_MAINTENANCE,
|
|
368
|
-
DocCategory.SERVER_MANAGEMENT,
|
|
369
|
-
DocCategory.SCHEMA_MIGRATIONS,
|
|
370
285
|
DocCategory.ANALYSIS,
|
|
371
286
|
DocCategory.UTILITIES,
|
|
372
287
|
],
|
|
@@ -383,7 +298,7 @@ const legacyToDocCategoryMap = {
|
|
|
383
298
|
DocCategory.CRUD_OPERATIONS,
|
|
384
299
|
DocCategory.BULK_OPERATIONS,
|
|
385
300
|
],
|
|
386
|
-
execute: [DocCategory.CUSTOM_QUERIES
|
|
301
|
+
execute: [DocCategory.CUSTOM_QUERIES],
|
|
387
302
|
ddl: [
|
|
388
303
|
DocCategory.SCHEMA_MANAGEMENT,
|
|
389
304
|
DocCategory.VIEWS_MANAGEMENT,
|
|
@@ -392,13 +307,10 @@ const legacyToDocCategoryMap = {
|
|
|
392
307
|
DocCategory.CONSTRAINT_MANAGEMENT,
|
|
393
308
|
DocCategory.TABLE_MAINTENANCE,
|
|
394
309
|
DocCategory.BACKUP_RESTORE,
|
|
395
|
-
DocCategory.SCHEMA_MIGRATIONS,
|
|
396
310
|
],
|
|
397
311
|
utility: [
|
|
398
312
|
DocCategory.UTILITIES,
|
|
399
313
|
DocCategory.TABLE_MAINTENANCE,
|
|
400
|
-
DocCategory.PERFORMANCE_MONITORING,
|
|
401
|
-
DocCategory.CACHE_MANAGEMENT,
|
|
402
314
|
DocCategory.QUERY_OPTIMIZATION,
|
|
403
315
|
DocCategory.BACKUP_RESTORE,
|
|
404
316
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -17,11 +17,7 @@ export declare class MySQLMCP {
|
|
|
17
17
|
private indexTools;
|
|
18
18
|
private constraintTools;
|
|
19
19
|
private maintenanceTools;
|
|
20
|
-
private processTools;
|
|
21
20
|
private backupRestoreTools;
|
|
22
|
-
private migrationTools;
|
|
23
|
-
private schemaVersioningTools;
|
|
24
|
-
private performanceTools;
|
|
25
21
|
private analysisTools;
|
|
26
22
|
private aiTools;
|
|
27
23
|
private macroTools;
|
|
@@ -321,113 +317,6 @@ export declare class MySQLMCP {
|
|
|
321
317
|
data?: any;
|
|
322
318
|
error?: string;
|
|
323
319
|
}>;
|
|
324
|
-
/**
|
|
325
|
-
* Initialize the migrations tracking table
|
|
326
|
-
*/
|
|
327
|
-
initMigrationsTable(params: {
|
|
328
|
-
database?: string;
|
|
329
|
-
}): Promise<{
|
|
330
|
-
status: string;
|
|
331
|
-
data?: any;
|
|
332
|
-
error?: string;
|
|
333
|
-
}>;
|
|
334
|
-
/**
|
|
335
|
-
* Create a new migration
|
|
336
|
-
*/
|
|
337
|
-
createMigration(params: {
|
|
338
|
-
name: string;
|
|
339
|
-
up_sql: string;
|
|
340
|
-
down_sql?: string;
|
|
341
|
-
description?: string;
|
|
342
|
-
version?: string;
|
|
343
|
-
database?: string;
|
|
344
|
-
}): Promise<{
|
|
345
|
-
status: string;
|
|
346
|
-
data?: any;
|
|
347
|
-
error?: string;
|
|
348
|
-
}>;
|
|
349
|
-
/**
|
|
350
|
-
* Apply pending migrations
|
|
351
|
-
*/
|
|
352
|
-
applyMigrations(params: {
|
|
353
|
-
target_version?: string;
|
|
354
|
-
dry_run?: boolean;
|
|
355
|
-
database?: string;
|
|
356
|
-
}): Promise<{
|
|
357
|
-
status: string;
|
|
358
|
-
data?: any;
|
|
359
|
-
error?: string;
|
|
360
|
-
}>;
|
|
361
|
-
/**
|
|
362
|
-
* Rollback migrations
|
|
363
|
-
*/
|
|
364
|
-
rollbackMigration(params: {
|
|
365
|
-
target_version?: string;
|
|
366
|
-
steps?: number;
|
|
367
|
-
dry_run?: boolean;
|
|
368
|
-
database?: string;
|
|
369
|
-
}): Promise<{
|
|
370
|
-
status: string;
|
|
371
|
-
data?: any;
|
|
372
|
-
error?: string;
|
|
373
|
-
}>;
|
|
374
|
-
/**
|
|
375
|
-
* Get migration status and history
|
|
376
|
-
*/
|
|
377
|
-
getMigrationStatus(params: {
|
|
378
|
-
version?: string;
|
|
379
|
-
status?: "pending" | "applied" | "failed" | "rolled_back";
|
|
380
|
-
limit?: number;
|
|
381
|
-
database?: string;
|
|
382
|
-
}): Promise<{
|
|
383
|
-
status: string;
|
|
384
|
-
data?: any;
|
|
385
|
-
error?: string;
|
|
386
|
-
}>;
|
|
387
|
-
/**
|
|
388
|
-
* Get current schema version
|
|
389
|
-
*/
|
|
390
|
-
getSchemaVersion(params: {
|
|
391
|
-
database?: string;
|
|
392
|
-
}): Promise<{
|
|
393
|
-
status: string;
|
|
394
|
-
data?: any;
|
|
395
|
-
error?: string;
|
|
396
|
-
}>;
|
|
397
|
-
/**
|
|
398
|
-
* Validate migrations for issues
|
|
399
|
-
*/
|
|
400
|
-
validateMigrations(params: {
|
|
401
|
-
database?: string;
|
|
402
|
-
}): Promise<{
|
|
403
|
-
status: string;
|
|
404
|
-
data?: any;
|
|
405
|
-
error?: string;
|
|
406
|
-
}>;
|
|
407
|
-
/**
|
|
408
|
-
* Reset a failed migration to pending status
|
|
409
|
-
*/
|
|
410
|
-
resetFailedMigration(params: {
|
|
411
|
-
version: string;
|
|
412
|
-
database?: string;
|
|
413
|
-
}): Promise<{
|
|
414
|
-
status: string;
|
|
415
|
-
data?: any;
|
|
416
|
-
error?: string;
|
|
417
|
-
}>;
|
|
418
|
-
/**
|
|
419
|
-
* Generate a migration from table structure differences
|
|
420
|
-
*/
|
|
421
|
-
generateMigrationFromDiff(params: {
|
|
422
|
-
table1: string;
|
|
423
|
-
table2: string;
|
|
424
|
-
migration_name: string;
|
|
425
|
-
database?: string;
|
|
426
|
-
}): Promise<{
|
|
427
|
-
status: string;
|
|
428
|
-
data?: any;
|
|
429
|
-
error?: string;
|
|
430
|
-
}>;
|
|
431
320
|
repairQuery(params: {
|
|
432
321
|
query: string;
|
|
433
322
|
error_message?: string;
|
|
@@ -520,57 +409,6 @@ export declare class MySQLMCP {
|
|
|
520
409
|
error?: string;
|
|
521
410
|
}>;
|
|
522
411
|
close(): Promise<void>;
|
|
523
|
-
/**
|
|
524
|
-
* Get cache statistics
|
|
525
|
-
*/
|
|
526
|
-
getCacheStats(): {
|
|
527
|
-
status: string;
|
|
528
|
-
data: import("./cache/queryCache").CacheStats;
|
|
529
|
-
};
|
|
530
|
-
/**
|
|
531
|
-
* Get cache configuration
|
|
532
|
-
*/
|
|
533
|
-
getCacheConfig(): {
|
|
534
|
-
status: string;
|
|
535
|
-
data: import("./cache/queryCache").CacheConfig;
|
|
536
|
-
};
|
|
537
|
-
/**
|
|
538
|
-
* Configure cache settings
|
|
539
|
-
*/
|
|
540
|
-
configureCacheSettings(params: {
|
|
541
|
-
enabled?: boolean;
|
|
542
|
-
ttlMs?: number;
|
|
543
|
-
maxSize?: number;
|
|
544
|
-
maxMemoryMB?: number;
|
|
545
|
-
}): {
|
|
546
|
-
status: string;
|
|
547
|
-
data: {
|
|
548
|
-
message: string;
|
|
549
|
-
config: import("./cache/queryCache").CacheConfig;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
/**
|
|
553
|
-
* Clear the query cache
|
|
554
|
-
*/
|
|
555
|
-
clearCache(): {
|
|
556
|
-
status: string;
|
|
557
|
-
data: {
|
|
558
|
-
message: string;
|
|
559
|
-
entriesCleared: number;
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
/**
|
|
563
|
-
* Invalidate cache for a specific table
|
|
564
|
-
*/
|
|
565
|
-
invalidateCacheForTable(params: {
|
|
566
|
-
table_name: string;
|
|
567
|
-
}): {
|
|
568
|
-
status: string;
|
|
569
|
-
data: {
|
|
570
|
-
message: string;
|
|
571
|
-
entriesInvalidated: number;
|
|
572
|
-
};
|
|
573
|
-
};
|
|
574
412
|
/**
|
|
575
413
|
* Analyze a query and get optimization suggestions
|
|
576
414
|
*/
|
|
@@ -876,89 +714,6 @@ export declare class MySQLMCP {
|
|
|
876
714
|
data?: any;
|
|
877
715
|
error?: string;
|
|
878
716
|
}>;
|
|
879
|
-
showProcessList(params?: {
|
|
880
|
-
full?: boolean;
|
|
881
|
-
}): Promise<{
|
|
882
|
-
status: string;
|
|
883
|
-
data?: any[];
|
|
884
|
-
error?: string;
|
|
885
|
-
}>;
|
|
886
|
-
killProcess(params: {
|
|
887
|
-
process_id: number;
|
|
888
|
-
type?: "CONNECTION" | "QUERY";
|
|
889
|
-
}): Promise<{
|
|
890
|
-
status: string;
|
|
891
|
-
message?: string;
|
|
892
|
-
error?: string;
|
|
893
|
-
}>;
|
|
894
|
-
showStatus(params?: {
|
|
895
|
-
like?: string;
|
|
896
|
-
global?: boolean;
|
|
897
|
-
}): Promise<{
|
|
898
|
-
status: string;
|
|
899
|
-
data?: any;
|
|
900
|
-
error?: string;
|
|
901
|
-
}>;
|
|
902
|
-
showVariables(params?: {
|
|
903
|
-
like?: string;
|
|
904
|
-
global?: boolean;
|
|
905
|
-
}): Promise<{
|
|
906
|
-
status: string;
|
|
907
|
-
data?: any;
|
|
908
|
-
error?: string;
|
|
909
|
-
}>;
|
|
910
|
-
explainQuery(params: {
|
|
911
|
-
query: string;
|
|
912
|
-
format?: "TRADITIONAL" | "JSON" | "TREE";
|
|
913
|
-
analyze?: boolean;
|
|
914
|
-
}): Promise<{
|
|
915
|
-
status: string;
|
|
916
|
-
data?: any;
|
|
917
|
-
error?: string;
|
|
918
|
-
}>;
|
|
919
|
-
getPerformanceMetrics(): Promise<{
|
|
920
|
-
status: string;
|
|
921
|
-
data?: any;
|
|
922
|
-
error?: string;
|
|
923
|
-
}>;
|
|
924
|
-
getTableIOStats(params?: {
|
|
925
|
-
limit?: number;
|
|
926
|
-
table_schema?: string;
|
|
927
|
-
}): Promise<{
|
|
928
|
-
status: string;
|
|
929
|
-
data?: any[];
|
|
930
|
-
error?: string;
|
|
931
|
-
}>;
|
|
932
|
-
getIndexUsageStats(params?: {
|
|
933
|
-
limit?: number;
|
|
934
|
-
table_schema?: string;
|
|
935
|
-
}): Promise<{
|
|
936
|
-
status: string;
|
|
937
|
-
data?: any[];
|
|
938
|
-
error?: string;
|
|
939
|
-
}>;
|
|
940
|
-
getUnusedIndexes(params?: {
|
|
941
|
-
table_schema?: string;
|
|
942
|
-
}): Promise<{
|
|
943
|
-
status: string;
|
|
944
|
-
data?: any[];
|
|
945
|
-
error?: string;
|
|
946
|
-
}>;
|
|
947
|
-
getConnectionPoolStats(): Promise<{
|
|
948
|
-
status: string;
|
|
949
|
-
data?: any;
|
|
950
|
-
error?: string;
|
|
951
|
-
}>;
|
|
952
|
-
getDatabaseHealthCheck(): Promise<{
|
|
953
|
-
status: string;
|
|
954
|
-
data?: any;
|
|
955
|
-
error?: string;
|
|
956
|
-
}>;
|
|
957
|
-
resetPerformanceStats(): Promise<{
|
|
958
|
-
status: string;
|
|
959
|
-
message?: string;
|
|
960
|
-
error?: string;
|
|
961
|
-
}>;
|
|
962
717
|
startQueryBuilder(params: {
|
|
963
718
|
intent: string;
|
|
964
719
|
context?: "analytics" | "reporting" | "data_entry" | "schema_exploration";
|