easy-mysql-mcp 1.0.0 → 1.0.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 chenkumi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -85,8 +85,6 @@ The server communicates over stdio and is normally launched by an MCP client rat
85
85
 
86
86
  ## Claude Desktop Example
87
87
 
88
- Add the server to your `claude_desktop_config.json`:
89
-
90
88
  ```json
91
89
  {
92
90
  "mcpServers": {
@@ -96,9 +94,9 @@ Add the server to your `claude_desktop_config.json`:
96
94
  "env": {
97
95
  "MYSQL_HOST": "localhost",
98
96
  "MYSQL_PORT": "3306",
99
- "MYSQL_USER": "root",
100
- "MYSQL_PASSWORD": "your_password",
101
- "MYSQL_DATABASE": "your_database"
97
+ "MYSQL_USER": "YOUR USERNAME",
98
+ "MYSQL_PASSWORD": "YOUR PASSWORD",
99
+ "MYSQL_DATABASE": "YOUR DB NAME"
102
100
  }
103
101
  }
104
102
  }
@@ -107,6 +105,44 @@ Add the server to your `claude_desktop_config.json`:
107
105
 
108
106
  Restart Claude Desktop after updating the configuration.
109
107
 
108
+ ## Codex config.toml Example
109
+
110
+ ```
111
+ [mcp_servers.easy-mysql-mcp]
112
+ args = ["-y", "easy-mysql-mcp"]
113
+ command = "npx"
114
+ enabled = true
115
+
116
+ [mcp_servers.easy-mysql-mcp.env]
117
+ MYSQL_HOST = "localhost"
118
+ MYSQL_PORT = "3306"
119
+ MYSQL_USER = "YOUR USERNAME"
120
+ MYSQL_PASSWORD = "YOUR PASSWORD"
121
+ MYSQL_DATABASE = "YOUR DB NAME"
122
+ ```
123
+
124
+ ## OpenCode opencode.jsonc Example
125
+
126
+ ```json
127
+ {
128
+ "$schema": "https://opencode.ai/config.json",
129
+ "mcp": {
130
+ "easy-mysql-mcp": {
131
+ "type": "local",
132
+ "command": ["npx", "-y", "easy-mysql-mcp"],
133
+ "enabled": true,
134
+ "environment": {
135
+ "MYSQL_HOST": "localhost",
136
+ "MYSQL_PORT": "3306",
137
+ "MYSQL_USER": "YOUR USERNAME",
138
+ "MYSQL_PASSWORD": "YOUR PASSWORD",
139
+ "MYSQL_DATABASE": "YOUR DB NAME",
140
+ },
141
+ },
142
+ },
143
+ }
144
+ ```
145
+
110
146
  ## Available Tools
111
147
 
112
148
  | Tool | Description |
package/build/db.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import mysql from 'mysql2/promise';
2
- import dotenv from 'dotenv';
3
- dotenv.config();
4
2
  const { MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_CONNECTION_LIMIT, MYSQL_MAX_IDLE, MYSQL_IDLE_TIMEOUT, MYSQL_QUEUE_LIMIT, MYSQL_WAIT_FOR_CONNECTIONS, MYSQL_ENABLE_KEEP_ALIVE, MYSQL_KEEP_ALIVE_INITIAL_DELAY, } = process.env;
5
3
  if (!MYSQL_HOST || !MYSQL_USER || !MYSQL_PASSWORD || !MYSQL_DATABASE) {
6
4
  console.error('Missing required environment variables for MySQL connection.');
package/build/index.js CHANGED
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import './proxy.js';
3
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
4
  import { z } from 'zod';
6
5
  import * as db from './db.js';
7
- // Initialize MCP Server
6
+ // Initialize MCP Server/mcp
8
7
  const server = new McpServer({
9
8
  name: 'easy-mysql-mcp',
10
- version: '1.0.0',
9
+ version: '1.0.3',
11
10
  });
12
11
  // --- Register Tools ---
13
12
  server.registerTool('mysql_query', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-mysql-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "High performance MySQL MCP Server using mysql2",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "mysql2",
22
22
  "claude"
23
23
  ],
24
- "license": "ISC",
24
+ "license": "MIT",
25
25
  "publishConfig": {
26
26
  "access": "public"
27
27
  },
@@ -33,13 +33,15 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@modelcontextprotocol/sdk": "^1.29.0",
36
- "dotenv": "^17.4.2",
37
36
  "mysql2": "^3.22.2",
38
37
  "zod": "^4.3.6"
39
38
  },
40
39
  "devDependencies": {
41
40
  "@types/node": "^25.6.0",
42
41
  "typescript": "^6.0.3"
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/chenkumi/easy-mysql-mcp.git"
43
46
  }
44
-
45
47
  }