easy-mysql-mcp 1.0.1 → 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/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.1",
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",
@@ -33,7 +33,6 @@
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
  },
@@ -45,4 +44,4 @@
45
44
  "type": "git",
46
45
  "url": "https://github.com/chenkumi/easy-mysql-mcp.git"
47
46
  }
48
- }
47
+ }