@berthojoris/mcp-mysql-server 1.33.6 → 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 +39 -0
- package/DOCUMENTATIONS.md +13 -56
- package/README.md +3 -10
- package/dist/config/featureConfig.d.ts +1 -2
- package/dist/config/featureConfig.js +0 -39
- package/dist/index.d.ts +0 -571
- package/dist/index.js +0 -263
- package/dist/mcp-server.js +0 -612
- 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/manifest.json +732 -877
- package/package.json +80 -95
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ 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
|
+
|
|
23
|
+
## [1.35.0] - 2026-03-04
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
- Removed AI enhancement category (`ai_enhancement`) and 16 AI tools from MCP exposure and runtime routing.
|
|
27
|
+
- Removed AI enhancement tool modules: intelligent query assistant, smart discovery, documentation generator, schema design, security audit, index recommendation, test data generation, schema pattern analysis, query visualization, and forecasting tools.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- Updated category filtering config by removing `DocCategory.AI_ENHANCEMENT` and related mappings.
|
|
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.
|
|
33
|
+
- Bumped package version to `1.35.0`.
|
|
34
|
+
|
|
35
|
+
## [1.34.0] - 2026-03-04
|
|
36
|
+
|
|
37
|
+
### Removed
|
|
38
|
+
- **REST API Server**: Removed `src/server.ts` and all REST API functionality to reduce bundle size and simplify the codebase
|
|
39
|
+
- Removed unused dependencies: `express`, `cors`, `helmet`, `morgan`, `express-rate-limit`, `jsonwebtoken`
|
|
40
|
+
- Removed unused devDependencies: `@types/cors`, `@types/express`, `@types/helmet`, `@types/morgan`, `@types/jsonwebtoken`
|
|
41
|
+
- Removed npm scripts: `start:mcp`, `start:api`, `dev:mcp`, `dev:api` (consolidated to `start` and `dev`)
|
|
42
|
+
- This reduces the package size and attack surface, focusing purely on MCP protocol via stdio
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- Simplified npm scripts: `start` now runs `mcp-server.js`, `dev` now runs `mcp-server.ts`
|
|
46
|
+
|
|
8
47
|
## [1.33.6] - 2026-01-25
|
|
9
48
|
|
|
10
49
|
### Documentation
|
package/DOCUMENTATIONS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# MySQL MCP Server - Documentation
|
|
2
2
|
|
|
3
|
-
**Last Updated:** 2026-
|
|
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
|
|
@@ -271,24 +246,6 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
|
|
|
271
246
|
- `reset_failed_migration` - Reset a failed migration
|
|
272
247
|
- `generate_migration_from_diff` - Generate migration from schema diff
|
|
273
248
|
|
|
274
|
-
### 24. AI Enhancement (16 tools)
|
|
275
|
-
- `build_query_from_intent` - Convert natural language to SQL
|
|
276
|
-
- `suggest_query_improvements` - Suggest query optimizations
|
|
277
|
-
- `smart_search` - Semantic search for tables, columns, data
|
|
278
|
-
- `find_similar_columns` - Find columns similar to a given column
|
|
279
|
-
- `discover_data_patterns` - Discover data patterns in tables
|
|
280
|
-
- `generate_documentation` - Generate database documentation
|
|
281
|
-
- `generate_data_dictionary` - Generate data dictionary for tables
|
|
282
|
-
- `generate_business_glossary` - Generate business glossary
|
|
283
|
-
- `design_schema_from_requirements` - Design schema from requirements
|
|
284
|
-
- `audit_database_security` - Audit database security
|
|
285
|
-
- `recommend_indexes` - Recommend indexes for optimization
|
|
286
|
-
- `generate_test_data` - Generate test data for tables
|
|
287
|
-
- `analyze_schema_patterns` - Analyze schema design patterns
|
|
288
|
-
- `visualize_query` - Visualize query execution plan
|
|
289
|
-
- `predict_query_performance` - Predict query performance
|
|
290
|
-
- `forecast_database_growth` - Forecast database growth
|
|
291
|
-
|
|
292
249
|
---
|
|
293
250
|
|
|
294
251
|
## Core Operations
|
|
@@ -364,9 +321,9 @@ await mcp.call("get_optimization_hints", {
|
|
|
364
321
|
|
|
365
322
|
## Advanced Features
|
|
366
323
|
|
|
367
|
-
###
|
|
324
|
+
### Analysis
|
|
368
325
|
|
|
369
|
-
The server includes
|
|
326
|
+
The server includes analysis tools for database insights:
|
|
370
327
|
|
|
371
328
|
- **Database Summary**: Provides readable overviews with statistics
|
|
372
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-
|
|
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)
|
|
@@ -268,13 +268,12 @@ Use documentation categories to fine-tune which tools are exposed (Layer 2):
|
|
|
268
268
|
| `data_migration` | Migrate data between databases or systems | `clone_table, compare_table_structure, copy_table_data, move_table_data, sync_table_data` |
|
|
269
269
|
| `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
270
|
| `analysis` | Data analysis and reporting tools | `get_column_statistics, get_database_summary, get_schema_erd, get_schema_rag_context` |
|
|
271
|
-
| `ai_enhancement` | AI-powered features and smart automation | `analyze_schema_patterns, audit_database_security, build_query_from_intent, design_schema_from_requirements, discover_data_patterns, find_similar_columns, forecast_database_growth, generate_business_glossary, generate_data_dictionary, generate_documentation, generate_test_data, predict_query_performance, recommend_indexes, smart_search, suggest_query_improvements, visualize_query` |
|
|
272
271
|
|
|
273
272
|
<details>
|
|
274
273
|
<summary>Copy/paste list (comma-separated, no spaces)</summary>
|
|
275
274
|
|
|
276
275
|
```text
|
|
277
|
-
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
|
|
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
|
|
278
277
|
```
|
|
279
278
|
|
|
280
279
|
</details>
|
|
@@ -285,14 +284,9 @@ Full category → tool mapping (and examples) lives in **[DOCUMENTATIONS.md →
|
|
|
285
284
|
|
|
286
285
|
## Available Tools
|
|
287
286
|
|
|
288
|
-
The server exposes **
|
|
287
|
+
The server exposes **117 tools** organized into categories (CRUD, schema, migrations, and perf/monitoring).
|
|
289
288
|
|
|
290
289
|
- Complete list of tools: **[DOCUMENTATIONS.md → Complete Tools Reference](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
|
|
291
|
-
- AI enhancement tools overview: **[DOCUMENTATIONS.md → AI Enhancement Tools](DOCUMENTATIONS.md#🤖-ai-enhancement-tools)**
|
|
292
|
-
|
|
293
|
-
### 🤖 AI Enhancement Tools
|
|
294
|
-
|
|
295
|
-
The full **Phase 1–3 (implemented)** overview, examples, and per-tool documentation lives in **[DOCUMENTATIONS.md](DOCUMENTATIONS.md#🤖-ai-enhancement-tools)**.
|
|
296
290
|
|
|
297
291
|
---
|
|
298
292
|
|
|
@@ -308,7 +302,6 @@ For comprehensive documentation, see **[DOCUMENTATIONS.md](DOCUMENTATIONS.md)**:
|
|
|
308
302
|
- **Schema Versioning** - Version control for database schema changes
|
|
309
303
|
- **Transaction Management** - ACID transactions
|
|
310
304
|
- **Stored Procedures** - Create and execute with IN/OUT/INOUT parameters
|
|
311
|
-
- **🤖 AI Enhancement** - Natural language to SQL, smart data discovery, schema design, security audit, index recommendations, data generation, visualization, and forecasting (Phase 1-3)
|
|
312
305
|
- **Query Logging** - See all SQL queries executed automatically
|
|
313
306
|
- **Security Features** - Built-in security and best practices
|
|
314
307
|
- **Bulk Operations** - High-performance batch processing
|
|
@@ -40,8 +40,7 @@ export declare enum DocCategory {
|
|
|
40
40
|
IMPORT_EXPORT = "import_export",
|
|
41
41
|
DATA_MIGRATION = "data_migration",
|
|
42
42
|
SCHEMA_MIGRATIONS = "schema_migrations",
|
|
43
|
-
ANALYSIS = "analysis"
|
|
44
|
-
AI_ENHANCEMENT = "ai_enhancement"
|
|
43
|
+
ANALYSIS = "analysis"
|
|
45
44
|
}
|
|
46
45
|
/**
|
|
47
46
|
* Map of tool names to their legacy categories
|
|
@@ -52,7 +52,6 @@ var DocCategory;
|
|
|
52
52
|
DocCategory["DATA_MIGRATION"] = "data_migration";
|
|
53
53
|
DocCategory["SCHEMA_MIGRATIONS"] = "schema_migrations";
|
|
54
54
|
DocCategory["ANALYSIS"] = "analysis";
|
|
55
|
-
DocCategory["AI_ENHANCEMENT"] = "ai_enhancement";
|
|
56
55
|
})(DocCategory || (exports.DocCategory = DocCategory = {}));
|
|
57
56
|
/**
|
|
58
57
|
* Map of tool names to their legacy categories
|
|
@@ -198,25 +197,6 @@ exports.toolCategoryMap = {
|
|
|
198
197
|
getConnectionPoolStats: ToolCategory.UTILITY,
|
|
199
198
|
getDatabaseHealthCheck: ToolCategory.UTILITY,
|
|
200
199
|
resetPerformanceStats: ToolCategory.UTILITY,
|
|
201
|
-
// Phase 1: AI Enhancement Tools
|
|
202
|
-
buildQueryFromIntent: ToolCategory.READ,
|
|
203
|
-
suggestQueryImprovements: ToolCategory.UTILITY,
|
|
204
|
-
smartSearch: ToolCategory.LIST,
|
|
205
|
-
findSimilarColumns: ToolCategory.LIST,
|
|
206
|
-
discoverDataPatterns: ToolCategory.READ,
|
|
207
|
-
generateDocumentation: ToolCategory.UTILITY,
|
|
208
|
-
generateDataDictionary: ToolCategory.UTILITY,
|
|
209
|
-
generateBusinessGlossary: ToolCategory.UTILITY,
|
|
210
|
-
// Phase 2: AI Enhancement Tools
|
|
211
|
-
designSchemaFromRequirements: ToolCategory.UTILITY,
|
|
212
|
-
auditDatabaseSecurity: ToolCategory.UTILITY,
|
|
213
|
-
recommendIndexes: ToolCategory.UTILITY,
|
|
214
|
-
// Phase 3: AI Enhancement Tools
|
|
215
|
-
generateTestData: ToolCategory.UTILITY,
|
|
216
|
-
analyzeSchemaPatterns: ToolCategory.UTILITY,
|
|
217
|
-
visualizeQuery: ToolCategory.UTILITY,
|
|
218
|
-
predictQueryPerformance: ToolCategory.UTILITY,
|
|
219
|
-
forecastDatabaseGrowth: ToolCategory.UTILITY,
|
|
220
200
|
// Full-Text Search Tools
|
|
221
201
|
createFulltextIndex: ToolCategory.DDL,
|
|
222
202
|
fulltextSearch: ToolCategory.READ,
|
|
@@ -379,25 +359,6 @@ exports.toolDocCategoryMap = {
|
|
|
379
359
|
getSchemaERD: DocCategory.ANALYSIS,
|
|
380
360
|
getColumnStatistics: DocCategory.ANALYSIS,
|
|
381
361
|
getSchemaRagContext: DocCategory.ANALYSIS,
|
|
382
|
-
// Phase 1: AI Enhancement
|
|
383
|
-
buildQueryFromIntent: DocCategory.AI_ENHANCEMENT,
|
|
384
|
-
suggestQueryImprovements: DocCategory.AI_ENHANCEMENT,
|
|
385
|
-
smartSearch: DocCategory.AI_ENHANCEMENT,
|
|
386
|
-
findSimilarColumns: DocCategory.AI_ENHANCEMENT,
|
|
387
|
-
discoverDataPatterns: DocCategory.AI_ENHANCEMENT,
|
|
388
|
-
generateDocumentation: DocCategory.AI_ENHANCEMENT,
|
|
389
|
-
generateDataDictionary: DocCategory.AI_ENHANCEMENT,
|
|
390
|
-
generateBusinessGlossary: DocCategory.AI_ENHANCEMENT,
|
|
391
|
-
// Phase 2: AI Enhancement
|
|
392
|
-
designSchemaFromRequirements: DocCategory.AI_ENHANCEMENT,
|
|
393
|
-
auditDatabaseSecurity: DocCategory.AI_ENHANCEMENT,
|
|
394
|
-
recommendIndexes: DocCategory.AI_ENHANCEMENT,
|
|
395
|
-
// Phase 3: AI Enhancement
|
|
396
|
-
generateTestData: DocCategory.AI_ENHANCEMENT,
|
|
397
|
-
analyzeSchemaPatterns: DocCategory.AI_ENHANCEMENT,
|
|
398
|
-
visualizeQuery: DocCategory.AI_ENHANCEMENT,
|
|
399
|
-
predictQueryPerformance: DocCategory.AI_ENHANCEMENT,
|
|
400
|
-
forecastDatabaseGrowth: DocCategory.AI_ENHANCEMENT,
|
|
401
362
|
// Full-Text Search
|
|
402
363
|
createFulltextIndex: DocCategory.INDEX_MANAGEMENT,
|
|
403
364
|
fulltextSearch: DocCategory.INDEX_MANAGEMENT,
|