@meldocio/mcp-stdio-proxy 1.0.13 → 1.0.14
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 +23 -1
- package/bin/cli.js +151 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ This command will:
|
|
|
27
27
|
- ✅ Automatically find your Claude Desktop configuration file
|
|
28
28
|
- ✅ Add Meldoc MCP configuration (preserving existing MCP servers)
|
|
29
29
|
- ✅ Create the config file and directory if needed
|
|
30
|
+
- ✅ Check if already installed (won't duplicate if already configured)
|
|
30
31
|
- ✅ Show you the next steps
|
|
31
32
|
|
|
32
33
|
After running `install`, you just need to:
|
|
@@ -35,6 +36,21 @@ After running `install`, you just need to:
|
|
|
35
36
|
|
|
36
37
|
Done! 🎉
|
|
37
38
|
|
|
39
|
+
### Uninstalling
|
|
40
|
+
|
|
41
|
+
To remove Meldoc MCP from Claude Desktop:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx @meldocio/mcp-stdio-proxy@latest uninstall
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This will:
|
|
48
|
+
- ✅ Remove Meldoc MCP configuration from Claude Desktop
|
|
49
|
+
- ✅ Preserve other MCP servers
|
|
50
|
+
- ✅ Clean up empty `mcpServers` object if needed
|
|
51
|
+
|
|
52
|
+
After running `uninstall`, restart Claude Desktop for changes to take effect.
|
|
53
|
+
|
|
38
54
|
---
|
|
39
55
|
|
|
40
56
|
### Manual Installation
|
|
@@ -212,11 +228,14 @@ When you ask Claude to do something with your documentation:
|
|
|
212
228
|
|
|
213
229
|
## Working Commands
|
|
214
230
|
|
|
215
|
-
### Installation
|
|
231
|
+
### Installation commands
|
|
216
232
|
|
|
217
233
|
```bash
|
|
218
234
|
# Automatically configure Claude Desktop for Meldoc MCP
|
|
219
235
|
npx @meldocio/mcp-stdio-proxy@latest install
|
|
236
|
+
|
|
237
|
+
# Remove Meldoc MCP configuration from Claude Desktop
|
|
238
|
+
npx @meldocio/mcp-stdio-proxy@latest uninstall
|
|
220
239
|
```
|
|
221
240
|
|
|
222
241
|
### Authentication commands
|
|
@@ -252,6 +271,9 @@ npx @meldocio/mcp-stdio-proxy@latest config get-workspace
|
|
|
252
271
|
```bash
|
|
253
272
|
# Automatically configure Claude Desktop
|
|
254
273
|
npx @meldocio/mcp-stdio-proxy@latest install
|
|
274
|
+
|
|
275
|
+
# Remove configuration
|
|
276
|
+
npx @meldocio/mcp-stdio-proxy@latest uninstall
|
|
255
277
|
```
|
|
256
278
|
|
|
257
279
|
### Help
|
package/bin/cli.js
CHANGED
|
@@ -218,6 +218,27 @@ function getClaudeDesktopConfigPath() {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Get expected Meldoc MCP configuration
|
|
223
|
+
*/
|
|
224
|
+
function getExpectedMeldocConfig() {
|
|
225
|
+
return {
|
|
226
|
+
command: 'npx',
|
|
227
|
+
args: ['-y', '@meldocio/mcp-stdio-proxy@latest']
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Check if two configurations are equal (deep comparison)
|
|
233
|
+
*/
|
|
234
|
+
function configsEqual(config1, config2) {
|
|
235
|
+
if (!config1 || !config2) return false;
|
|
236
|
+
if (config1.command !== config2.command) return false;
|
|
237
|
+
if (!Array.isArray(config1.args) || !Array.isArray(config2.args)) return false;
|
|
238
|
+
if (config1.args.length !== config2.args.length) return false;
|
|
239
|
+
return config1.args.every((arg, i) => arg === config2.args[i]);
|
|
240
|
+
}
|
|
241
|
+
|
|
221
242
|
/**
|
|
222
243
|
* Handle install command - automatically configure Claude Desktop
|
|
223
244
|
*/
|
|
@@ -228,6 +249,7 @@ function handleInstall() {
|
|
|
228
249
|
|
|
229
250
|
const configPath = getClaudeDesktopConfigPath();
|
|
230
251
|
const configDir = path.dirname(configPath);
|
|
252
|
+
const expectedConfig = getExpectedMeldocConfig();
|
|
231
253
|
|
|
232
254
|
logger.info(`Config file location: ${logger.highlight(configPath)}`);
|
|
233
255
|
console.log();
|
|
@@ -257,29 +279,39 @@ function handleInstall() {
|
|
|
257
279
|
|
|
258
280
|
// Check if meldoc is already configured
|
|
259
281
|
if (config.mcpServers.meldoc) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
logger.info('Current configuration:');
|
|
263
|
-
console.log(' ' + logger.highlight(JSON.stringify(config.mcpServers.meldoc, null, 2)));
|
|
264
|
-
console.log();
|
|
282
|
+
const existingConfig = config.mcpServers.meldoc;
|
|
283
|
+
const isEqual = configsEqual(existingConfig, expectedConfig);
|
|
265
284
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
285
|
+
if (isEqual) {
|
|
286
|
+
logger.success('Meldoc MCP is already configured correctly!');
|
|
287
|
+
console.log();
|
|
288
|
+
logger.info('Current configuration:');
|
|
289
|
+
console.log(' ' + logger.highlight(JSON.stringify(existingConfig, null, 2)));
|
|
290
|
+
console.log();
|
|
291
|
+
logger.info('No changes needed. Next steps:');
|
|
292
|
+
console.log(' 1. Restart Claude Desktop (if you haven\'t already)');
|
|
293
|
+
console.log(' 2. Run: ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
294
|
+
console.log();
|
|
295
|
+
process.exit(0);
|
|
296
|
+
} else {
|
|
297
|
+
logger.warn('Meldoc MCP is already configured, but with different settings');
|
|
298
|
+
console.log();
|
|
299
|
+
logger.info('Current configuration:');
|
|
300
|
+
console.log(' ' + logger.highlight(JSON.stringify(existingConfig, null, 2)));
|
|
301
|
+
console.log();
|
|
302
|
+
logger.info('Expected configuration:');
|
|
303
|
+
console.log(' ' + logger.highlight(JSON.stringify(expectedConfig, null, 2)));
|
|
304
|
+
console.log();
|
|
305
|
+
logger.info('To update the configuration, run:');
|
|
306
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy uninstall'));
|
|
307
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy install'));
|
|
308
|
+
console.log();
|
|
309
|
+
process.exit(0);
|
|
310
|
+
}
|
|
276
311
|
}
|
|
277
312
|
|
|
278
313
|
// Add meldoc configuration
|
|
279
|
-
config.mcpServers.meldoc =
|
|
280
|
-
command: 'npx',
|
|
281
|
-
args: ['-y', '@meldocio/mcp-stdio-proxy@latest']
|
|
282
|
-
};
|
|
314
|
+
config.mcpServers.meldoc = expectedConfig;
|
|
283
315
|
|
|
284
316
|
// Create directory if it doesn't exist
|
|
285
317
|
if (!fs.existsSync(configDir)) {
|
|
@@ -330,10 +362,7 @@ function handleInstall() {
|
|
|
330
362
|
console.log(' 2. Adding this configuration:');
|
|
331
363
|
console.log(' ' + logger.highlight(JSON.stringify({
|
|
332
364
|
mcpServers: {
|
|
333
|
-
meldoc:
|
|
334
|
-
command: 'npx',
|
|
335
|
-
args: ['-y', '@meldocio/mcp-stdio-proxy@latest']
|
|
336
|
-
}
|
|
365
|
+
meldoc: getExpectedMeldocConfig()
|
|
337
366
|
}
|
|
338
367
|
}, null, 2)));
|
|
339
368
|
console.log();
|
|
@@ -341,6 +370,95 @@ function handleInstall() {
|
|
|
341
370
|
}
|
|
342
371
|
}
|
|
343
372
|
|
|
373
|
+
/**
|
|
374
|
+
* Handle uninstall command - remove Meldoc MCP configuration from Claude Desktop
|
|
375
|
+
*/
|
|
376
|
+
function handleUninstall() {
|
|
377
|
+
try {
|
|
378
|
+
logger.section('🗑️ Uninstalling Meldoc MCP from Claude Desktop');
|
|
379
|
+
console.log();
|
|
380
|
+
|
|
381
|
+
const configPath = getClaudeDesktopConfigPath();
|
|
382
|
+
|
|
383
|
+
logger.info(`Config file location: ${logger.highlight(configPath)}`);
|
|
384
|
+
console.log();
|
|
385
|
+
|
|
386
|
+
// Check if config file exists
|
|
387
|
+
if (!fs.existsSync(configPath)) {
|
|
388
|
+
logger.warn('Claude Desktop configuration file not found');
|
|
389
|
+
logger.info('Meldoc MCP is not configured (nothing to remove)');
|
|
390
|
+
console.log();
|
|
391
|
+
process.exit(0);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Read existing config
|
|
395
|
+
let config = {};
|
|
396
|
+
try {
|
|
397
|
+
const content = fs.readFileSync(configPath, 'utf8');
|
|
398
|
+
config = JSON.parse(content);
|
|
399
|
+
} catch (error) {
|
|
400
|
+
logger.error(`Failed to read config file: ${error.message}`);
|
|
401
|
+
process.exit(1);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Check if meldoc is configured
|
|
405
|
+
if (!config.mcpServers || !config.mcpServers.meldoc) {
|
|
406
|
+
logger.warn('Meldoc MCP is not configured in Claude Desktop');
|
|
407
|
+
logger.info('Nothing to remove');
|
|
408
|
+
console.log();
|
|
409
|
+
process.exit(0);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// Show what will be removed
|
|
413
|
+
logger.info('Current Meldoc configuration:');
|
|
414
|
+
console.log(' ' + logger.highlight(JSON.stringify(config.mcpServers.meldoc, null, 2)));
|
|
415
|
+
console.log();
|
|
416
|
+
|
|
417
|
+
// Remove meldoc configuration
|
|
418
|
+
delete config.mcpServers.meldoc;
|
|
419
|
+
|
|
420
|
+
// If mcpServers is now empty, remove it too
|
|
421
|
+
if (Object.keys(config.mcpServers).length === 0) {
|
|
422
|
+
delete config.mcpServers;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// Write config file back
|
|
426
|
+
const configContent = JSON.stringify(config, null, 2);
|
|
427
|
+
fs.writeFileSync(configPath, configContent, 'utf8');
|
|
428
|
+
|
|
429
|
+
logger.success('Meldoc MCP configuration removed successfully!');
|
|
430
|
+
console.log();
|
|
431
|
+
|
|
432
|
+
// Count remaining MCP servers
|
|
433
|
+
if (config.mcpServers && Object.keys(config.mcpServers).length > 0) {
|
|
434
|
+
const remainingServers = Object.keys(config.mcpServers);
|
|
435
|
+
logger.info(`Remaining MCP server(s): ${remainingServers.join(', ')}`);
|
|
436
|
+
console.log();
|
|
437
|
+
} else {
|
|
438
|
+
logger.info('No other MCP servers configured');
|
|
439
|
+
console.log();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Next steps
|
|
443
|
+
logger.section('✅ Uninstallation Complete!');
|
|
444
|
+
console.log();
|
|
445
|
+
logger.info('Next steps:');
|
|
446
|
+
console.log(' 1. Restart Claude Desktop for changes to take effect');
|
|
447
|
+
console.log(' 2. To reinstall, run: ' + logger.highlight('npx @meldocio/mcp-stdio-proxy install'));
|
|
448
|
+
console.log();
|
|
449
|
+
|
|
450
|
+
process.exit(0);
|
|
451
|
+
} catch (error) {
|
|
452
|
+
logger.error(`Uninstallation failed: ${error.message}`);
|
|
453
|
+
console.log();
|
|
454
|
+
logger.info('You can manually remove Meldoc MCP by:');
|
|
455
|
+
console.log(' 1. Opening the config file: ' + logger.highlight(getClaudeDesktopConfigPath()));
|
|
456
|
+
console.log(' 2. Removing the "meldoc" entry from "mcpServers" object');
|
|
457
|
+
console.log();
|
|
458
|
+
process.exit(1);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
344
462
|
/**
|
|
345
463
|
* Handle help command
|
|
346
464
|
*/
|
|
@@ -379,12 +497,17 @@ function handleHelp() {
|
|
|
379
497
|
console.log(' Automatically configure Claude Desktop for Meldoc MCP');
|
|
380
498
|
console.log();
|
|
381
499
|
|
|
500
|
+
console.log(' ' + logger.highlight('uninstall'));
|
|
501
|
+
console.log(' Remove Meldoc MCP configuration from Claude Desktop');
|
|
502
|
+
console.log();
|
|
503
|
+
|
|
382
504
|
console.log(' ' + logger.highlight('help'));
|
|
383
505
|
console.log(' Show this help message');
|
|
384
506
|
console.log();
|
|
385
507
|
|
|
386
508
|
console.log(logger.label('Examples:'));
|
|
387
509
|
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy install'));
|
|
510
|
+
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy uninstall'));
|
|
388
511
|
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy auth login'));
|
|
389
512
|
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config set-workspace my-workspace'));
|
|
390
513
|
console.log(' ' + logger.highlight('npx @meldocio/mcp-stdio-proxy config list-workspaces'));
|
|
@@ -407,6 +530,7 @@ function showUsageHints() {
|
|
|
407
530
|
console.log(' ' + logger.highlight('config get-workspace') + ' - Get current workspace');
|
|
408
531
|
console.log(' ' + logger.highlight('config list-workspaces') + ' - List workspaces');
|
|
409
532
|
console.log(' ' + logger.highlight('install') + ' - Configure Claude Desktop');
|
|
533
|
+
console.log(' ' + logger.highlight('uninstall') + ' - Remove configuration');
|
|
410
534
|
console.log(' ' + logger.highlight('help') + ' - Show detailed help');
|
|
411
535
|
console.log();
|
|
412
536
|
console.log(logger.label('For more information, run:'));
|
|
@@ -434,6 +558,8 @@ async function main() {
|
|
|
434
558
|
handleHelp();
|
|
435
559
|
} else if (command === 'install') {
|
|
436
560
|
handleInstall();
|
|
561
|
+
} else if (command === 'uninstall') {
|
|
562
|
+
handleUninstall();
|
|
437
563
|
} else if (command === 'auth') {
|
|
438
564
|
if (subcommand === 'login') {
|
|
439
565
|
await handleAuthLogin();
|
|
@@ -481,5 +607,6 @@ module.exports = {
|
|
|
481
607
|
handleConfigSetWorkspace,
|
|
482
608
|
handleConfigGetWorkspace,
|
|
483
609
|
handleConfigListWorkspaces,
|
|
484
|
-
handleInstall
|
|
610
|
+
handleInstall,
|
|
611
|
+
handleUninstall
|
|
485
612
|
};
|