@berthojoris/mcp-mysql-server 1.9.0 β 1.9.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/CHANGELOG.md +102 -0
- package/DOCUMENTATIONS.md +222 -3
- package/README.md +81 -2
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,102 @@ All notable changes to the MySQL MCP Server will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.1] - 2025-11-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **OpenAI Codex Integration** - Full support for OpenAI Codex CLI and VS Code Extension
|
|
12
|
+
- Added Codex configuration examples to README.md
|
|
13
|
+
- Added comprehensive Codex Integration section to DOCUMENTATIONS.md
|
|
14
|
+
- TOML configuration format (`~/.codex/config.toml`)
|
|
15
|
+
- CLI setup via `codex mcp add` command
|
|
16
|
+
- Environment variables configuration
|
|
17
|
+
- Multiple database configurations (prod/dev)
|
|
18
|
+
- Advanced options (timeouts, tool filtering)
|
|
19
|
+
- Codex MCP management commands reference
|
|
20
|
+
- Troubleshooting section for Codex-specific issues
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Updated package.json keywords to include "codex" and "openai-codex"
|
|
24
|
+
- Updated feature list to include OpenAI Codex as supported AI agent
|
|
25
|
+
|
|
26
|
+
### Documentation
|
|
27
|
+
- README.md: Added OpenAI Codex CLI & VS Code Extension configuration section
|
|
28
|
+
- DOCUMENTATIONS.md: Added new section "OpenAI Codex Integration" with:
|
|
29
|
+
- Configuration overview table
|
|
30
|
+
- Quick setup via CLI
|
|
31
|
+
- Manual TOML configuration examples
|
|
32
|
+
- Configuration options reference table
|
|
33
|
+
- Advanced configurations (prod+dev, tool filtering, custom timeouts)
|
|
34
|
+
- VS Code Extension setup steps
|
|
35
|
+
- Verification instructions
|
|
36
|
+
- Common TOML syntax errors
|
|
37
|
+
- Permission sets for common use cases
|
|
38
|
+
|
|
39
|
+
## [1.9.0] - 2025-11-24
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- **Schema Versioning & Migrations** - Complete database migration management system with 9 new tools:
|
|
43
|
+
- `initMigrationsTable` - Initialize the migrations tracking table (`_schema_migrations`)
|
|
44
|
+
- `createMigration` - Create new migration files with up/down SQL and automatic versioning
|
|
45
|
+
- `applyMigrations` - Apply pending migrations with dry-run support and transaction safety
|
|
46
|
+
- `rollbackMigration` - Rollback migrations with automatic down SQL execution
|
|
47
|
+
- `getMigrationStatus` - Get detailed status of all migrations
|
|
48
|
+
- `getSchemaVersion` - Get current schema version quickly
|
|
49
|
+
- `validateMigrations` - Validate migration checksums and detect tampering
|
|
50
|
+
- `resetFailedMigration` - Reset failed migrations for retry
|
|
51
|
+
- `generateMigrationFromDiff` - Auto-generate migrations by comparing table structures
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- **README.md Restructured** - Complete overhaul of MCP integration documentation
|
|
55
|
+
- Changed "Claude Desktop" references to "Claude Code"
|
|
56
|
+
- Added configuration examples for 12 AI tools/IDEs:
|
|
57
|
+
- Claude Code (CLI) - `.mcp.json`
|
|
58
|
+
- Cursor - `.cursor/mcp.json`
|
|
59
|
+
- Windsurf - `~/.codeium/windsurf/mcp_config.json`
|
|
60
|
+
- Cline (VS Code Extension)
|
|
61
|
+
- Gemini CLI - `~/.gemini/settings.json`
|
|
62
|
+
- Trae AI
|
|
63
|
+
- Qwen Code
|
|
64
|
+
- Droid CLI
|
|
65
|
+
- Zed IDE - `~/.config/zed/settings.json`
|
|
66
|
+
- Kilo Code (VS Code Extension)
|
|
67
|
+
- Roo Code (VS Code Extension)
|
|
68
|
+
- Continue (VS Code Extension)
|
|
69
|
+
|
|
70
|
+
### Documentation
|
|
71
|
+
- Added comprehensive Schema Versioning documentation to DOCUMENTATIONS.md
|
|
72
|
+
- Includes tool overview, permission requirements, best practices
|
|
73
|
+
- Common migration patterns with real-world examples
|
|
74
|
+
- Updated roadmap to mark Schema Versioning as COMPLETED
|
|
75
|
+
|
|
76
|
+
### Technical Details
|
|
77
|
+
- Migration tracking table stores: version, name, description, up_sql, down_sql, checksum, execution_time, status
|
|
78
|
+
- MD5 checksum validation prevents migration tampering
|
|
79
|
+
- Multi-statement SQL support for complex migrations
|
|
80
|
+
- Dry-run mode for safe migration testing
|
|
81
|
+
- Automatic version generation using timestamp format (YYYYMMDDHHMMSS)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## [1.8.0] - 2025-11-24
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
- **Data Migration Tools** - Tools for data import/export and database transfer:
|
|
89
|
+
- Data import/export functionality
|
|
90
|
+
- Cross-database migration support
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## [1.7.0] - 2025-11-24
|
|
95
|
+
|
|
96
|
+
### Added
|
|
97
|
+
- **Database Backup/Restore** - Complete backup and restore functionality:
|
|
98
|
+
- Database backup tools
|
|
99
|
+
- Database restore tools
|
|
100
|
+
- Data import/export tools
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
8
104
|
## [1.6.3] - 2025-11-23
|
|
9
105
|
|
|
10
106
|
### Fixed
|
|
@@ -344,6 +440,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
344
440
|
|
|
345
441
|
## Version History Summary
|
|
346
442
|
|
|
443
|
+
- **1.9.0** - Schema Versioning & Migrations (9 new tools), MCP integration for 12 AI tools
|
|
444
|
+
- **1.8.0** - Data Migration Tools
|
|
445
|
+
- **1.7.0** - Database Backup/Restore, Data Import/Export
|
|
446
|
+
- **1.6.3** - Fixed missing tools in toolCategoryMap, security keyword refinement
|
|
447
|
+
- **1.6.2** - Fixed security keyword false positive bug
|
|
448
|
+
- **1.4.16** - Added get_table_size tool to manifest
|
|
347
449
|
- **1.4.4** - Bug fixes: First call failure & execute permission
|
|
348
450
|
- **1.4.3** - Permission error handling improvements
|
|
349
451
|
- **1.4.2** - Dynamic per-project permissions
|
package/DOCUMENTATIONS.md
CHANGED
|
@@ -26,9 +26,10 @@ This file contains detailed documentation for all features of the MySQL MCP Serv
|
|
|
26
26
|
18. [Query Result Caching](#πΎ-query-result-caching)
|
|
27
27
|
19. [Query Optimization Hints](#π―-query-optimization-hints)
|
|
28
28
|
20. [Bulk Operations](#π-bulk-operations)
|
|
29
|
-
21. [
|
|
30
|
-
22. [
|
|
31
|
-
23. [
|
|
29
|
+
21. [OpenAI Codex Integration](#π€-openai-codex-integration) - NEW!
|
|
30
|
+
22. [Troubleshooting](#π οΈ-troubleshooting)
|
|
31
|
+
23. [License](#π-license)
|
|
32
|
+
24. [Roadmap](#πΊοΈ-roadmap)
|
|
32
33
|
|
|
33
34
|
---
|
|
34
35
|
|
|
@@ -2741,6 +2742,224 @@ Each bulk operation returns performance metrics:
|
|
|
2741
2742
|
|
|
2742
2743
|
---
|
|
2743
2744
|
|
|
2745
|
+
## π€ OpenAI Codex Integration
|
|
2746
|
+
|
|
2747
|
+
OpenAI Codex CLI and VS Code Extension support MCP servers through a shared TOML configuration file. This section provides detailed setup instructions for integrating the MySQL MCP Server with Codex.
|
|
2748
|
+
|
|
2749
|
+
### Configuration Overview
|
|
2750
|
+
|
|
2751
|
+
| Feature | Details |
|
|
2752
|
+
|---------|---------|
|
|
2753
|
+
| **Config File** | `~/.codex/config.toml` |
|
|
2754
|
+
| **Shared Config** | CLI and VS Code extension use the same file |
|
|
2755
|
+
| **Transport** | STDIO (standard input/output) |
|
|
2756
|
+
| **Format** | TOML |
|
|
2757
|
+
|
|
2758
|
+
### Quick Setup via CLI
|
|
2759
|
+
|
|
2760
|
+
The fastest way to add MySQL MCP to Codex:
|
|
2761
|
+
|
|
2762
|
+
```bash
|
|
2763
|
+
# Basic setup with connection string
|
|
2764
|
+
codex mcp add mysql -- npx -y @berthojoris/mcp-mysql-server mysql://user:password@localhost:3306/database list,read,utility
|
|
2765
|
+
|
|
2766
|
+
# With environment variables
|
|
2767
|
+
codex mcp add mysql --env DB_HOST=localhost --env DB_PORT=3306 --env DB_USER=root --env DB_PASSWORD=secret --env DB_NAME=mydb --env MCP_PERMISSIONS=list,read,utility -- npx -y @berthojoris/mcp-mysql-server
|
|
2768
|
+
```
|
|
2769
|
+
|
|
2770
|
+
### Manual TOML Configuration
|
|
2771
|
+
|
|
2772
|
+
Edit `~/.codex/config.toml` directly for more control:
|
|
2773
|
+
|
|
2774
|
+
#### Basic Configuration
|
|
2775
|
+
|
|
2776
|
+
```toml
|
|
2777
|
+
[mcp_servers.mysql]
|
|
2778
|
+
command = "npx"
|
|
2779
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://user:password@localhost:3306/database", "list,read,utility"]
|
|
2780
|
+
```
|
|
2781
|
+
|
|
2782
|
+
#### With Environment Variables
|
|
2783
|
+
|
|
2784
|
+
```toml
|
|
2785
|
+
[mcp_servers.mysql]
|
|
2786
|
+
command = "npx"
|
|
2787
|
+
args = ["-y", "@berthojoris/mcp-mysql-server"]
|
|
2788
|
+
|
|
2789
|
+
[mcp_servers.mysql.env]
|
|
2790
|
+
DB_HOST = "localhost"
|
|
2791
|
+
DB_PORT = "3306"
|
|
2792
|
+
DB_USER = "root"
|
|
2793
|
+
DB_PASSWORD = "your_password"
|
|
2794
|
+
DB_NAME = "your_database"
|
|
2795
|
+
MCP_PERMISSIONS = "list,read,utility"
|
|
2796
|
+
```
|
|
2797
|
+
|
|
2798
|
+
#### Local Path Configuration (Development)
|
|
2799
|
+
|
|
2800
|
+
```toml
|
|
2801
|
+
[mcp_servers.mysql]
|
|
2802
|
+
command = "node"
|
|
2803
|
+
args = ["C:\\DEKSTOP\\MCP\\mcp_mysql\\bin\\mcp-mysql.js", "mysql://user:pass@localhost:3306/database", "list,read,utility"]
|
|
2804
|
+
cwd = "C:\\DEKSTOP\\MCP\\mcp_mysql"
|
|
2805
|
+
```
|
|
2806
|
+
|
|
2807
|
+
### Configuration Options Reference
|
|
2808
|
+
|
|
2809
|
+
| Option | Type | Default | Description |
|
|
2810
|
+
|--------|------|---------|-------------|
|
|
2811
|
+
| `command` | String | Required | The executable to launch the server |
|
|
2812
|
+
| `args` | Array | `[]` | Command-line arguments passed to the server |
|
|
2813
|
+
| `env` | Table | `{}` | Environment variables for the server process |
|
|
2814
|
+
| `env_vars` | Array | `[]` | Additional env vars to whitelist/forward |
|
|
2815
|
+
| `cwd` | String | - | Working directory to launch the server from |
|
|
2816
|
+
| `startup_timeout_sec` | Number | `10` | Server startup timeout in seconds |
|
|
2817
|
+
| `tool_timeout_sec` | Number | `60` | Per-tool execution timeout in seconds |
|
|
2818
|
+
| `enabled` | Boolean | `true` | Set to `false` to disable without deleting |
|
|
2819
|
+
| `enabled_tools` | Array | - | Allow-list of tools to expose from server |
|
|
2820
|
+
| `disabled_tools` | Array | - | Deny-list of tools to hide |
|
|
2821
|
+
|
|
2822
|
+
### Advanced Configurations
|
|
2823
|
+
|
|
2824
|
+
#### Production (Read-Only) + Development (Full Access)
|
|
2825
|
+
|
|
2826
|
+
```toml
|
|
2827
|
+
# Production database - Read Only
|
|
2828
|
+
[mcp_servers.mysql-prod]
|
|
2829
|
+
command = "npx"
|
|
2830
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://reader:pass@prod-server:3306/prod_db", "list,read,utility"]
|
|
2831
|
+
startup_timeout_sec = 30
|
|
2832
|
+
tool_timeout_sec = 120
|
|
2833
|
+
|
|
2834
|
+
# Development database - Full Access
|
|
2835
|
+
[mcp_servers.mysql-dev]
|
|
2836
|
+
command = "npx"
|
|
2837
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://root:pass@localhost:3306/dev_db", "list,read,create,update,delete,execute,ddl,transaction,utility"]
|
|
2838
|
+
```
|
|
2839
|
+
|
|
2840
|
+
#### With Tool Filtering (Limit Exposed Tools)
|
|
2841
|
+
|
|
2842
|
+
```toml
|
|
2843
|
+
[mcp_servers.mysql]
|
|
2844
|
+
command = "npx"
|
|
2845
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://user:pass@localhost:3306/db", "list,read,utility"]
|
|
2846
|
+
|
|
2847
|
+
# Only expose specific tools
|
|
2848
|
+
enabled_tools = [
|
|
2849
|
+
"list_tables",
|
|
2850
|
+
"read_table_schema",
|
|
2851
|
+
"read_records",
|
|
2852
|
+
"run_query",
|
|
2853
|
+
"test_connection"
|
|
2854
|
+
]
|
|
2855
|
+
|
|
2856
|
+
# Or hide specific dangerous tools
|
|
2857
|
+
# disabled_tools = ["drop_table", "delete_record", "execute_sql"]
|
|
2858
|
+
```
|
|
2859
|
+
|
|
2860
|
+
#### With Custom Timeouts for Large Operations
|
|
2861
|
+
|
|
2862
|
+
```toml
|
|
2863
|
+
[mcp_servers.mysql]
|
|
2864
|
+
command = "npx"
|
|
2865
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://user:pass@localhost:3306/db", "list,read,create,update,delete,utility"]
|
|
2866
|
+
startup_timeout_sec = 30 # Allow more time for startup
|
|
2867
|
+
tool_timeout_sec = 300 # 5 minutes for large bulk operations
|
|
2868
|
+
```
|
|
2869
|
+
|
|
2870
|
+
### Codex MCP Management Commands
|
|
2871
|
+
|
|
2872
|
+
```bash
|
|
2873
|
+
# List all configured MCP servers
|
|
2874
|
+
codex mcp list
|
|
2875
|
+
|
|
2876
|
+
# List with JSON output (for scripting)
|
|
2877
|
+
codex mcp list --json
|
|
2878
|
+
|
|
2879
|
+
# Get details about a specific server
|
|
2880
|
+
codex mcp get mysql
|
|
2881
|
+
|
|
2882
|
+
# Remove an MCP server
|
|
2883
|
+
codex mcp remove mysql
|
|
2884
|
+
|
|
2885
|
+
# Add server with multiple env vars
|
|
2886
|
+
codex mcp add mysql --env DB_HOST=localhost --env DB_USER=root -- npx -y @berthojoris/mcp-mysql-server
|
|
2887
|
+
```
|
|
2888
|
+
|
|
2889
|
+
### VS Code Extension Setup
|
|
2890
|
+
|
|
2891
|
+
1. Install the Codex VS Code Extension
|
|
2892
|
+
2. Open the extension settings (gear icon in top right)
|
|
2893
|
+
3. Click "MCP settings" > "Open config.toml"
|
|
2894
|
+
4. Add your MySQL MCP configuration
|
|
2895
|
+
5. Save the file - changes apply immediately
|
|
2896
|
+
|
|
2897
|
+
### Verifying the Setup
|
|
2898
|
+
|
|
2899
|
+
After configuration, test your setup:
|
|
2900
|
+
|
|
2901
|
+
```bash
|
|
2902
|
+
# In Codex CLI
|
|
2903
|
+
codex mcp list
|
|
2904
|
+
|
|
2905
|
+
# You should see:
|
|
2906
|
+
# mysql: npx -y @berthojoris/mcp-mysql-server ...
|
|
2907
|
+
```
|
|
2908
|
+
|
|
2909
|
+
Then ask Codex:
|
|
2910
|
+
- "What databases are available?"
|
|
2911
|
+
- "List all tables in my database"
|
|
2912
|
+
- "Show me the structure of the users table"
|
|
2913
|
+
|
|
2914
|
+
### Troubleshooting Codex Integration
|
|
2915
|
+
|
|
2916
|
+
#### Server Not Starting
|
|
2917
|
+
|
|
2918
|
+
1. **Check TOML syntax** - A single syntax error breaks both CLI and VS Code extension
|
|
2919
|
+
2. **Verify paths** - Use absolute paths for local installations
|
|
2920
|
+
3. **Check startup timeout** - Increase `startup_timeout_sec` if server takes time to initialize
|
|
2921
|
+
|
|
2922
|
+
#### Tools Not Appearing
|
|
2923
|
+
|
|
2924
|
+
1. Verify server configuration with `codex mcp list --json`
|
|
2925
|
+
2. Check that `enabled = true` (or not set, defaults to true)
|
|
2926
|
+
3. Ensure `enabled_tools` doesn't accidentally filter out needed tools
|
|
2927
|
+
|
|
2928
|
+
#### Connection Errors
|
|
2929
|
+
|
|
2930
|
+
1. Test MySQL connection manually: `mysql -u user -p -h host database`
|
|
2931
|
+
2. Verify credentials in connection string
|
|
2932
|
+
3. Check network connectivity to MySQL server
|
|
2933
|
+
|
|
2934
|
+
#### Common TOML Syntax Errors
|
|
2935
|
+
|
|
2936
|
+
```toml
|
|
2937
|
+
# WRONG - missing quotes around string values
|
|
2938
|
+
args = [-y, @berthojoris/mcp-mysql-server]
|
|
2939
|
+
|
|
2940
|
+
# CORRECT
|
|
2941
|
+
args = ["-y", "@berthojoris/mcp-mysql-server"]
|
|
2942
|
+
|
|
2943
|
+
# WRONG - using JSON syntax
|
|
2944
|
+
"mcp_servers": { "mysql": { ... } }
|
|
2945
|
+
|
|
2946
|
+
# CORRECT - TOML table syntax
|
|
2947
|
+
[mcp_servers.mysql]
|
|
2948
|
+
command = "npx"
|
|
2949
|
+
```
|
|
2950
|
+
|
|
2951
|
+
### Permission Sets for Common Use Cases
|
|
2952
|
+
|
|
2953
|
+
| Use Case | Permissions |
|
|
2954
|
+
|----------|-------------|
|
|
2955
|
+
| Read-Only Analysis | `list,read,utility` |
|
|
2956
|
+
| Data Entry | `list,read,create,utility` |
|
|
2957
|
+
| Full Data Access | `list,read,create,update,delete,utility` |
|
|
2958
|
+
| With Transactions | `list,read,create,update,delete,transaction,utility` |
|
|
2959
|
+
| Development (Full) | `list,read,create,update,delete,execute,ddl,transaction,procedure,utility` |
|
|
2960
|
+
|
|
2961
|
+
---
|
|
2962
|
+
|
|
2744
2963
|
## π οΈ Troubleshooting
|
|
2745
2964
|
|
|
2746
2965
|
### MCP Server Not Connecting
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ο»Ώ# MySQL MCP Server
|
|
2
2
|
|
|
3
|
-
A fully-featured **Model Context Protocol (MCP)** server for MySQL database integration with AI agents like Claude Code, Cursor, Windsurf, Zed, Cline, Kilo Code, Roo Code, Gemini CLI, and other MCP-compatible tools.
|
|
3
|
+
A fully-featured **Model Context Protocol (MCP)** server for MySQL database integration with AI agents like Claude Code, Cursor, Windsurf, Zed, Cline, Kilo Code, Roo Code, Gemini CLI, OpenAI Codex, and other MCP-compatible tools.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -9,7 +9,7 @@ A fully-featured **Model Context Protocol (MCP)** server for MySQL database inte
|
|
|
9
9
|
|
|
10
10
|
## π Features
|
|
11
11
|
|
|
12
|
-
- β
**Full MCP Protocol Support** - Works with Claude Code, Cursor, Windsurf, Zed, Cline, Kilo Code, Roo Code, Gemini CLI, and any MCP-compatible AI agent
|
|
12
|
+
- β
**Full MCP Protocol Support** - Works with Claude Code, Cursor, Windsurf, Zed, Cline, Kilo Code, Roo Code, Gemini CLI, OpenAI Codex, and any MCP-compatible AI agent
|
|
13
13
|
- π **Secure by Default** - Parameterized queries, SQL injection protection, permission-based access control
|
|
14
14
|
- π οΈ **100 Powerful Tools** - Complete database operations (CRUD, DDL, queries, schema inspection, transactions, stored procedures, bulk operations, backup/restore, import/export, data migration)
|
|
15
15
|
- ποΈ **Dynamic Per-Project Permissions** - Each AI agent can have different access levels
|
|
@@ -399,6 +399,85 @@ Zed IDE uses `~/.config/zed/settings.json` for MCP configuration.
|
|
|
399
399
|
}
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
+
#### OpenAI Codex CLI & VS Code Extension
|
|
403
|
+
|
|
404
|
+
OpenAI Codex uses `~/.codex/config.toml` for MCP configuration. This configuration is **shared between the CLI and VS Code extension**.
|
|
405
|
+
|
|
406
|
+
**Option 1: Using the Codex CLI command:**
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
codex mcp add mysql -- npx -y @berthojoris/mcp-mysql-server mysql://user:password@localhost:3306/database list,read,utility
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Option 2: Manual TOML configuration (`~/.codex/config.toml`):**
|
|
413
|
+
|
|
414
|
+
```toml
|
|
415
|
+
[mcp_servers.mysql]
|
|
416
|
+
command = "npx"
|
|
417
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://user:password@localhost:3306/database", "list,read,utility"]
|
|
418
|
+
startup_timeout_sec = 20
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**With environment variables:**
|
|
422
|
+
|
|
423
|
+
```toml
|
|
424
|
+
[mcp_servers.mysql]
|
|
425
|
+
command = "npx"
|
|
426
|
+
args = ["-y", "@berthojoris/mcp-mysql-server"]
|
|
427
|
+
|
|
428
|
+
[mcp_servers.mysql.env]
|
|
429
|
+
DB_HOST = "localhost"
|
|
430
|
+
DB_PORT = "3306"
|
|
431
|
+
DB_USER = "root"
|
|
432
|
+
DB_PASSWORD = "your_password"
|
|
433
|
+
DB_NAME = "your_database"
|
|
434
|
+
MCP_PERMISSIONS = "list,read,utility"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Multiple database configurations:**
|
|
438
|
+
|
|
439
|
+
```toml
|
|
440
|
+
# Production - Read Only
|
|
441
|
+
[mcp_servers.mysql-prod]
|
|
442
|
+
command = "npx"
|
|
443
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://reader:pass@prod-server:3306/prod_db", "list,read,utility"]
|
|
444
|
+
startup_timeout_sec = 30
|
|
445
|
+
|
|
446
|
+
# Development - Full Access
|
|
447
|
+
[mcp_servers.mysql-dev]
|
|
448
|
+
command = "npx"
|
|
449
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://root:pass@localhost:3306/dev_db", "list,read,create,update,delete,execute,ddl,utility"]
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Advanced options:**
|
|
453
|
+
|
|
454
|
+
```toml
|
|
455
|
+
[mcp_servers.mysql]
|
|
456
|
+
command = "npx"
|
|
457
|
+
args = ["-y", "@berthojoris/mcp-mysql-server", "mysql://user:pass@localhost:3306/database", "list,read,utility"]
|
|
458
|
+
startup_timeout_sec = 20 # Server startup timeout (default: 10)
|
|
459
|
+
tool_timeout_sec = 120 # Per-tool execution timeout (default: 60)
|
|
460
|
+
enabled = true # Set false to disable without deleting
|
|
461
|
+
# enabled_tools = ["list_tables", "read_records"] # Optional: limit exposed tools
|
|
462
|
+
# disabled_tools = ["drop_table", "delete_record"] # Optional: hide specific tools
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Codex MCP management commands:**
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
# List all configured MCP servers
|
|
469
|
+
codex mcp list
|
|
470
|
+
|
|
471
|
+
# List with JSON output
|
|
472
|
+
codex mcp list --json
|
|
473
|
+
|
|
474
|
+
# Remove an MCP server
|
|
475
|
+
codex mcp remove mysql
|
|
476
|
+
|
|
477
|
+
# Get details about a specific server
|
|
478
|
+
codex mcp get mysql
|
|
479
|
+
```
|
|
480
|
+
|
|
402
481
|
#### Kilo Code (VS Code Extension)
|
|
403
482
|
|
|
404
483
|
Kilo Code is a VS Code extension that supports MCP servers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@berthojoris/mcp-mysql-server",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Model Context Protocol server for MySQL database integration with dynamic per-project permissions, backup/restore, data import/export, and data migration capabilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"claude",
|
|
30
30
|
"cline",
|
|
31
31
|
"windsurf",
|
|
32
|
+
"codex",
|
|
33
|
+
"openai-codex",
|
|
32
34
|
"agent",
|
|
33
35
|
"database-tools",
|
|
34
36
|
"sql",
|