mcpick 0.0.3 → 0.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/CHANGELOG.md +6 -0
- package/README.md +2 -4
- package/dist/commands/launch.js +12 -23
- package/dist/index.js +0 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -59,8 +59,6 @@ McPick provides an intuitive CLI menu to:
|
|
|
59
59
|
preserving other Claude Code settings
|
|
60
60
|
- 💾 **Backup & restore** - Create focused backups of your MCP server
|
|
61
61
|
configurations
|
|
62
|
-
- 🚀 **Quick launch** - Start Claude Code with your optimized
|
|
63
|
-
configuration
|
|
64
62
|
|
|
65
63
|
## Features
|
|
66
64
|
|
|
@@ -74,7 +72,6 @@ McPick provides an intuitive CLI menu to:
|
|
|
74
72
|
│ ○ Backup config
|
|
75
73
|
│ ○ Add MCP server
|
|
76
74
|
│ ○ Restore from backup
|
|
77
|
-
│ ○ Launch Claude Code
|
|
78
75
|
│ ○ Exit
|
|
79
76
|
└
|
|
80
77
|
```
|
|
@@ -103,7 +100,8 @@ McPick provides an intuitive CLI menu to:
|
|
|
103
100
|
|
|
104
101
|
1. **Before a coding session**: Run MCPick and enable only relevant
|
|
105
102
|
servers (e.g., just database tools for DB work)
|
|
106
|
-
2. **Launch Claude Code**:
|
|
103
|
+
2. **Launch Claude Code**: Run `claude` to start with your configured
|
|
104
|
+
servers
|
|
107
105
|
3. **Switch contexts**: Re-run MCPick to enable different servers for
|
|
108
106
|
different tasks
|
|
109
107
|
|
package/dist/commands/launch.js
CHANGED
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { outro } from '@clack/prompts';
|
|
2
|
+
import { execSync } from 'node:child_process';
|
|
3
3
|
export async function launch_claude_code() {
|
|
4
|
-
const s = spinner();
|
|
5
4
|
try {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
outro('Launching Claude Code...');
|
|
6
|
+
// Replace the current process with claude using exec
|
|
7
|
+
// This ensures the terminal stays valid and Claude gets full control
|
|
8
|
+
execSync('claude', {
|
|
9
|
+
stdio: 'inherit',
|
|
10
10
|
});
|
|
11
|
-
claude_process.unref();
|
|
12
|
-
await new Promise((resolve, reject) => {
|
|
13
|
-
claude_process.on('error', (error) => {
|
|
14
|
-
if (error.message.includes('ENOENT')) {
|
|
15
|
-
reject(new Error('Claude Code not found. Make sure it is installed and in your PATH.'));
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
reject(error);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
setTimeout(() => {
|
|
22
|
-
resolve(void 0);
|
|
23
|
-
}, 1000);
|
|
24
|
-
});
|
|
25
|
-
s.stop('Claude Code launched successfully!');
|
|
26
11
|
}
|
|
27
12
|
catch (error) {
|
|
28
|
-
|
|
13
|
+
if (error instanceof Error && 'status' in error) {
|
|
14
|
+
// Claude exited normally, just return
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// Only throw for actual errors (not exit codes)
|
|
29
18
|
throw new Error(`Failed to launch Claude Code: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
30
19
|
}
|
|
31
20
|
}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import { cancel, intro, isCancel, outro, select, } from '@clack/prompts';
|
|
|
3
3
|
import { add_server } from './commands/add-server.js';
|
|
4
4
|
import { backup_config } from './commands/backup.js';
|
|
5
5
|
import { edit_config } from './commands/edit-config.js';
|
|
6
|
-
import { launch_claude_code } from './commands/launch.js';
|
|
7
6
|
import { restore_config } from './commands/restore.js';
|
|
8
7
|
async function main() {
|
|
9
8
|
intro('MCPick - MCP Server Configuration Manager');
|
|
@@ -32,11 +31,6 @@ async function main() {
|
|
|
32
31
|
label: 'Restore from backup',
|
|
33
32
|
hint: 'Restore from a previous backup',
|
|
34
33
|
},
|
|
35
|
-
{
|
|
36
|
-
value: 'launch',
|
|
37
|
-
label: 'Launch Claude Code',
|
|
38
|
-
hint: 'Start Claude Code with current config',
|
|
39
|
-
},
|
|
40
34
|
{
|
|
41
35
|
value: 'exit',
|
|
42
36
|
label: 'Exit',
|
|
@@ -61,9 +55,6 @@ async function main() {
|
|
|
61
55
|
case 'restore':
|
|
62
56
|
await restore_config();
|
|
63
57
|
break;
|
|
64
|
-
case 'launch':
|
|
65
|
-
await launch_claude_code();
|
|
66
|
-
break;
|
|
67
58
|
case 'exit':
|
|
68
59
|
outro('Goodbye!');
|
|
69
60
|
process.exit(0);
|