@berthojoris/mcp-mysql-server 1.33.2 → 1.33.3

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,13 @@ 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.33.3] - 2026-01-24
9
+
10
+ ### Fixed
11
+ - Fixed `undefined` error in `read_records` and other CRUD tools when validation fails or unexpected errors occur.
12
+ - Improved error handling in `CrudTools` to safely handle non-Error exceptions.
13
+ - Consolidated validation logic to use enhanced `inputValidation` functions for better error reporting.
14
+
8
15
  ## [1.33.2] - 2025-12-27
9
16
 
10
17
  ### Fixed
package/DOCUMENTATIONS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MySQL MCP Server - Documentation
2
2
 
3
- **Last Updated:** 2025-12-27 03:00:42
4
- **Version:** 1.33.2
3
+ **Last Updated:** 2026-01-24 10:00:00
4
+ **Version:** 1.33.3
5
5
  **Total Tools:** 150
6
6
 
7
7
  Comprehensive documentation for the MySQL MCP Server. For quick start, see [README.md](README.md).
package/README.md CHANGED
@@ -4,10 +4,10 @@
4
4
 
5
5
  **A production-ready Model Context Protocol (MCP) server for MySQL database integration with AI agents**
6
6
 
7
- **Last Updated:** 2025-12-27 03:00:42
7
+ **Last Updated:** 2026-01-24 10:00:00
8
8
 
9
- [![npm version](https://img.shields.io/npm/v/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mysql-mcp)
10
- [![npm downloads](https://img.shields.io/npm/dm/@berthojoris/mysql-mcp)](https://www.npmjs.com/package/@berthojoris/mysql-mcp)
9
+ [![npm version](https://img.shields.io/npm/v/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
11
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
13
13
  [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)
@@ -17,10 +17,11 @@ class CrudTools {
17
17
  */
18
18
  async createRecord(params) {
19
19
  // Validate input schema
20
- if (!(0, schemas_1.validateCreateRecord)(params)) {
20
+ const validation = (0, inputValidation_1.validateCreateRecord)(params);
21
+ if (!validation.valid) {
21
22
  return {
22
23
  status: "error",
23
- error: "Invalid parameters: " + JSON.stringify(schemas_1.validateCreateRecord.errors),
24
+ error: "Invalid parameters: " + (validation.errors?.join(", ") || "Unknown validation error"),
24
25
  };
25
26
  }
26
27
  try {
@@ -86,7 +87,7 @@ class CrudTools {
86
87
  catch (error) {
87
88
  return {
88
89
  status: "error",
89
- error: error.message,
90
+ error: error instanceof Error ? error.message : String(error),
90
91
  };
91
92
  }
92
93
  }
@@ -95,10 +96,11 @@ class CrudTools {
95
96
  */
96
97
  async readRecords(params) {
97
98
  // Validate input schema
98
- if (!(0, schemas_1.validateReadRecords)(params)) {
99
+ const validation = (0, inputValidation_1.validateReadRecords)(params);
100
+ if (!validation.valid) {
99
101
  return {
100
102
  status: "error",
101
- error: "Invalid parameters: " + JSON.stringify(schemas_1.validateReadRecords.errors),
103
+ error: "Invalid parameters: " + (validation.errors?.join(", ") || "Unknown validation error"),
102
104
  };
103
105
  }
104
106
  try {
@@ -236,7 +238,7 @@ class CrudTools {
236
238
  catch (error) {
237
239
  return {
238
240
  status: "error",
239
- error: error.message,
241
+ error: error instanceof Error ? error.message : String(error),
240
242
  };
241
243
  }
242
244
  }
@@ -245,10 +247,11 @@ class CrudTools {
245
247
  */
246
248
  async updateRecord(params) {
247
249
  // Validate input schema
248
- if (!(0, schemas_1.validateUpdateRecord)(params)) {
250
+ const validation = (0, inputValidation_1.validateUpdateRecord)(params);
251
+ if (!validation.valid) {
249
252
  return {
250
253
  status: "error",
251
- error: "Invalid parameters: " + JSON.stringify(schemas_1.validateUpdateRecord.errors),
254
+ error: "Invalid parameters: " + (validation.errors?.join(", ") || "Unknown validation error"),
252
255
  };
253
256
  }
254
257
  try {
@@ -378,7 +381,7 @@ class CrudTools {
378
381
  catch (error) {
379
382
  return {
380
383
  status: "error",
381
- error: error.message,
384
+ error: error instanceof Error ? error.message : String(error),
382
385
  };
383
386
  }
384
387
  }
@@ -387,10 +390,11 @@ class CrudTools {
387
390
  */
388
391
  async deleteRecord(params) {
389
392
  // Validate input schema
390
- if (!(0, schemas_1.validateDeleteRecord)(params)) {
393
+ const validation = (0, inputValidation_1.validateDeleteRecord)(params);
394
+ if (!validation.valid) {
391
395
  return {
392
396
  status: "error",
393
- error: "Invalid parameters: " + JSON.stringify(schemas_1.validateDeleteRecord.errors),
397
+ error: "Invalid parameters: " + (validation.errors?.join(", ") || "Unknown validation error"),
394
398
  };
395
399
  }
396
400
  try {
@@ -502,7 +506,7 @@ class CrudTools {
502
506
  catch (error) {
503
507
  return {
504
508
  status: "error",
505
- error: error.message,
509
+ error: error instanceof Error ? error.message : String(error),
506
510
  };
507
511
  }
508
512
  }
@@ -511,10 +515,11 @@ class CrudTools {
511
515
  */
512
516
  async bulkInsert(params) {
513
517
  // Validate input schema
514
- if (!(0, schemas_1.validateBulkInsert)(params)) {
518
+ const validation = (0, inputValidation_1.validateBulkInsert)(params);
519
+ if (!validation.valid) {
515
520
  return {
516
521
  status: "error",
517
- error: "Invalid parameters: " + JSON.stringify(schemas_1.validateBulkInsert.errors),
522
+ error: "Invalid parameters: " + (validation.errors?.join(", ") || "Unknown validation error"),
518
523
  };
519
524
  }
520
525
  try {
@@ -627,7 +632,7 @@ class CrudTools {
627
632
  catch (error) {
628
633
  return {
629
634
  status: "error",
630
- error: error.message,
635
+ error: error instanceof Error ? error.message : String(error),
631
636
  };
632
637
  }
633
638
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@berthojoris/mcp-mysql-server",
3
- "version": "1.33.2",
3
+ "version": "1.33.3",
4
4
  "description": "Model Context Protocol server for MySQL database integration with dynamic per-project permissions, backup/restore, data import/export, and data migration capabilities",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",