@rishibhushan/jenkins-mcp-server 1.0.3 → 1.0.4
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 +66 -0
- package/bin/jenkins-mcp.js +53 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -346,6 +346,72 @@ Add to `claude_desktop_config.json`:
|
|
|
346
346
|
|
|
347
347
|
---
|
|
348
348
|
|
|
349
|
+
## 🏢 Corporate Network / Proxy Setup
|
|
350
|
+
|
|
351
|
+
If you're behind a corporate proxy or firewall:
|
|
352
|
+
|
|
353
|
+
### Option 1: Set Environment Variables (Recommended)
|
|
354
|
+
```bash
|
|
355
|
+
# Set proxy environment variables
|
|
356
|
+
export HTTP_PROXY=http://your-proxy:8080
|
|
357
|
+
export HTTPS_PROXY=http://your-proxy:8080
|
|
358
|
+
export NO_PROXY=localhost,127.0.0.1
|
|
359
|
+
|
|
360
|
+
# Run the server (wrapper will auto-detect proxy)
|
|
361
|
+
npx @rishibhushan/jenkins-mcp-server --env-file .env
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Option 2: Configure npm and pip
|
|
365
|
+
```bash
|
|
366
|
+
# Configure npm proxy
|
|
367
|
+
npm config set proxy http://your-proxy:8080
|
|
368
|
+
npm config set https-proxy http://your-proxy:8080
|
|
369
|
+
|
|
370
|
+
# Configure pip proxy (for SSL issues)
|
|
371
|
+
pip config set global.proxy http://your-proxy:8080
|
|
372
|
+
pip config set global.trusted-host "pypi.org pypi.python.org files.pythonhosted.org"
|
|
373
|
+
|
|
374
|
+
# Run the server
|
|
375
|
+
npx @rishibhushan/jenkins-mcp-server --env-file .env
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Option 3: Claude Desktop with Proxy
|
|
379
|
+
|
|
380
|
+
Add proxy settings to your `claude_desktop_config.json`:
|
|
381
|
+
```json
|
|
382
|
+
{
|
|
383
|
+
"mcpServers": {
|
|
384
|
+
"jenkins": {
|
|
385
|
+
"command": "npx",
|
|
386
|
+
"args": [
|
|
387
|
+
"@rishibhushan/jenkins-mcp-server",
|
|
388
|
+
"--env-file",
|
|
389
|
+
"/path/to/.env"
|
|
390
|
+
],
|
|
391
|
+
"env": {
|
|
392
|
+
"HTTP_PROXY": "http://your-proxy:8080",
|
|
393
|
+
"HTTPS_PROXY": "http://your-proxy:8080",
|
|
394
|
+
"NO_PROXY": "localhost,127.0.0.1"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### SSL Certificate Issues
|
|
402
|
+
|
|
403
|
+
If you encounter SSL certificate errors:
|
|
404
|
+
```bash
|
|
405
|
+
# Disable SSL verification for pip (one-time setup)
|
|
406
|
+
pip config set global.trusted-host "pypi.org pypi.python.org files.pythonhosted.org"
|
|
407
|
+
|
|
408
|
+
# Or use environment variable
|
|
409
|
+
export PIP_TRUSTED_HOST="pypi.org pypi.python.org files.pythonhosted.org"
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
The Node.js wrapper automatically handles SSL certificate issues when it detects proxy environment variables.
|
|
413
|
+
|
|
414
|
+
---
|
|
349
415
|
## 💡 Usage Examples
|
|
350
416
|
|
|
351
417
|
### Natural Language Commands
|
package/bin/jenkins-mcp.js
CHANGED
|
@@ -172,13 +172,36 @@ function installDependencies(venvPath) {
|
|
|
172
172
|
log('Installing Python dependencies...', 'yellow');
|
|
173
173
|
log('This may take a minute...', 'blue');
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
// Build pip install command with proxy-friendly options
|
|
176
|
+
const pipArgs = ['install', '-r', requirementsPath];
|
|
177
|
+
|
|
178
|
+
// Add proxy-friendly options to handle corporate networks
|
|
179
|
+
const proxyFriendlyArgs = [
|
|
180
|
+
'--trusted-host', 'pypi.org',
|
|
181
|
+
'--trusted-host', 'pypi.python.org',
|
|
182
|
+
'--trusted-host', 'files.pythonhosted.org'
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
// Add proxy if environment variable is set
|
|
186
|
+
const proxy = process.env.HTTP_PROXY || process.env.http_proxy ||
|
|
187
|
+
process.env.HTTPS_PROXY || process.env.https_proxy;
|
|
188
|
+
|
|
189
|
+
if (proxy) {
|
|
190
|
+
log(`Using proxy: ${proxy}`, 'blue');
|
|
191
|
+
pipArgs.push('--proxy', proxy);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Add all proxy-friendly args
|
|
195
|
+
pipArgs.push(...proxyFriendlyArgs);
|
|
196
|
+
|
|
197
|
+
// Install requirements
|
|
198
|
+
const installReqs = spawnSync(pip, pipArgs, {
|
|
176
199
|
cwd: projectRoot,
|
|
177
200
|
stdio: 'inherit'
|
|
178
201
|
});
|
|
179
202
|
|
|
180
|
-
if (
|
|
181
|
-
error('Failed to install dependencies');
|
|
203
|
+
if (installReqs.status !== 0) {
|
|
204
|
+
error('Failed to install dependencies from requirements.txt');
|
|
182
205
|
console.error('\nTroubleshooting:');
|
|
183
206
|
console.error(' 1. Check your internet connection');
|
|
184
207
|
console.error(' 2. If behind a proxy, set HTTP_PROXY/HTTPS_PROXY env vars');
|
|
@@ -186,7 +209,33 @@ function installDependencies(venvPath) {
|
|
|
186
209
|
process.exit(1);
|
|
187
210
|
}
|
|
188
211
|
|
|
189
|
-
log('✓
|
|
212
|
+
log('✓ Requirements installed', 'green');
|
|
213
|
+
|
|
214
|
+
// Install the package itself in editable mode
|
|
215
|
+
log('Installing jenkins-mcp-server package...', 'yellow');
|
|
216
|
+
|
|
217
|
+
const packageArgs = ['install', '-e', '.'];
|
|
218
|
+
|
|
219
|
+
// Add same proxy-friendly options
|
|
220
|
+
if (proxy) {
|
|
221
|
+
packageArgs.push('--proxy', proxy);
|
|
222
|
+
}
|
|
223
|
+
packageArgs.push(...proxyFriendlyArgs);
|
|
224
|
+
|
|
225
|
+
const installPkg = spawnSync(pip, packageArgs, {
|
|
226
|
+
cwd: projectRoot,
|
|
227
|
+
stdio: 'inherit'
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
if (installPkg.status !== 0) {
|
|
231
|
+
error('Failed to install jenkins-mcp-server package');
|
|
232
|
+
console.error('\nTroubleshooting:');
|
|
233
|
+
console.error(' 1. Ensure pyproject.toml or setup.py exists');
|
|
234
|
+
console.error(' 2. Try manually: .venv/bin/pip install -e .');
|
|
235
|
+
process.exit(1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
log('✓ Package installed', 'green');
|
|
190
239
|
}
|
|
191
240
|
|
|
192
241
|
/**
|