@berthojoris/mcp-mysql-server 1.0.0 → 1.0.1
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 +29 -23
- 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,14 +28,14 @@ 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
34
|
### Option 2: Clone and Build
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
git clone
|
|
38
|
-
cd
|
|
37
|
+
git clone https://github.com/berthojoris/mysql-mcp.git
|
|
38
|
+
cd mysql-mcp
|
|
39
39
|
npm install
|
|
40
40
|
npm run build
|
|
41
41
|
```
|
|
@@ -43,7 +43,7 @@ npm run build
|
|
|
43
43
|
### Option 3: Global Installation
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npm install -g @
|
|
46
|
+
npm install -g @berthojoris/mcp-mysql-server
|
|
47
47
|
mcp-mysql mysql://user:pass@localhost:3306/db "list,read,utility"
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -80,15 +80,16 @@ npm run build
|
|
|
80
80
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
81
81
|
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
82
82
|
|
|
83
|
-
**Configuration:**
|
|
83
|
+
**Configuration (using npx - recommended):**
|
|
84
84
|
|
|
85
85
|
```json
|
|
86
86
|
{
|
|
87
87
|
"mcpServers": {
|
|
88
88
|
"mysql": {
|
|
89
|
-
"command": "
|
|
89
|
+
"command": "npx",
|
|
90
90
|
"args": [
|
|
91
|
-
"
|
|
91
|
+
"-y",
|
|
92
|
+
"@berthojoris/mcp-mysql-server",
|
|
92
93
|
"mysql://user:password@localhost:3306/database",
|
|
93
94
|
"list,read,utility"
|
|
94
95
|
]
|
|
@@ -97,16 +98,15 @@ npm run build
|
|
|
97
98
|
}
|
|
98
99
|
```
|
|
99
100
|
|
|
100
|
-
**
|
|
101
|
+
**Alternative: Local development (if you cloned the repository):**
|
|
101
102
|
|
|
102
103
|
```json
|
|
103
104
|
{
|
|
104
105
|
"mcpServers": {
|
|
105
106
|
"mysql": {
|
|
106
|
-
"command": "
|
|
107
|
+
"command": "node",
|
|
107
108
|
"args": [
|
|
108
|
-
"-
|
|
109
|
-
"@modelcontextprotocol/server-mysql",
|
|
109
|
+
"C:\\path\\to\\mysql-mcp\\bin\\mcp-mysql.js",
|
|
110
110
|
"mysql://user:password@localhost:3306/database",
|
|
111
111
|
"list,read,utility"
|
|
112
112
|
]
|
|
@@ -276,17 +276,19 @@ You can have different databases with different permissions in the same AI agent
|
|
|
276
276
|
{
|
|
277
277
|
"mcpServers": {
|
|
278
278
|
"mysql-prod": {
|
|
279
|
-
"command": "
|
|
279
|
+
"command": "npx",
|
|
280
280
|
"args": [
|
|
281
|
-
"
|
|
281
|
+
"-y",
|
|
282
|
+
"@berthojoris/mcp-mysql-server",
|
|
282
283
|
"mysql://reader:pass@prod-server:3306/prod_db",
|
|
283
284
|
"list,read,utility"
|
|
284
285
|
]
|
|
285
286
|
},
|
|
286
287
|
"mysql-dev": {
|
|
287
|
-
"command": "
|
|
288
|
+
"command": "npx",
|
|
288
289
|
"args": [
|
|
289
|
-
"
|
|
290
|
+
"-y",
|
|
291
|
+
"@berthojoris/mcp-mysql-server",
|
|
290
292
|
"mysql://root:pass@localhost:3306/dev_db",
|
|
291
293
|
"list,read,create,update,delete,execute,ddl,utility"
|
|
292
294
|
]
|
|
@@ -907,7 +909,10 @@ curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
|
|
|
907
909
|
### Test MCP Server Locally
|
|
908
910
|
|
|
909
911
|
```bash
|
|
910
|
-
# Test connection
|
|
912
|
+
# Test connection using npx (recommended)
|
|
913
|
+
npx -y @berthojoris/mcp-mysql-server mysql://user:pass@localhost:3306/test "list,read,utility"
|
|
914
|
+
|
|
915
|
+
# Or if you cloned the repository locally
|
|
911
916
|
node bin/mcp-mysql.js mysql://user:pass@localhost:3306/test "list,read,utility"
|
|
912
917
|
```
|
|
913
918
|
|
|
@@ -941,7 +946,7 @@ To make your MCP server available to the world:
|
|
|
941
946
|
"author": "Your Name <your.email@example.com>",
|
|
942
947
|
"repository": {
|
|
943
948
|
"type": "git",
|
|
944
|
-
"url": "https://github.com/
|
|
949
|
+
"url": "https://github.com/berthojoris/mysql-mcp.git"
|
|
945
950
|
}
|
|
946
951
|
}
|
|
947
952
|
```
|
|
@@ -979,8 +984,9 @@ npx @your-username/mcp-mysql mysql://user:pass@localhost:3306/db "list,read,util
|
|
|
979
984
|
**Solutions:**
|
|
980
985
|
1. Check config file path is correct
|
|
981
986
|
2. Restart AI agent completely
|
|
982
|
-
3. Verify
|
|
983
|
-
4.
|
|
987
|
+
3. If using npx: Verify internet connection for package download
|
|
988
|
+
4. If using local files: Verify bin/mcp-mysql.js exists
|
|
989
|
+
5. Check for JSON syntax errors
|
|
984
990
|
|
|
985
991
|
**Problem:** Connection fails
|
|
986
992
|
|
|
@@ -1028,7 +1034,7 @@ FLUSH PRIVILEGES;
|
|
|
1028
1034
|
### Project Structure
|
|
1029
1035
|
|
|
1030
1036
|
```
|
|
1031
|
-
|
|
1037
|
+
mysql-mcp/
|
|
1032
1038
|
├── src/
|
|
1033
1039
|
│ ├── config/ # Configuration and permissions
|
|
1034
1040
|
│ ├── db/ # Database connection
|
|
@@ -1103,8 +1109,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
1103
1109
|
|
|
1104
1110
|
## 💬 Support
|
|
1105
1111
|
|
|
1106
|
-
- **Issues:** [GitHub Issues](https://github.com/
|
|
1107
|
-
- **Discussions:** [GitHub Discussions](https://github.com/
|
|
1112
|
+
- **Issues:** [GitHub Issues](https://github.com/berthojoris/mysql-mcp/issues)
|
|
1113
|
+
- **Discussions:** [GitHub Discussions](https://github.com/berthojoris/mysql-mcp/discussions)
|
|
1108
1114
|
- **Documentation:** This README
|
|
1109
1115
|
|
|
1110
1116
|
---
|
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.1",
|
|
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",
|