mlgym-deploy 3.3.42 → 3.3.44
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/ADD_TO_CURSOR_SETTINGS.json +1 -1
- package/ADD_TO_CURSOR_SETTINGS.json.example +28 -0
- package/CHANGELOG-v3.3.42.md +707 -0
- package/Dockerfile +7 -0
- package/README.md +35 -0
- package/claude-desktop-config.json +1 -1
- package/claude-desktop-config.json.example +8 -0
- package/cursor-config.json +1 -1
- package/cursor-config.json.example +13 -0
- package/docs/CURSOR_SETUP.md +204 -0
- package/docs/NPM_RELEASE.md +230 -0
- package/index.js +9 -4
- package/mcp.json.example +13 -0
- package/package.json +8 -4
- package/tests/TEST_RESULTS.md +518 -0
- package/tests/archived/README.md +71 -0
- package/{deploy-hello-world.sh → tests/archived/deploy-hello-world.sh} +9 -6
- package/tests/deploy_dollie_test.sh +11 -7
- package/tests/misc/check-sdk-version.js +50 -0
- package/tests/mlgym_auth_login_test.sh +13 -9
- package/tests/mlgym_deploy_logs_test.sh +339 -0
- package/tests/mlgym_deploy_test.sh +341 -0
- package/tests/mlgym_status_test.sh +281 -0
- package/tests/mlgym_user_create_test.sh +35 -29
- package/tests/run-all-tests.sh +135 -41
- package/CURSOR_SETUP.md +0 -119
- package/index.js.backup-atomic +0 -1358
- /package/{DEBUG.md → docs/DEBUG.md} +0 -0
- /package/{SECURITY-UPDATE-v2.4.0.md → tests/archived/SECURITY-UPDATE-v2.4.0.md} +0 -0
- /package/{cursor-integration.js → tests/archived/cursor-integration.js} +0 -0
- /package/tests/{mlgym_auth_logout_test.sh → archived/mlgym_auth_logout_test.sh} +0 -0
- /package/tests/{mlgym_deployments_test.sh → archived/mlgym_deployments_test.sh} +0 -0
- /package/tests/{mlgym_project_init_test.sh → archived/mlgym_project_init_test.sh} +0 -0
- /package/tests/{mlgym_projects_get_test.sh → archived/mlgym_projects_get_test.sh} +0 -0
- /package/tests/{mlgym_projects_list_test.sh → archived/mlgym_projects_list_test.sh} +0 -0
package/README.md
CHANGED
|
@@ -32,12 +32,47 @@ Configure in your MCP client settings:
|
|
|
32
32
|
|
|
33
33
|
## Configuration
|
|
34
34
|
|
|
35
|
+
### For Published Package (Production)
|
|
36
|
+
|
|
35
37
|
Set the backend URL via environment variable:
|
|
36
38
|
|
|
37
39
|
```bash
|
|
38
40
|
export MLGYM_BACKEND_URL=https://backend.eu.ezb.net
|
|
39
41
|
```
|
|
40
42
|
|
|
43
|
+
### For Local Development
|
|
44
|
+
|
|
45
|
+
When developing locally, you'll need to configure the MCP server with absolute paths. Configuration files are user-specific and not tracked in git.
|
|
46
|
+
|
|
47
|
+
1. **Copy example files** to create your local config:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cp cursor-config.json.example cursor-config.json
|
|
51
|
+
cp mcp.json.example mcp.json
|
|
52
|
+
cp claude-desktop-config.json.example claude-desktop-config.json
|
|
53
|
+
cp ADD_TO_CURSOR_SETTINGS.json.example ADD_TO_CURSOR_SETTINGS.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. **Update the path** in your config file with your absolute path:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"gitlab-backend": {
|
|
62
|
+
"command": "node",
|
|
63
|
+
"args": ["/your/absolute/path/to/mcp-server/index.js"],
|
|
64
|
+
"env": {
|
|
65
|
+
"GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
|
|
66
|
+
"GITLAB_URL": "https://git.mlgym.io",
|
|
67
|
+
"COOLIFY_URL": "https://coolify.eu.ezb.net"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Note:** Absolute paths are required because the IDE launches the MCP server from its own working directory, not the project directory. Relative paths won't work.
|
|
75
|
+
|
|
41
76
|
## License
|
|
42
77
|
|
|
43
78
|
MIT
|
package/cursor-config.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcp.servers": {
|
|
3
3
|
"gitlab-backend": {
|
|
4
4
|
"command": "node",
|
|
5
|
-
"args": ["/home/
|
|
5
|
+
"args": ["/home/sreedhar/Work/Projects/mlgym/gitlab_backend/mcp-server/index.js"],
|
|
6
6
|
"env": {
|
|
7
7
|
"GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
|
|
8
8
|
"GITLAB_URL": "https://git.mlgym.io",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcp.servers": {
|
|
3
|
+
"gitlab-backend": {
|
|
4
|
+
"command": "node",
|
|
5
|
+
"args": ["/path/to/your/gitlab_backend/mcp-server/index.js"],
|
|
6
|
+
"env": {
|
|
7
|
+
"GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
|
|
8
|
+
"GITLAB_URL": "https://git.mlgym.io",
|
|
9
|
+
"COOLIFY_URL": "https://coolify.eu.ezb.net"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# MCP Setup Guide for Cursor IDE
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
✅ Node.js installed
|
|
5
|
+
✅ MCP dependencies installed (already done)
|
|
6
|
+
✅ Cursor IDE with MCP support
|
|
7
|
+
|
|
8
|
+
## Setup Instructions
|
|
9
|
+
|
|
10
|
+
### 1. Configure MCP in Cursor
|
|
11
|
+
|
|
12
|
+
Open Cursor Settings (Cmd/Ctrl+,) and add the MCP server configuration:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"mcp.servers": {
|
|
17
|
+
"mlgym-deploy": {
|
|
18
|
+
"command": "node",
|
|
19
|
+
"args": ["${workspaceFolder}/mcp-server/index.js"],
|
|
20
|
+
"env": {
|
|
21
|
+
"GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
|
|
22
|
+
"GITLAB_URL": "https://git.mlgym.io",
|
|
23
|
+
"COOLIFY_URL": "https://coolify.eu.ezb.net"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Using MCP Tools in Cursor
|
|
31
|
+
|
|
32
|
+
Once MCP is configured, you can use these commands directly in Cursor chat:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
@mcp mlgym_user_create - Create a new user account
|
|
36
|
+
@mcp mlgym_auth_login - Login with existing credentials
|
|
37
|
+
@mcp mlgym_deploy - Deploy a project (recommended)
|
|
38
|
+
@mcp mlgym_status - Check deployment status
|
|
39
|
+
@mcp mlgym_deploy_logs - View deployment logs
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 3. MCP Tool Details
|
|
43
|
+
|
|
44
|
+
#### mlgym_user_create
|
|
45
|
+
Creates a complete user account with:
|
|
46
|
+
- GitLab account
|
|
47
|
+
- Coolify account
|
|
48
|
+
- SSH key generation and registration
|
|
49
|
+
- Authentication token storage
|
|
50
|
+
|
|
51
|
+
**Parameters:**
|
|
52
|
+
- `email` (required): User email address
|
|
53
|
+
- `name` (required): User full name
|
|
54
|
+
- `password` (required): User password (min 8 characters)
|
|
55
|
+
- `accept_terms` (required): Must be `true`
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"email": "user@example.com",
|
|
61
|
+
"name": "John Doe",
|
|
62
|
+
"password": "SecurePass123!",
|
|
63
|
+
"accept_terms": true
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### mlgym_auth_login
|
|
68
|
+
Login with existing user credentials to get authentication token.
|
|
69
|
+
|
|
70
|
+
**Parameters:**
|
|
71
|
+
- `email` (required): Email address
|
|
72
|
+
- `password` (required): Password
|
|
73
|
+
|
|
74
|
+
**Example:**
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"email": "user@example.com",
|
|
78
|
+
"password": "SecurePass123!"
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### mlgym_deploy (RECOMMENDED)
|
|
83
|
+
Complete deployment workflow in one call. Automatically authenticates (uses cached token if available), analyzes project, creates GitLab repo, and deploys to Coolify.
|
|
84
|
+
|
|
85
|
+
**Parameters:**
|
|
86
|
+
- `project_name` (required): Project name (lowercase alphanumeric with hyphens, e.g., "my-app")
|
|
87
|
+
- `project_description` (required): Brief project description (min 10 characters)
|
|
88
|
+
- `email` (optional): Email for authentication (if not already authenticated)
|
|
89
|
+
- `password` (optional): Password (if not already authenticated)
|
|
90
|
+
- `hostname` (optional): Custom hostname
|
|
91
|
+
- `local_path` (optional): Local project directory path (defaults to current directory)
|
|
92
|
+
- `project_type` (optional): Override auto-detected type (nodejs, python, static, go)
|
|
93
|
+
- `framework` (optional): Override auto-detected framework (nextjs, express, react, vue, flask, fastapi, html)
|
|
94
|
+
|
|
95
|
+
**Example:**
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"project_name": "my-awesome-app",
|
|
99
|
+
"project_description": "A simple Node.js application",
|
|
100
|
+
"email": "user@example.com",
|
|
101
|
+
"password": "SecurePass123!",
|
|
102
|
+
"local_path": "."
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Other Available Tools
|
|
107
|
+
|
|
108
|
+
- **mlgym_status**: Check deployment status and project configuration
|
|
109
|
+
- **mlgym_deploy_logs**: View deployment logs (requires project_name)
|
|
110
|
+
- **mlgym_set_env_vars**: Set environment variables for deployment
|
|
111
|
+
- **mlgym_set_health_check**: Configure health check endpoints
|
|
112
|
+
- **mlgym_set_domain**: Set custom domain for deployment
|
|
113
|
+
- **mlgym_set_deployment_commands**: Configure build/start commands
|
|
114
|
+
- **mlgym_deploy_manual**: Manual deployment trigger
|
|
115
|
+
- **mlgym_set_options**: Configure deployment options
|
|
116
|
+
- **mlgym_rollback**: Rollback to previous deployment
|
|
117
|
+
- **mlgym_help**: Get help on available tools
|
|
118
|
+
|
|
119
|
+
### 4. Typical Workflow
|
|
120
|
+
|
|
121
|
+
#### First-time User
|
|
122
|
+
1. Create account: `@mcp mlgym_user_create`
|
|
123
|
+
2. Deploy project: `@mcp mlgym_deploy` (includes authentication)
|
|
124
|
+
|
|
125
|
+
#### Existing User
|
|
126
|
+
1. Login: `@mcp mlgym_auth_login` (or use credentials in mlgym_deploy)
|
|
127
|
+
2. Deploy project: `@mcp mlgym_deploy`
|
|
128
|
+
3. Check status: `@mcp mlgym_status`
|
|
129
|
+
4. View logs: `@mcp mlgym_deploy_logs`
|
|
130
|
+
|
|
131
|
+
### 5. Testing MCP Connection
|
|
132
|
+
|
|
133
|
+
Test that MCP is working:
|
|
134
|
+
```bash
|
|
135
|
+
# Test the MCP server directly
|
|
136
|
+
node mcp-server/index.js
|
|
137
|
+
|
|
138
|
+
# Should output the MCP protocol initialization message
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### 6. Authentication
|
|
142
|
+
|
|
143
|
+
MCP stores authentication tokens in `~/.mlgym/mcp_config.json` automatically after:
|
|
144
|
+
- First user creation (`mlgym_user_create`)
|
|
145
|
+
- Successful login (`mlgym_auth_login`)
|
|
146
|
+
- Successful deployment with credentials (`mlgym_deploy`)
|
|
147
|
+
|
|
148
|
+
### 7. Troubleshooting
|
|
149
|
+
|
|
150
|
+
If MCP tools don't appear in Cursor:
|
|
151
|
+
1. Restart Cursor after configuration
|
|
152
|
+
2. Check the MCP server is accessible:
|
|
153
|
+
```bash
|
|
154
|
+
node mcp-server/index.js
|
|
155
|
+
```
|
|
156
|
+
3. Verify settings in Cursor preferences (look for "mcp.servers")
|
|
157
|
+
4. Check Cursor logs for MCP errors (View → Output → MCP)
|
|
158
|
+
5. Ensure you're using Cursor with MCP support (latest version)
|
|
159
|
+
|
|
160
|
+
### 8. Debug Mode
|
|
161
|
+
|
|
162
|
+
Debug logging is enabled by default. To see detailed output:
|
|
163
|
+
```bash
|
|
164
|
+
# Start Cursor from terminal to see MCP logs
|
|
165
|
+
cd ~/your-project
|
|
166
|
+
cursor .
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
See [DEBUG.md](./DEBUG.md) for more details on debug logging.
|
|
170
|
+
|
|
171
|
+
## Environment Variables
|
|
172
|
+
|
|
173
|
+
The MCP server uses these production endpoints:
|
|
174
|
+
- **Backend**: https://backend.eu.ezb.net
|
|
175
|
+
- **GitLab**: https://git.mlgym.io
|
|
176
|
+
- **Coolify**: https://coolify.eu.ezb.net
|
|
177
|
+
|
|
178
|
+
These are pre-configured in the MCP server configuration.
|
|
179
|
+
|
|
180
|
+
## Quick Test
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# In Cursor terminal, test user creation
|
|
184
|
+
echo '{
|
|
185
|
+
"jsonrpc": "2.0",
|
|
186
|
+
"method": "tools/call",
|
|
187
|
+
"params": {
|
|
188
|
+
"name": "mlgym_user_create",
|
|
189
|
+
"arguments": {
|
|
190
|
+
"email": "test@example.com",
|
|
191
|
+
"name": "Test User",
|
|
192
|
+
"password": "TestPass123!",
|
|
193
|
+
"accept_terms": true
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"id": 1
|
|
197
|
+
}' | node mcp-server/index.js
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Additional Resources
|
|
201
|
+
|
|
202
|
+
- [Debug Guide](./DEBUG.md) - Enable and configure debug logging
|
|
203
|
+
- [Test Results](../tests/TEST_RESULTS.md) - Current test coverage and results
|
|
204
|
+
- Production Backend: https://backend.eu.ezb.net
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# NPM Release Procedure
|
|
2
|
+
|
|
3
|
+
This document describes how to publish the `mlgym-deploy` MCP server package to npm.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- npm account with publish access to `mlgym-deploy` package
|
|
8
|
+
- npm access token (preferred method)
|
|
9
|
+
- Package version must be incremented before publishing
|
|
10
|
+
|
|
11
|
+
## Authentication Methods
|
|
12
|
+
|
|
13
|
+
### Method 1: Access Token (Recommended) ✅
|
|
14
|
+
|
|
15
|
+
Using an access token is **preferred** because:
|
|
16
|
+
- ✅ No 2FA/OTP required during publish
|
|
17
|
+
- ✅ Faster and more automated
|
|
18
|
+
- ✅ Works in CI/CD pipelines
|
|
19
|
+
- ✅ Can be revoked/rotated easily
|
|
20
|
+
- ✅ Suitable for scripted deployments
|
|
21
|
+
|
|
22
|
+
#### Setup Access Token
|
|
23
|
+
|
|
24
|
+
1. **Configure token locally:**
|
|
25
|
+
```bash
|
|
26
|
+
npm config set //registry.npmjs.org/:_authToken <YOUR_TOKEN>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Verify authentication:**
|
|
30
|
+
```bash
|
|
31
|
+
npm whoami
|
|
32
|
+
# Should output: chka_s5
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. **Publish:**
|
|
36
|
+
```bash
|
|
37
|
+
cd mcp-server
|
|
38
|
+
npm publish
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Method 2: OTP/2FA (Alternative)
|
|
42
|
+
|
|
43
|
+
If you don't have an access token, you can use 2FA:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm publish --otp=<6-DIGIT-CODE>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Downsides:**
|
|
50
|
+
- Requires manual 2FA code entry each time
|
|
51
|
+
- Codes expire quickly (30 seconds)
|
|
52
|
+
- Not suitable for automation
|
|
53
|
+
- Slower workflow
|
|
54
|
+
|
|
55
|
+
## Release Workflow
|
|
56
|
+
|
|
57
|
+
### Step 1: Increment Version
|
|
58
|
+
|
|
59
|
+
Edit `mcp-server/package.json` and `mcp-server/index.js`:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"version": "3.3.44"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
const CURRENT_VERSION = '3.3.44'; // Update with change description
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Step 2: Update CHANGELOG (if exists)
|
|
72
|
+
|
|
73
|
+
Document what changed in this release.
|
|
74
|
+
|
|
75
|
+
### Step 3: Commit Changes
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git add mcp-server/package.json mcp-server/index.js
|
|
79
|
+
git commit -m "Bump version to 3.3.44
|
|
80
|
+
|
|
81
|
+
- Description of changes
|
|
82
|
+
- What was fixed/added/improved"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Step 4: Publish to npm
|
|
86
|
+
|
|
87
|
+
**Using Access Token (Recommended):**
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cd mcp-server
|
|
91
|
+
npm publish
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Using OTP:**
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cd mcp-server
|
|
98
|
+
npm publish --otp=123456
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Step 5: Verify Publication
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Check latest version
|
|
105
|
+
npm view mlgym-deploy version
|
|
106
|
+
|
|
107
|
+
# Check publication time
|
|
108
|
+
npm view mlgym-deploy time.modified
|
|
109
|
+
|
|
110
|
+
# Test installation
|
|
111
|
+
npm install -g mlgym-deploy@latest
|
|
112
|
+
mlgym-mcp --help
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Step 6: Tag Release (Optional)
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git tag -a v3.3.44 -m "Release v3.3.44"
|
|
119
|
+
git push origin v3.3.44
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## NPM Access Token Management
|
|
123
|
+
|
|
124
|
+
### Current Token
|
|
125
|
+
|
|
126
|
+
**Token:** `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`
|
|
127
|
+
**User:** chka_s5
|
|
128
|
+
**Scope:** Publish access to mlgym-deploy
|
|
129
|
+
|
|
130
|
+
### Token Storage
|
|
131
|
+
|
|
132
|
+
**Local config (recommended for development):**
|
|
133
|
+
```bash
|
|
134
|
+
npm config set //registry.npmjs.org/:_authToken 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
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Per-project .npmrc (not recommended - security risk):**
|
|
138
|
+
```
|
|
139
|
+
//registry.npmjs.org/:_authToken=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
|
|
140
|
+
```
|
|
141
|
+
⚠️ **Never commit .npmrc with tokens to git!**
|
|
142
|
+
|
|
143
|
+
**Environment variable (good for CI/CD):**
|
|
144
|
+
```bash
|
|
145
|
+
export NPM_TOKEN=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
|
|
146
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Revoking a Token
|
|
150
|
+
|
|
151
|
+
If token is compromised:
|
|
152
|
+
|
|
153
|
+
1. Login to npmjs.com
|
|
154
|
+
2. Go to Account Settings → Access Tokens
|
|
155
|
+
3. Find the token and click "Delete"
|
|
156
|
+
4. Generate a new token
|
|
157
|
+
5. Update local config with new token
|
|
158
|
+
|
|
159
|
+
## Common Issues
|
|
160
|
+
|
|
161
|
+
### Issue: "npm ERR! code E404"
|
|
162
|
+
|
|
163
|
+
**Cause:** Package name doesn't exist or you don't have access
|
|
164
|
+
**Solution:** Verify package name and permissions
|
|
165
|
+
|
|
166
|
+
### Issue: "npm ERR! code EOTP"
|
|
167
|
+
|
|
168
|
+
**Cause:** 2FA required but not provided
|
|
169
|
+
**Solution:** Use access token method instead of OTP
|
|
170
|
+
|
|
171
|
+
### Issue: "npm ERR! 403 Forbidden"
|
|
172
|
+
|
|
173
|
+
**Cause:** Invalid or expired token
|
|
174
|
+
**Solution:** Regenerate access token
|
|
175
|
+
|
|
176
|
+
### Issue: "Version already exists"
|
|
177
|
+
|
|
178
|
+
**Cause:** Version number in package.json hasn't been incremented
|
|
179
|
+
**Solution:** Bump version before publishing
|
|
180
|
+
|
|
181
|
+
### Issue: "npm auto-corrected some errors"
|
|
182
|
+
|
|
183
|
+
**Cause:** package.json formatting issues
|
|
184
|
+
**Solution:** Run `npm pkg fix` and commit the changes
|
|
185
|
+
|
|
186
|
+
## Automated CI/CD Publishing
|
|
187
|
+
|
|
188
|
+
For GitLab CI/CD pipeline:
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
publish_npm:
|
|
192
|
+
stage: publish
|
|
193
|
+
only:
|
|
194
|
+
- tags
|
|
195
|
+
script:
|
|
196
|
+
- cd mcp-server
|
|
197
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
198
|
+
- npm publish
|
|
199
|
+
variables:
|
|
200
|
+
NPM_TOKEN: $NPM_TOKEN # Set in GitLab CI/CD variables
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Version History
|
|
204
|
+
|
|
205
|
+
| Version | Date | SDK Version | Notable Changes |
|
|
206
|
+
|---------|------|-------------|-----------------|
|
|
207
|
+
| 3.3.43 | 2026-01-22 | 1.25.3 | SDK security upgrade, contact info |
|
|
208
|
+
| 3.3.42 | 2025-XX-XX | 0.6.1 | deploy_dollie tool |
|
|
209
|
+
| 3.0.0 | 2024-XX-XX | 0.6.0 | Monolithic workflows |
|
|
210
|
+
|
|
211
|
+
## Quick Reference
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Configure token (one-time setup)
|
|
215
|
+
npm config set //registry.npmjs.org/:_authToken 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
|
|
216
|
+
|
|
217
|
+
# Verify auth
|
|
218
|
+
npm whoami
|
|
219
|
+
|
|
220
|
+
# Publish
|
|
221
|
+
cd mcp-server && npm publish
|
|
222
|
+
|
|
223
|
+
# Verify publication
|
|
224
|
+
npm view mlgym-deploy version
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
**Last Updated:** 2026-01-22
|
|
230
|
+
**Maintainer:** chka_s5 (operations@stratus5.com)
|
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import crypto from 'crypto';
|
|
|
18
18
|
const execAsync = promisify(exec);
|
|
19
19
|
|
|
20
20
|
// Current version of this MCP server - INCREMENT FOR WORKFLOW FIXES
|
|
21
|
-
const CURRENT_VERSION = '3.3.
|
|
21
|
+
const CURRENT_VERSION = '3.3.44'; // Update README with installation and configuration instructions
|
|
22
22
|
const PACKAGE_NAME = 'mlgym-deploy';
|
|
23
23
|
|
|
24
24
|
// Debug logging configuration - ENABLED BY DEFAULT
|
|
@@ -90,7 +90,13 @@ const CONFIG = {
|
|
|
90
90
|
backend_url: process.env.MLGYM_API_ENDPOINT || 'https://backend.eu.ezb.net',
|
|
91
91
|
gitlab_url: 'https://git.mlgym.io',
|
|
92
92
|
coolify_url: 'https://coolify.eu.ezb.net',
|
|
93
|
-
config_file: path.join(os.homedir(), '.mlgym', 'mcp_config.json')
|
|
93
|
+
config_file: path.join(os.homedir(), '.mlgym', 'mcp_config.json'),
|
|
94
|
+
|
|
95
|
+
// Contact information (user-facing)
|
|
96
|
+
contact: {
|
|
97
|
+
support_email: 'operations@stratus5.com',
|
|
98
|
+
docs_url: 'https://mlgym.info'
|
|
99
|
+
}
|
|
94
100
|
};
|
|
95
101
|
|
|
96
102
|
// Helper to load/save authentication
|
|
@@ -4619,8 +4625,7 @@ Examples show both what users say AND the tool call that gets executed.
|
|
|
4619
4625
|
💡 Most parameters are optional with sensible defaults
|
|
4620
4626
|
|
|
4621
4627
|
📚 Documentation: https://mlgym.info
|
|
4622
|
-
|
|
4623
|
-
📊 Dashboard: https://platform.mlgym.info
|
|
4628
|
+
📧 Support: operations@stratus5.com
|
|
4624
4629
|
`;
|
|
4625
4630
|
|
|
4626
4631
|
return {
|
package/mcp.json.example
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"gitlab-backend": {
|
|
4
|
+
"command": "node",
|
|
5
|
+
"args": ["/path/to/your/gitlab_backend/mcp-server/index.js"],
|
|
6
|
+
"env": {
|
|
7
|
+
"GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
|
|
8
|
+
"GITLAB_URL": "https://git.mlgym.io",
|
|
9
|
+
"COOLIFY_URL": "https://coolify.eu.ezb.net"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mlgym-deploy",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.44",
|
|
4
4
|
"description": "MCP server for MLGym - Complete deployment management: deploy, configure, monitor, and rollback applications",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"mlgym-mcp": "
|
|
8
|
+
"mlgym-mcp": "index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node index.js"
|
|
@@ -20,13 +20,17 @@
|
|
|
20
20
|
],
|
|
21
21
|
"author": "MLGym Team",
|
|
22
22
|
"license": "MIT",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
},
|
|
23
26
|
"repository": {
|
|
24
27
|
"type": "git",
|
|
25
28
|
"url": "git@code.stratus5.com:chka/gitlab_backend.git"
|
|
26
29
|
},
|
|
27
30
|
"dependencies": {
|
|
28
|
-
"@modelcontextprotocol/sdk": "^
|
|
29
|
-
"axios": "^1.6.0"
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
32
|
+
"axios": "^1.6.0",
|
|
33
|
+
"package": "*"
|
|
30
34
|
},
|
|
31
35
|
"mcp": {
|
|
32
36
|
"name": "MLGym Deploy",
|