@praise25/mcp-server-mysql 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 +21 -21
- package/dist/src/config/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,13 +29,13 @@ A Model Context Protocol server that provides access to MySQL databases. This se
|
|
|
29
29
|
|
|
30
30
|
## Installation
|
|
31
31
|
|
|
32
|
-
There are several ways to install and configure the MCP server but the most common would be checking this website https://smithery.ai/server/@
|
|
32
|
+
There are several ways to install and configure the MCP server but the most common would be checking this website https://smithery.ai/server/@praise25/mcp-server-mysql
|
|
33
33
|
|
|
34
34
|
### Cursor
|
|
35
35
|
|
|
36
36
|
For Cursor IDE, you can install this MCP server with the following command in your project:
|
|
37
37
|
|
|
38
|
-
1. Visit https://smithery.ai/server/@
|
|
38
|
+
1. Visit https://smithery.ai/server/@praise25/mcp-server-mysql
|
|
39
39
|
2. Follow the instruction for Cursor
|
|
40
40
|
|
|
41
41
|
|
|
@@ -60,10 +60,10 @@ This will show an interactive dialog where you can select your `mcp_server_mysql
|
|
|
60
60
|
First, install the package globally:
|
|
61
61
|
```bash
|
|
62
62
|
# Using npm
|
|
63
|
-
npm install -g @
|
|
63
|
+
npm install -g @praise25/mcp-server-mysql
|
|
64
64
|
|
|
65
65
|
# Using pnpm
|
|
66
|
-
pnpm add -g @
|
|
66
|
+
pnpm add -g @praise25/mcp-server-mysql
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Then add the server to Claude Code:
|
|
@@ -77,7 +77,7 @@ claude mcp add mcp_server_mysql \
|
|
|
77
77
|
-e ALLOW_INSERT_OPERATION="false" \
|
|
78
78
|
-e ALLOW_UPDATE_OPERATION="false" \
|
|
79
79
|
-e ALLOW_DELETE_OPERATION="false" \
|
|
80
|
-
-- npx @
|
|
80
|
+
-- npx @praise25/mcp-server-mysql
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
**Using Local Repository (for development):**
|
|
@@ -115,7 +115,7 @@ claude mcp add mcp_server_mysql \
|
|
|
115
115
|
-e ALLOW_INSERT_OPERATION="false" \
|
|
116
116
|
-e ALLOW_UPDATE_OPERATION="false" \
|
|
117
117
|
-e ALLOW_DELETE_OPERATION="false" \
|
|
118
|
-
-- npx @
|
|
118
|
+
-- npx @praise25/mcp-server-mysql
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
#### Choosing the Right Scope
|
|
@@ -161,7 +161,7 @@ claude mcp add mcp_server_mysql_multi \
|
|
|
161
161
|
-e MYSQL_USER="root" \
|
|
162
162
|
-e MYSQL_PASS="your_password" \
|
|
163
163
|
-e MULTI_DB_WRITE_MODE="false" \
|
|
164
|
-
-- npx @
|
|
164
|
+
-- npx @praise25/mcp-server-mysql
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
#### Advanced Configuration
|
|
@@ -184,7 +184,7 @@ claude mcp add mcp_server_mysql \
|
|
|
184
184
|
-e ALLOW_UPDATE_OPERATION="false" \
|
|
185
185
|
-e ALLOW_DELETE_OPERATION="false" \
|
|
186
186
|
-e MYSQL_ENABLE_LOGGING="true" \
|
|
187
|
-
-- npx @
|
|
187
|
+
-- npx @praise25/mcp-server-mysql
|
|
188
188
|
```
|
|
189
189
|
|
|
190
190
|
#### Troubleshooting Claude Code Setup
|
|
@@ -208,7 +208,7 @@ claude mcp add mcp_server_mysql \
|
|
|
208
208
|
4. **Server Not Starting**: Check Claude Code logs or run the server directly to debug:
|
|
209
209
|
```bash
|
|
210
210
|
# Test the server directly
|
|
211
|
-
npx @
|
|
211
|
+
npx @praise25/mcp-server-mysql
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
### Using NPM/PNPM
|
|
@@ -217,10 +217,10 @@ For manual installation:
|
|
|
217
217
|
|
|
218
218
|
```bash
|
|
219
219
|
# Using npm
|
|
220
|
-
npm install -g @
|
|
220
|
+
npm install -g @praise25/mcp-server-mysql
|
|
221
221
|
|
|
222
222
|
# Using pnpm
|
|
223
|
-
pnpm add -g @
|
|
223
|
+
pnpm add -g @praise25/mcp-server-mysql
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
After manual installation, you'll need to configure your LLM application to use the MCP server (see Configuration section below).
|
|
@@ -231,7 +231,7 @@ If you want to clone and run this MCP server directly from the source code, foll
|
|
|
231
231
|
|
|
232
232
|
1. **Clone the repository**
|
|
233
233
|
```bash
|
|
234
|
-
git clone https://github.com/
|
|
234
|
+
git clone https://github.com/SteveFunso/mcp-server-mysql.git
|
|
235
235
|
cd mcp-server-mysql
|
|
236
236
|
```
|
|
237
237
|
|
|
@@ -293,13 +293,13 @@ If you want to clone and run this MCP server directly from the source code, foll
|
|
|
293
293
|
|
|
294
294
|
### Run in remote mode
|
|
295
295
|
|
|
296
|
-
To run in remote mode, you'll need to provide [environment variables](https://github.com/
|
|
296
|
+
To run in remote mode, you'll need to provide [environment variables](https://github.com/SteveFunso/mcp-server-mysql?tab=readme-ov-file#environment-variables) to the npx script.
|
|
297
297
|
1. Create env file in preferred directory
|
|
298
298
|
```bash
|
|
299
299
|
# create .env file
|
|
300
300
|
touch .env
|
|
301
301
|
```
|
|
302
|
-
2. Copy-paste [example file](https://github.com/
|
|
302
|
+
2. Copy-paste [example file](https://github.com/SteveFunso/mcp-server-mysql/blob/main/.env) from this repository
|
|
303
303
|
3. Set the MySQL credentials to match your environment
|
|
304
304
|
4. Set `IS_REMOTE_MCP=true`
|
|
305
305
|
5. Set `REMOTE_SECRET_KEY` to a secure string.
|
|
@@ -310,7 +310,7 @@ To run in remote mode, you'll need to provide [environment variables](https://gi
|
|
|
310
310
|
```
|
|
311
311
|
8. Run the server
|
|
312
312
|
```bash
|
|
313
|
-
npx @
|
|
313
|
+
npx @praise25/mcp-server-mysql
|
|
314
314
|
```
|
|
315
315
|
9. Configure your agent to connect to the MCP with the next configuration:
|
|
316
316
|
```json
|
|
@@ -388,7 +388,7 @@ The server provides comprehensive database information:
|
|
|
388
388
|
If you installed using Smithery, your configuration is already set up. You can view or modify it with:
|
|
389
389
|
|
|
390
390
|
```bash
|
|
391
|
-
smithery configure @
|
|
391
|
+
smithery configure @praise25/mcp-server-mysql
|
|
392
392
|
```
|
|
393
393
|
|
|
394
394
|
When reconfiguring, you can update any of the MySQL connection details as well as the write operation settings:
|
|
@@ -414,7 +414,7 @@ For more control over the MCP server's behavior, you can use these advanced conf
|
|
|
414
414
|
"command": "/path/to/npx/binary/npx",
|
|
415
415
|
"args": [
|
|
416
416
|
"-y",
|
|
417
|
-
"@
|
|
417
|
+
"@praise25/mcp-server-mysql"
|
|
418
418
|
],
|
|
419
419
|
"env": {
|
|
420
420
|
// Basic connection settings
|
|
@@ -684,18 +684,18 @@ echo "$(which node)/../../lib/node_modules"
|
|
|
684
684
|
7. I am encountering `Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'dotenv' imported from` error
|
|
685
685
|
try this workaround:
|
|
686
686
|
```bash
|
|
687
|
-
npx -y -p @
|
|
687
|
+
npx -y -p @praise25/mcp-server-mysql -p dotenv mcp-server-mysql
|
|
688
688
|
```
|
|
689
689
|
Thanks to @lizhuangs
|
|
690
690
|
|
|
691
691
|
## Contributing
|
|
692
692
|
|
|
693
693
|
Contributions are welcome! Please feel free to submit a Pull Request to
|
|
694
|
-
https://github.com/
|
|
694
|
+
https://github.com/SteveFunso/mcp-server-mysql
|
|
695
695
|
|
|
696
696
|
## Many Thanks to the following Contributors:
|
|
697
|
-
<a href = "https://github.com/
|
|
698
|
-
<img src = "https://contrib.rocks/image?repo=
|
|
697
|
+
<a href = "https://github.com/SteveFunso/mcp-server-mysql/graphs/contributors">
|
|
698
|
+
<img src = "https://contrib.rocks/image?repo=SteveFunso/mcp-server-mysql"/>
|
|
699
699
|
</a>
|
|
700
700
|
|
|
701
701
|
### Development Setup
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as dotenv from "dotenv";
|
|
2
2
|
import { parseSchemaPermissions } from "../utils/index.js";
|
|
3
|
-
export const MCP_VERSION = "
|
|
3
|
+
export const MCP_VERSION = "1.0.2";
|
|
4
4
|
dotenv.config();
|
|
5
5
|
if (process.env.NODE_ENV === "test" && !process.env.MYSQL_DB) {
|
|
6
6
|
process.env.MYSQL_DB = "mcp_test_db";
|
|
@@ -20,7 +20,7 @@ export const MYSQL_MAX_QUERY_COMPLEXITY = Number(process.env.MYSQL_MAX_QUERY_COM
|
|
|
20
20
|
export const isMultiDbMode = !process.env.MYSQL_DB || process.env.MYSQL_DB.trim() === "";
|
|
21
21
|
export const mcpConfig = {
|
|
22
22
|
server: {
|
|
23
|
-
name: "@
|
|
23
|
+
name: "@praise25/mcp-server-mysql",
|
|
24
24
|
version: MCP_VERSION,
|
|
25
25
|
connectionTypes: ["stdio", "streamableHttp"],
|
|
26
26
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praise25/mcp-server-mysql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for interacting with MySQL databases based on Node",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SteveFunso",
|
|
7
7
|
"repository": {
|
|
8
|
-
"url": "https://github.com/SteveFunso/mcp-server-mysql.git"
|
|
8
|
+
"url": "git+https://github.com/SteveFunso/mcp-server-mysql.git"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "dist/index.js",
|