@berthojoris/mcp-mysql-server 1.4.7 → 1.4.13
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 +135 -0
- package/DOCUMENTATIONS.md +1268 -0
- package/README.md +182 -1127
- package/dist/db/queryLogger.d.ts +10 -1
- package/dist/db/queryLogger.js +51 -1
- package/dist/index.d.ts +13 -0
- package/dist/mcp-server.js +24 -1
- package/dist/tools/dataExportTools.d.ts +2 -0
- package/dist/tools/dataExportTools.js +6 -3
- package/dist/tools/databaseTools.d.ts +3 -0
- package/dist/tools/databaseTools.js +14 -7
- package/dist/tools/ddlTools.d.ts +4 -0
- package/dist/tools/ddlTools.js +18 -8
- package/dist/tools/storedProcedureTools.d.ts +2 -0
- package/dist/tools/storedProcedureTools.js +10 -5
- package/dist/tools/transactionTools.d.ts +1 -0
- package/dist/tools/transactionTools.js +4 -2
- package/dist/tools/utilityTools.d.ts +1 -0
- package/dist/tools/utilityTools.js +4 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,141 @@ 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.4.13] - 2025-11-22
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Documentation restructuring** - Split comprehensive README.md into two files for better organization and maintainability
|
|
12
|
+
- **README.md (569 lines)** - Now focused on quick start, installation, configuration, and tool overview
|
|
13
|
+
- **DOCUMENTATIONS.md (1269 lines)** - Contains detailed documentation for all features including DDL operations, transactions, stored procedures, query logging, security, bulk operations, troubleshooting, and roadmap
|
|
14
|
+
- **Improved navigation** - Added clear reference in README.md pointing to DOCUMENTATIONS.md with table of contents
|
|
15
|
+
- **Better user experience** - Users can now quickly get started with README.md and deep dive into DOCUMENTATIONS.md when needed
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **DOCUMENTATIONS.md** - New comprehensive documentation file with detailed coverage of:
|
|
19
|
+
- DDL Operations (create, alter, drop tables)
|
|
20
|
+
- Data Export Tools (CSV export)
|
|
21
|
+
- Transaction Management (ACID transactions)
|
|
22
|
+
- Stored Procedures (create, execute, manage)
|
|
23
|
+
- Usage Examples (real-world scenarios)
|
|
24
|
+
- Query Logging & Automatic SQL Display
|
|
25
|
+
- Security Features and best practices
|
|
26
|
+
- Bulk Operations (high-performance batch processing)
|
|
27
|
+
- Troubleshooting guide
|
|
28
|
+
- License information
|
|
29
|
+
- Roadmap and future features
|
|
30
|
+
- **Table of Contents** - Added comprehensive table of contents in DOCUMENTATIONS.md for easy navigation
|
|
31
|
+
|
|
32
|
+
### Technical Changes
|
|
33
|
+
- README.md reduced from 1,787 lines to 568 lines (68% reduction)
|
|
34
|
+
- All detailed documentation moved to DOCUMENTATIONS.md (1,269 lines)
|
|
35
|
+
- DOCUMENTATIONS.md added to npm package files list for distribution
|
|
36
|
+
- Both documentation files are now included in the npm package
|
|
37
|
+
|
|
38
|
+
## [1.4.12] - 2025-11-21
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- **Explicit LLM instruction field** - Added `⚠️ IMPORTANT_INSTRUCTION_TO_ASSISTANT` field that explicitly instructs the LLM to always display SQL query information to users
|
|
42
|
+
- **Mandatory display directive** - Clear instruction stating "ALWAYS display the SQL query execution details below to the user in your response"
|
|
43
|
+
|
|
44
|
+
### Technical Changes
|
|
45
|
+
- Response now includes three fields in order:
|
|
46
|
+
1. `⚠️ IMPORTANT_INSTRUCTION_TO_ASSISTANT` - Direct instruction to the LLM
|
|
47
|
+
2. `⚠️ SQL_QUERY_EXECUTED` - The SQL query details
|
|
48
|
+
3. `📊 RESULTS` - The query results
|
|
49
|
+
- This approach ensures LLMs understand that SQL query information is not optional context
|
|
50
|
+
|
|
51
|
+
## [1.4.11] - 2025-11-21
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- **SQL query as data field (BREAKING)** - Restructured response to embed SQL query directly in the data JSON as `⚠️ SQL_QUERY_EXECUTED` field
|
|
55
|
+
- **Results wrapped** - Actual query results now under `📊 RESULTS` field
|
|
56
|
+
- **LLM-proof approach** - By making SQL query part of the data structure itself, LLMs cannot filter it out when describing results
|
|
57
|
+
|
|
58
|
+
### Technical Changes
|
|
59
|
+
- Response format changed from `{data: [...]}` to `{"⚠️ SQL_QUERY_EXECUTED": "...", "📊 RESULTS": [...]}`
|
|
60
|
+
- SQL query information is now a required part of the response structure, not optional metadata
|
|
61
|
+
- This forces AI assistants to acknowledge and communicate SQL query details to users
|
|
62
|
+
|
|
63
|
+
## [1.4.10] - 2025-11-21
|
|
64
|
+
|
|
65
|
+
### Improved
|
|
66
|
+
- **SQL query embedded in data structure** - SQL query is now embedded as a field in the response JSON, forcing LLMs to include it when describing results
|
|
67
|
+
- **Visual field names** - Using emoji-prefixed field names (`⚠️ SQL_QUERY_EXECUTED` and `📊 RESULTS`) to make SQL query information stand out
|
|
68
|
+
- **Guaranteed visibility** - By making SQL query part of the actual data structure instead of metadata, LLMs must process and describe it
|
|
69
|
+
|
|
70
|
+
### Technical Changes
|
|
71
|
+
- Changed response structure to wrap data in object with SQL query as a top-level field
|
|
72
|
+
- SQL query appears as `"⚠️ SQL_QUERY_EXECUTED"` field containing formatted query details
|
|
73
|
+
- Results appear as `"📊 RESULTS"` field containing the actual query results
|
|
74
|
+
- This approach treats SQL execution details as primary data, not optional metadata
|
|
75
|
+
- Forces LLMs to acknowledge and describe the SQL query when processing tool responses
|
|
76
|
+
|
|
77
|
+
## [1.4.9] - 2025-11-21
|
|
78
|
+
|
|
79
|
+
### Improved
|
|
80
|
+
- **Multi-block content response** - SQL query and results are now returned as separate MCP content blocks for better visibility in client UIs
|
|
81
|
+
- **Enhanced MCP client compatibility** - Completely redesigned query log output format for better rendering in Kilocode and other MCP clients
|
|
82
|
+
- **Visual query log hierarchy** - Added clear visual separators using box-drawing characters (━) for better readability
|
|
83
|
+
- **Prominent SQL display** - SQL queries are now displayed at the TOP of responses with clear emoji indicators (✅/❌)
|
|
84
|
+
- **Better information architecture** - Query execution details (time, timestamp, status) now prominently displayed before SQL
|
|
85
|
+
- **Improved emoji usage** - Added contextual emojis (📝 for SQL, 📋 for parameters, ⏱️ for time, 🕐 for timestamp) for quick visual scanning
|
|
86
|
+
- **Response structure optimization** - Query logs appear as FIRST content block, results as second block
|
|
87
|
+
- **Enhanced error visibility** - Error messages now include ❌ emoji for immediate identification
|
|
88
|
+
- **Explicit LLM instructions** - Added explicit notes instructing LLMs to display SQL query information to users
|
|
89
|
+
|
|
90
|
+
### Technical Changes
|
|
91
|
+
- **Breaking improvement**: Changed response structure from single text content to multiple content blocks (MCP spec compliant)
|
|
92
|
+
- First content block contains SQL query execution details
|
|
93
|
+
- Second content block contains query results
|
|
94
|
+
- Updated `QueryLogger.formatLogs()` with new visual hierarchy using Unicode box-drawing characters
|
|
95
|
+
- Modified `mcp-server.ts` response builder to use separate content blocks
|
|
96
|
+
- Added explicit user-facing notes to SQL query blocks
|
|
97
|
+
- Improved line spacing and formatting for better readability across different client UIs
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
- Query logs now render properly in Kilocode without markdown parsing issues
|
|
101
|
+
- SQL query information is structurally separated from results for better LLM and UI handling
|
|
102
|
+
- Visual hierarchy prevents information from being buried in JSON output
|
|
103
|
+
|
|
104
|
+
## [1.4.8] - 2025-11-21
|
|
105
|
+
|
|
106
|
+
### Added
|
|
107
|
+
- **Enhanced human-readable SQL query formatting** - All SQL queries in logs are now automatically formatted with proper line breaks, indentation, and structure for better readability
|
|
108
|
+
- **Markdown-friendly query logs** - Query logs use markdown syntax (###, ```, **bold**, ---) for optimal rendering in AI agent UIs
|
|
109
|
+
- **SQL syntax highlighting** - SQL queries wrapped in ```sql code blocks for syntax highlighting support
|
|
110
|
+
- **Formatted parameter display** - Query parameters now displayed with JSON pretty-printing for better readability
|
|
111
|
+
- **Universal query logging** - Extended query log output to ALL 30 tools (previously only available in query and CRUD operations)
|
|
112
|
+
- **Structured log separators** - Added markdown horizontal rules (---) to clearly delineate query sections
|
|
113
|
+
|
|
114
|
+
### Enhanced Tools with Query Logging
|
|
115
|
+
- ✅ Database Discovery: `list_databases`, `list_tables`, `read_table_schema`, `get_table_relationships`
|
|
116
|
+
- ✅ DDL Operations: `create_table`, `alter_table`, `drop_table`, `execute_ddl`
|
|
117
|
+
- ✅ Transaction Management: `execute_in_transaction`
|
|
118
|
+
- ✅ Stored Procedures: `list_stored_procedures`, `get_stored_procedure_info`, `execute_stored_procedure`, `create_stored_procedure`, `drop_stored_procedure`, `show_create_procedure`
|
|
119
|
+
- ✅ Data Export: `export_table_to_csv`, `export_query_to_csv`
|
|
120
|
+
- ✅ Utilities: `get_table_relationships`
|
|
121
|
+
|
|
122
|
+
### Technical Changes
|
|
123
|
+
- Enhanced `QueryLogger.formatSQL()` method for intelligent SQL formatting with keyword detection and line breaking
|
|
124
|
+
- Added `formatLogs()` method with visual enhancements replacing previous compact format
|
|
125
|
+
- Retained `formatLogsCompact()` for backward compatibility
|
|
126
|
+
- Updated return type signatures for all 30 tools to include `queryLog?: string`
|
|
127
|
+
- Improved query log output consistency across all tool categories
|
|
128
|
+
- **Fixed MCP server handler** - Query logs are now properly included in LLM responses (previously only data was forwarded)
|
|
129
|
+
- Added visual separator header "📝 SQL QUERY LOG" in MCP responses for better readability
|
|
130
|
+
|
|
131
|
+
### Fixed
|
|
132
|
+
- **Critical: Query logs now visible to AI agents** - Fixed MCP server handler to properly forward `queryLog` field to LLM responses
|
|
133
|
+
- Query logs now appear in both success and error responses
|
|
134
|
+
|
|
135
|
+
### Improved
|
|
136
|
+
- **SQL readability** - Complex queries with multiple columns, JOINs, and conditions are now formatted for easy reading
|
|
137
|
+
- **UI rendering** - Switched from Unicode box characters to markdown for better compatibility with AI agent interfaces (Kilocode, Claude Desktop, etc.)
|
|
138
|
+
- **Developer experience** - Logs are now optimized for human consumption with markdown formatting that renders beautifully in chat interfaces
|
|
139
|
+
- **Debugging efficiency** - Clean markdown structure makes it faster to identify query patterns and issues
|
|
140
|
+
- **Documentation** - Comprehensive README updates with markdown-friendly examples of the new query log format
|
|
141
|
+
- **Error transparency** - Failed queries now also show the SQL that was attempted with proper formatting
|
|
142
|
+
|
|
8
143
|
## [1.4.7] - 2025-11-21
|
|
9
144
|
|
|
10
145
|
### Added
|