@berthojoris/mcp-mysql-server 1.0.0 → 1.0.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/README.md +28 -31
- package/bin/mcp-mysql.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A fully-featured **Model Context Protocol (MCP)** server for MySQL database integration with AI agents like Claude Desktop, Cline, Windsurf, and other MCP-compatible tools.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
---
|
|
@@ -28,22 +28,13 @@ A fully-featured **Model Context Protocol (MCP)** server for MySQL database inte
|
|
|
28
28
|
No installation needed! Use directly with npx:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npx @
|
|
31
|
+
npx @berthojoris/mcp-mysql-server mysql://user:pass@localhost:3306/db "list,read,utility"
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
### Option 2:
|
|
34
|
+
### Option 2: Global Installation
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
|
|
38
|
-
cd mcp_mysql
|
|
39
|
-
npm install
|
|
40
|
-
npm run build
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Option 3: Global Installation
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm install -g @modelcontextprotocol/server-mysql
|
|
37
|
+
npm install -g @berthojoris/mcp-mysql-server
|
|
47
38
|
mcp-mysql mysql://user:pass@localhost:3306/db "list,read,utility"
|
|
48
39
|
```
|
|
49
40
|
|
|
@@ -80,15 +71,16 @@ npm run build
|
|
|
80
71
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
81
72
|
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
82
73
|
|
|
83
|
-
**Configuration:**
|
|
74
|
+
**Configuration (using npx - recommended):**
|
|
84
75
|
|
|
85
76
|
```json
|
|
86
77
|
{
|
|
87
78
|
"mcpServers": {
|
|
88
79
|
"mysql": {
|
|
89
|
-
"command": "
|
|
80
|
+
"command": "npx",
|
|
90
81
|
"args": [
|
|
91
|
-
"
|
|
82
|
+
"-y",
|
|
83
|
+
"@berthojoris/mcp-mysql-server",
|
|
92
84
|
"mysql://user:password@localhost:3306/database",
|
|
93
85
|
"list,read,utility"
|
|
94
86
|
]
|
|
@@ -97,16 +89,15 @@ npm run build
|
|
|
97
89
|
}
|
|
98
90
|
```
|
|
99
91
|
|
|
100
|
-
**
|
|
92
|
+
**Alternative: Local development (if you cloned the repository):**
|
|
101
93
|
|
|
102
94
|
```json
|
|
103
95
|
{
|
|
104
96
|
"mcpServers": {
|
|
105
97
|
"mysql": {
|
|
106
|
-
"command": "
|
|
98
|
+
"command": "node",
|
|
107
99
|
"args": [
|
|
108
|
-
"-
|
|
109
|
-
"@modelcontextprotocol/server-mysql",
|
|
100
|
+
"C:\\path\\to\\mysql-mcp\\bin\\mcp-mysql.js",
|
|
110
101
|
"mysql://user:password@localhost:3306/database",
|
|
111
102
|
"list,read,utility"
|
|
112
103
|
]
|
|
@@ -276,17 +267,19 @@ You can have different databases with different permissions in the same AI agent
|
|
|
276
267
|
{
|
|
277
268
|
"mcpServers": {
|
|
278
269
|
"mysql-prod": {
|
|
279
|
-
"command": "
|
|
270
|
+
"command": "npx",
|
|
280
271
|
"args": [
|
|
281
|
-
"
|
|
272
|
+
"-y",
|
|
273
|
+
"@berthojoris/mcp-mysql-server",
|
|
282
274
|
"mysql://reader:pass@prod-server:3306/prod_db",
|
|
283
275
|
"list,read,utility"
|
|
284
276
|
]
|
|
285
277
|
},
|
|
286
278
|
"mysql-dev": {
|
|
287
|
-
"command": "
|
|
279
|
+
"command": "npx",
|
|
288
280
|
"args": [
|
|
289
|
-
"
|
|
281
|
+
"-y",
|
|
282
|
+
"@berthojoris/mcp-mysql-server",
|
|
290
283
|
"mysql://root:pass@localhost:3306/dev_db",
|
|
291
284
|
"list,read,create,update,delete,execute,ddl,utility"
|
|
292
285
|
]
|
|
@@ -907,7 +900,10 @@ curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
|
|
|
907
900
|
### Test MCP Server Locally
|
|
908
901
|
|
|
909
902
|
```bash
|
|
910
|
-
# Test connection
|
|
903
|
+
# Test connection using npx (recommended)
|
|
904
|
+
npx -y @berthojoris/mcp-mysql-server mysql://user:pass@localhost:3306/test "list,read,utility"
|
|
905
|
+
|
|
906
|
+
# Or if you cloned the repository locally
|
|
911
907
|
node bin/mcp-mysql.js mysql://user:pass@localhost:3306/test "list,read,utility"
|
|
912
908
|
```
|
|
913
909
|
|
|
@@ -941,7 +937,7 @@ To make your MCP server available to the world:
|
|
|
941
937
|
"author": "Your Name <your.email@example.com>",
|
|
942
938
|
"repository": {
|
|
943
939
|
"type": "git",
|
|
944
|
-
"url": "https://github.com/
|
|
940
|
+
"url": "https://github.com/berthojoris/mysql-mcp.git"
|
|
945
941
|
}
|
|
946
942
|
}
|
|
947
943
|
```
|
|
@@ -979,8 +975,9 @@ npx @your-username/mcp-mysql mysql://user:pass@localhost:3306/db "list,read,util
|
|
|
979
975
|
**Solutions:**
|
|
980
976
|
1. Check config file path is correct
|
|
981
977
|
2. Restart AI agent completely
|
|
982
|
-
3. Verify
|
|
983
|
-
4.
|
|
978
|
+
3. If using npx: Verify internet connection for package download
|
|
979
|
+
4. If using local files: Verify bin/mcp-mysql.js exists
|
|
980
|
+
5. Check for JSON syntax errors
|
|
984
981
|
|
|
985
982
|
**Problem:** Connection fails
|
|
986
983
|
|
|
@@ -1028,7 +1025,7 @@ FLUSH PRIVILEGES;
|
|
|
1028
1025
|
### Project Structure
|
|
1029
1026
|
|
|
1030
1027
|
```
|
|
1031
|
-
|
|
1028
|
+
mysql-mcp/
|
|
1032
1029
|
├── src/
|
|
1033
1030
|
│ ├── config/ # Configuration and permissions
|
|
1034
1031
|
│ ├── db/ # Database connection
|
|
@@ -1103,8 +1100,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
1103
1100
|
|
|
1104
1101
|
## 💬 Support
|
|
1105
1102
|
|
|
1106
|
-
- **Issues:** [GitHub Issues](https://github.com/
|
|
1107
|
-
- **Discussions:** [GitHub Discussions](https://github.com/
|
|
1103
|
+
- **Issues:** [GitHub Issues](https://github.com/berthojoris/mysql-mcp/issues)
|
|
1104
|
+
- **Discussions:** [GitHub Discussions](https://github.com/berthojoris/mysql-mcp/discussions)
|
|
1108
1105
|
- **Documentation:** This README
|
|
1109
1106
|
|
|
1110
1107
|
---
|
package/bin/mcp-mysql.js
CHANGED
|
@@ -60,7 +60,7 @@ try {
|
|
|
60
60
|
|
|
61
61
|
} catch (error) {
|
|
62
62
|
console.error('Error parsing MySQL URL:', error.message);
|
|
63
|
-
console.error('Usage: npx @
|
|
63
|
+
console.error('Usage: npx @berthojoris/mcp-mysql-server mysql://user:password@host:port/dbname');
|
|
64
64
|
process.exit(1);
|
|
65
65
|
}
|
|
66
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@berthojoris/mcp-mysql-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Model Context Protocol server for MySQL database integration with dynamic per-project permissions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"mysql-client",
|
|
36
36
|
"ai-tools"
|
|
37
37
|
],
|
|
38
|
-
"author": "
|
|
38
|
+
"author": "Bertho Joris <berthojoris@gmail.com>",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/berthojoris/mysql-mcp.git"
|
|
43
43
|
},
|
|
44
44
|
"bugs": {
|
|
45
|
-
"url": "https://github.com/
|
|
45
|
+
"url": "https://github.com/berthojoris/mysql-mcp/issues"
|
|
46
46
|
},
|
|
47
|
-
"homepage": "https://github.com/
|
|
47
|
+
"homepage": "https://github.com/berthojoris/mysql-mcp#readme",
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|
|
50
50
|
"bin",
|