@berthojoris/mcp-mysql-server 1.43.0 → 1.43.2
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 +4 -2
- package/README.md +3 -1
- package/bin/mcp-mysql.js +9 -5
- package/dist/mcp-server.js +1 -1
- package/dist/tools/databaseTools.js +1 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ 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.43.2] - 2026-07-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Version bump to `1.43.2` for npm publish.
|
|
12
|
+
- Synchronized version across `package.json`, `src/mcp-server.ts`, `DOCUMENTATIONS.md`, `README.md`, and `manifest.json`.
|
|
13
|
+
|
|
14
|
+
## [1.43.1] - 2026-05-26
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- **URL-encoded credentials in MySQL connection strings** (#4): authentication failed when the username or password contained URL-encoded special characters (e.g. `@` → `%40`, `:` → `%3A`).
|
|
18
|
+
- Both `url.username` and `url.password` are now passed through `decodeURIComponent()` before being handed to the MySQL client.
|
|
19
|
+
- The decoding is also applied when only one of the two is set (e.g. `mysql://:p%40ss%3Aw0rd@host/db` or `mysql://us%40er@host/db`), which previously bypassed decoding entirely.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- Synchronized version to `1.43.1` across `package.json`, `src/mcp-server.ts`, `DOCUMENTATIONS.md`, and `README.md`.
|
|
23
|
+
|
|
8
24
|
## [1.43.0] - 2026-05-25
|
|
9
25
|
|
|
10
26
|
### Added
|
package/DOCUMENTATIONS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MySQL MCP Server - Documentation
|
|
2
2
|
|
|
3
|
-
**Last Updated:** 2026-
|
|
4
|
-
**Version:** 1.43.
|
|
3
|
+
**Last Updated:** 2026-07-23 05:00:00
|
|
4
|
+
**Version:** 1.43.2
|
|
5
5
|
**Total Tools:** 88
|
|
6
6
|
|
|
7
7
|
Comprehensive documentation for the MySQL MCP Server. For quick start, see [README.md](README.md).
|
|
@@ -47,6 +47,8 @@ Configure MySQL MCP with two access-control layers:
|
|
|
47
47
|
**Layer 1 (Permissions)**: Broad operation control
|
|
48
48
|
**Layer 2 (Categories)**: Fine-grained tool filtering
|
|
49
49
|
|
|
50
|
+
> **Credentials with special characters**: if the username or password in the connection string contains URL-reserved characters (`@`, `:`, `/`, `?`, `#`, `%`, `&`, etc.), URL-encode them — e.g. the password `p@ss:w0rd` becomes `p%40ss%3Aw0rd`, giving `mysql://user:p%40ss%3Aw0rd@host:3306/db`. The server passes both the username and password through `decodeURIComponent()` before connecting, including when only one of the two is set.
|
|
51
|
+
|
|
50
52
|
### Environment Variables
|
|
51
53
|
|
|
52
54
|
```json
|
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-07-23 05: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)
|
|
@@ -66,6 +66,8 @@ npm install -g @berthojoris/mcp-mysql-server
|
|
|
66
66
|
mcp-mysql mysql://user:pass@localhost:3306/db "list,read,utility"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
> **Credentials with special characters**: if your username or password contains characters that have a special meaning in URLs (`@`, `:`, `/`, `?`, `#`, `%`, `&`, etc.), URL-encode them before putting them in the connection string. For example, the password `p@ss:w0rd` becomes `p%40ss%3Aw0rd`, giving `mysql://user:p%40ss%3Aw0rd@host:3306/db`. The server decodes both the username and password before connecting.
|
|
70
|
+
|
|
69
71
|
---
|
|
70
72
|
|
|
71
73
|
## Quick Start
|
package/bin/mcp-mysql.js
CHANGED
|
@@ -95,11 +95,15 @@ try {
|
|
|
95
95
|
// Remove leading slash from pathname and make database optional
|
|
96
96
|
database = url.pathname.replace(/^\//, "") || null;
|
|
97
97
|
|
|
98
|
-
// Extract username and password from auth
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
// Extract username and password from auth.
|
|
99
|
+
// Both fields may be URL-encoded (e.g. "@" -> "%40"), so always decode
|
|
100
|
+
// whatever the URL parser hands us, including when only one side is set.
|
|
101
|
+
const decodeAuthField = (value) =>
|
|
102
|
+
value ? decodeURIComponent(value) : value;
|
|
103
|
+
const auth = {
|
|
104
|
+
user: decodeAuthField(url.username) || "root",
|
|
105
|
+
password: decodeAuthField(url.password) || "",
|
|
106
|
+
};
|
|
103
107
|
|
|
104
108
|
connectionConfig = {
|
|
105
109
|
host: url.hostname,
|
package/dist/mcp-server.js
CHANGED
|
@@ -18,7 +18,7 @@ const toolArgumentValidation_js_1 = require("./tools/toolArgumentValidation.js")
|
|
|
18
18
|
const permissions = process.env.MCP_PERMISSIONS || process.env.MCP_CONFIG || "";
|
|
19
19
|
const categories = process.env.MCP_CATEGORIES || "";
|
|
20
20
|
const SERVER_NAME = "mysql-mcp-server";
|
|
21
|
-
const SERVER_VERSION = "1.43.
|
|
21
|
+
const SERVER_VERSION = "1.43.2";
|
|
22
22
|
// Declare the MySQL MCP instance (will be initialized in main())
|
|
23
23
|
let mysqlMCP;
|
|
24
24
|
// Define all available tools with their schemas
|
package/manifest.json
CHANGED
package/package.json
CHANGED