mcpick 0.0.22 → 0.0.23
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 +11 -0
- package/README.md +4 -0
- package/dist/add-LJQa2my2.js +164 -0
- package/dist/add-json-TEdYweZ5.js +95 -0
- package/dist/{backup-bdg6dvsb.js → backup-kyS5IVIr.js} +5 -5
- package/dist/{cache-CSUcGdZP.js → cache-DTfzTsEE.js} +3 -3
- package/dist/{cli-avr5R1LO.js → cli-By-0nYNQ.js} +22 -21
- package/dist/{clients-CSQgqHzb.js → clients-qMozizys.js} +3 -3
- package/dist/{clone-CQ0skkT6.js → clone-BVhYjRGO.js} +5 -5
- package/dist/{config-BhX4eAgg.js → config-DzMmTJYL.js} +4 -4
- package/dist/{dev-CTDg5g-c.js → dev-Cst8WkQ-.js} +6 -6
- package/dist/disable-BaOs9lrm.js +83 -0
- package/dist/enable--3mjSmTq.js +84 -0
- package/dist/{get-l-eAJhBy.js → get-CjhNWyRj.js} +2 -2
- package/dist/{hooks-BWZ_Kgx3.js → hooks-DFmxgD0t.js} +3 -4
- package/dist/index.js +533 -68
- package/dist/{list-By--kltj.js → list-D5CkCXpP.js} +5 -5
- package/dist/{marketplace-DdiKDDKK.js → marketplace-C3EGyIG0.js} +3 -3
- package/dist/{output-BgN9Uuxf.js → output-HtT5HCof.js} +2 -2
- package/dist/{paths-6wrIM8yh.js → paths-BPISiJi4.js} +1 -1
- package/dist/{plugin-cache-DKcW8LGV.js → plugin-cache-BSgB42wa.js} +35 -16
- package/dist/{plugins-CsXE8AH4.js → plugins-Dn2mPFKm.js} +4 -5
- package/dist/{profile-DzGPsdsl.js → profile-Dq3ORPil.js} +4 -5
- package/dist/{redact-Dltz2gde.js → redact-wBMtzbno.js} +1 -1
- package/dist/{reload-C29-vuvy.js → reload-257iU7Z7.js} +2 -2
- package/dist/remove-26XFzkPd.js +87 -0
- package/dist/{reset-project-choices-Dhh4CxIC.js → reset-project-choices-D2F04LfC.js} +2 -2
- package/dist/{restore-BI8aiszM.js → restore-BYYsoNqF.js} +5 -6
- package/dist/rollback-CPdaME91.js +55 -0
- package/dist/{skills-DPBDmION.js → skills-DfWk9mpk.js} +2 -2
- package/dist/{validation-qWlF51fw.js → validation-xMlbgGCF.js} +1 -1
- package/package.json +4 -4
- package/.github/copilot-instructions.md +0 -50
- package/.github/workflows/ci.yml +0 -26
- package/.vscode/settings.json +0 -5
- package/CONTEXT.md +0 -49
- package/dist/add-Bok0qbXi.js +0 -112
- package/dist/add-json-C44vy2A_.js +0 -58
- package/dist/atomic-write-4lANmzsO.js +0 -26
- package/dist/disable-DLlOj7sc.js +0 -38
- package/dist/enable-CGFYYC2A.js +0 -39
- package/dist/remove-B5q4rQRU.js +0 -30
- package/dist/settings-CZR8bVfh.js +0 -201
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# mcpick
|
|
2
2
|
|
|
3
|
+
## 0.0.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 291b1d4: Add config rollback command, scoped Claude removals, author
|
|
8
|
+
metadata, and rollback backup tests.
|
|
9
|
+
- 92a0d0e: Improve marketplace add validation, authentication checks,
|
|
10
|
+
and error messages for GitHub repository access failures.
|
|
11
|
+
- 1d191a5: Add safer config writes, non-Claude client mutation
|
|
12
|
+
commands, shell-free git execution, and adapter tests.
|
|
13
|
+
|
|
3
14
|
## 0.0.22
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -151,6 +151,10 @@ npx mcpick --list-profiles
|
|
|
151
151
|
|
|
152
152
|
npx mcpick backup
|
|
153
153
|
npx mcpick restore [file]
|
|
154
|
+
|
|
155
|
+
# Safe-write rollback backups created before config mutations
|
|
156
|
+
npx mcpick rollback --list
|
|
157
|
+
npx mcpick rollback [file]
|
|
154
158
|
```
|
|
155
159
|
|
|
156
160
|
## Interactive TUI
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { n as validate_mcp_server } from "./validation-xMlbgGCF.js";
|
|
2
|
+
import { A as add_client_server, F as resolve_client_location, M as get_client_adapter, d as add_mcp_via_cli, w as add_server_to_registry } from "./index.js";
|
|
3
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
4
|
+
import { defineCommand } from "citty";
|
|
5
|
+
//#region src/cli/commands/add.ts
|
|
6
|
+
var add_default = defineCommand({
|
|
7
|
+
meta: {
|
|
8
|
+
name: "add",
|
|
9
|
+
description: "Add a new MCP server to the registry and enable it"
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
name: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "Server name",
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
command: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Command to run (for stdio transport)"
|
|
20
|
+
},
|
|
21
|
+
args: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Comma-separated arguments (e.g. \"npx,-y,mcp-sqlite\")"
|
|
24
|
+
},
|
|
25
|
+
url: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "URL (for sse or http transport)"
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Transport type: stdio, sse, or http (default: stdio)",
|
|
32
|
+
default: "stdio"
|
|
33
|
+
},
|
|
34
|
+
env: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Environment variables as KEY=val,KEY=val"
|
|
37
|
+
},
|
|
38
|
+
headers: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "HTTP headers as KEY=val,KEY=val"
|
|
41
|
+
},
|
|
42
|
+
description: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Server description"
|
|
45
|
+
},
|
|
46
|
+
client: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Client to edit: claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi",
|
|
49
|
+
default: "claude-code"
|
|
50
|
+
},
|
|
51
|
+
scope: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Scope: local, project, or user (default: local for Claude Code)"
|
|
54
|
+
},
|
|
55
|
+
location: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Exact config path when a client has multiple matching locations"
|
|
58
|
+
},
|
|
59
|
+
json: {
|
|
60
|
+
type: "boolean",
|
|
61
|
+
description: "Output as JSON",
|
|
62
|
+
default: false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
async run({ args }) {
|
|
66
|
+
const transport = args.type;
|
|
67
|
+
if (![
|
|
68
|
+
"stdio",
|
|
69
|
+
"sse",
|
|
70
|
+
"http"
|
|
71
|
+
].includes(transport)) error(`Invalid type: ${transport}. Use stdio, sse, or http.`);
|
|
72
|
+
const add_args = args;
|
|
73
|
+
const portable = build_portable_server(add_args, transport);
|
|
74
|
+
if (add_args.client && add_args.client !== "claude-code") {
|
|
75
|
+
await add_to_client(add_args.client, portable, add_args.scope, add_args.location, add_args.json);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const scope = add_args.scope || "local";
|
|
79
|
+
if (![
|
|
80
|
+
"local",
|
|
81
|
+
"project",
|
|
82
|
+
"user"
|
|
83
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
84
|
+
const server_data = {
|
|
85
|
+
name: portable.name,
|
|
86
|
+
...transport !== "stdio" ? { type: transport } : {},
|
|
87
|
+
...portable.command ? { command: portable.command } : {},
|
|
88
|
+
...portable.args ? { args: portable.args } : {},
|
|
89
|
+
...portable.url ? { url: portable.url } : {},
|
|
90
|
+
...portable.env ? { env: portable.env } : {},
|
|
91
|
+
...portable.headers ? { headers: portable.headers } : {},
|
|
92
|
+
...portable.description ? { description: portable.description } : {}
|
|
93
|
+
};
|
|
94
|
+
let server;
|
|
95
|
+
try {
|
|
96
|
+
server = validate_mcp_server(server_data);
|
|
97
|
+
} catch (err) {
|
|
98
|
+
error(`Invalid server config: ${err instanceof Error ? err.message : "validation failed"}`);
|
|
99
|
+
}
|
|
100
|
+
await add_server_to_registry(server);
|
|
101
|
+
const result = await add_mcp_via_cli(server, scope);
|
|
102
|
+
if (add_args.json) output({
|
|
103
|
+
added: server.name,
|
|
104
|
+
client: "claude-code",
|
|
105
|
+
scope,
|
|
106
|
+
cli: result.success,
|
|
107
|
+
error: result.error
|
|
108
|
+
}, true);
|
|
109
|
+
else if (result.success) console.log(`Added '${server.name}' and enabled (scope: ${scope})`);
|
|
110
|
+
else console.log(`Added '${server.name}' to registry but CLI failed: ${result.error}`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
function build_portable_server(args, transport) {
|
|
114
|
+
const server = {
|
|
115
|
+
name: args.name,
|
|
116
|
+
transport
|
|
117
|
+
};
|
|
118
|
+
if (transport === "stdio") {
|
|
119
|
+
if (!args.command) error("--command is required for stdio transport");
|
|
120
|
+
server.command = args.command;
|
|
121
|
+
if (args.args) server.args = args.args.split(",");
|
|
122
|
+
} else {
|
|
123
|
+
if (!args.url) error(`--url is required for ${transport} transport`);
|
|
124
|
+
server.url = args.url;
|
|
125
|
+
if (args.headers) server.headers = parse_key_value_pairs(args.headers);
|
|
126
|
+
}
|
|
127
|
+
if (args.env) server.env = parse_key_value_pairs(args.env);
|
|
128
|
+
if (args.description) server.description = args.description;
|
|
129
|
+
return server;
|
|
130
|
+
}
|
|
131
|
+
async function add_to_client(client, server, scope, location_path, json) {
|
|
132
|
+
const adapter = get_client_adapter(client);
|
|
133
|
+
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
134
|
+
if (scope && ![
|
|
135
|
+
"local",
|
|
136
|
+
"project",
|
|
137
|
+
"user"
|
|
138
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
139
|
+
try {
|
|
140
|
+
const location = resolve_client_location(adapter, scope, location_path);
|
|
141
|
+
await add_client_server(adapter, location, server);
|
|
142
|
+
if (json) output({
|
|
143
|
+
added: server.name,
|
|
144
|
+
client: adapter.id,
|
|
145
|
+
scope: location.scope,
|
|
146
|
+
location: location.path
|
|
147
|
+
}, true);
|
|
148
|
+
else console.log(`Added '${server.name}' (${adapter.id}:${location.scope})`);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
error(err instanceof Error ? err.message : "Failed to add server");
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function parse_key_value_pairs(input) {
|
|
154
|
+
const result = {};
|
|
155
|
+
for (const pair of input.split(",")) {
|
|
156
|
+
const eq = pair.indexOf("=");
|
|
157
|
+
if (eq > 0) result[pair.substring(0, eq)] = pair.substring(eq + 1);
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
export { add_default as default };
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=add-LJQa2my2.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { F as resolve_client_location, M as get_client_adapter, _ as mcp_add_json_via_cli, j as add_client_server_config } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
|
+
import { defineCommand } from "citty";
|
|
4
|
+
//#region src/cli/commands/add-json.ts
|
|
5
|
+
var add_json_default = defineCommand({
|
|
6
|
+
meta: {
|
|
7
|
+
name: "add-json",
|
|
8
|
+
description: "Add an MCP server from a JSON configuration string"
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
name: {
|
|
12
|
+
type: "positional",
|
|
13
|
+
description: "Server name",
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
config: {
|
|
17
|
+
type: "positional",
|
|
18
|
+
description: "JSON configuration string",
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
client: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Client to edit: claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi",
|
|
24
|
+
default: "claude-code"
|
|
25
|
+
},
|
|
26
|
+
scope: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Scope: local, project, or user (default: local for Claude Code)"
|
|
29
|
+
},
|
|
30
|
+
location: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Exact config path when a client has multiple matching locations"
|
|
33
|
+
},
|
|
34
|
+
json: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
description: "Output as JSON",
|
|
37
|
+
default: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
async run({ args }) {
|
|
41
|
+
let parsed;
|
|
42
|
+
try {
|
|
43
|
+
parsed = JSON.parse(args.config);
|
|
44
|
+
} catch {
|
|
45
|
+
error("Invalid JSON configuration. Provide a valid JSON string.");
|
|
46
|
+
}
|
|
47
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) error("JSON configuration must be an object.");
|
|
48
|
+
if (args.client && args.client !== "claude-code") {
|
|
49
|
+
await add_json_to_client(args.client, args.name, parsed, args.scope, args.location, args.json);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const scope = args.scope || "local";
|
|
53
|
+
if (![
|
|
54
|
+
"local",
|
|
55
|
+
"project",
|
|
56
|
+
"user"
|
|
57
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
58
|
+
const result = await mcp_add_json_via_cli(args.name, args.config, scope);
|
|
59
|
+
if (args.json) output({
|
|
60
|
+
added: args.name,
|
|
61
|
+
client: "claude-code",
|
|
62
|
+
scope,
|
|
63
|
+
success: result.success,
|
|
64
|
+
error: result.error
|
|
65
|
+
}, true);
|
|
66
|
+
else if (result.success) console.log(`Added '${args.name}' from JSON (scope: ${scope})`);
|
|
67
|
+
else error(result.error || "Unknown error");
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
async function add_json_to_client(client, name, config, scope, location_path, json) {
|
|
71
|
+
const adapter = get_client_adapter(client);
|
|
72
|
+
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
73
|
+
if (scope && ![
|
|
74
|
+
"local",
|
|
75
|
+
"project",
|
|
76
|
+
"user"
|
|
77
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
78
|
+
try {
|
|
79
|
+
const location = resolve_client_location(adapter, scope, location_path);
|
|
80
|
+
await add_client_server_config(adapter, location, name, config);
|
|
81
|
+
if (json) output({
|
|
82
|
+
added: name,
|
|
83
|
+
client: adapter.id,
|
|
84
|
+
scope: location.scope,
|
|
85
|
+
location: location.path
|
|
86
|
+
}, true);
|
|
87
|
+
else console.log(`Added '${name}' from JSON (${adapter.id}:${location.scope})`);
|
|
88
|
+
} catch (err) {
|
|
89
|
+
error(err instanceof Error ? err.message : "Failed to add server");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { add_json_default as default };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=add-json-TEdYweZ5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as get_plugin_backup_filename, n as get_backup_filename, r as get_backups_dir, t as ensure_directory_exists } from "./paths-
|
|
2
|
-
import { s as read_claude_config } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import { n as output } from "./output-
|
|
1
|
+
import { m as get_plugin_backup_filename, n as get_backup_filename, r as get_backups_dir, t as ensure_directory_exists } from "./paths-BPISiJi4.js";
|
|
2
|
+
import { s as read_claude_config } from "./config-DzMmTJYL.js";
|
|
3
|
+
import { V as read_claude_settings } from "./index.js";
|
|
4
|
+
import { n as output } from "./output-HtT5HCof.js";
|
|
5
5
|
import { readdir, unlink, writeFile } from "node:fs/promises";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
@@ -61,4 +61,4 @@ var backup_default = defineCommand({
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { backup_default as default };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=backup-
|
|
64
|
+
//# sourceMappingURL=backup-kyS5IVIr.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as list_linked_plugins, c as read_installed_plugins, d as refresh_all_marketplaces, f as scan_all_cache_keys, i as link_local_plugin, n as clear_plugin_caches, p as unlink_local_plugin, r as get_cached_plugins_info, t as clean_orphaned_versions } from "./plugin-cache-
|
|
2
|
-
import { n as output, t as error } from "./output-
|
|
1
|
+
import { a as list_linked_plugins, c as read_installed_plugins, d as refresh_all_marketplaces, f as scan_all_cache_keys, i as link_local_plugin, n as clear_plugin_caches, p as unlink_local_plugin, r as get_cached_plugins_info, t as clean_orphaned_versions } from "./plugin-cache-BSgB42wa.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
var cache_default = defineCommand({
|
|
5
5
|
meta: {
|
|
@@ -223,4 +223,4 @@ var cache_default = defineCommand({
|
|
|
223
223
|
//#endregion
|
|
224
224
|
export { cache_default as default };
|
|
225
225
|
|
|
226
|
-
//# sourceMappingURL=cache-
|
|
226
|
+
//# sourceMappingURL=cache-DTfzTsEE.js.map
|
|
@@ -6,26 +6,27 @@ const main = defineCommand({
|
|
|
6
6
|
description: "Vendor-neutral MCP configuration manager with first-class Claude Code support"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
enable: () => import("./enable
|
|
11
|
-
disable: () => import("./disable-
|
|
12
|
-
clients: () => import("./clients-
|
|
13
|
-
remove: () => import("./remove-
|
|
14
|
-
add: () => import("./add-
|
|
15
|
-
"add-json": () => import("./add-json-
|
|
16
|
-
clone: () => import("./clone-
|
|
17
|
-
get: () => import("./get-
|
|
18
|
-
"reset-project-choices": () => import("./reset-project-choices-
|
|
19
|
-
backup: () => import("./backup-
|
|
20
|
-
restore: () => import("./restore-
|
|
21
|
-
profile: () => import("./profile-
|
|
22
|
-
skills: () => import("./skills-
|
|
23
|
-
plugins: () => import("./plugins-
|
|
24
|
-
hooks: () => import("./hooks-
|
|
25
|
-
cache: () => import("./cache-
|
|
26
|
-
dev: () => import("./dev-
|
|
27
|
-
marketplace: () => import("./marketplace-
|
|
28
|
-
reload: () => import("./reload-
|
|
9
|
+
list: () => import("./list-D5CkCXpP.js").then((m) => m.default),
|
|
10
|
+
enable: () => import("./enable--3mjSmTq.js").then((m) => m.default),
|
|
11
|
+
disable: () => import("./disable-BaOs9lrm.js").then((m) => m.default),
|
|
12
|
+
clients: () => import("./clients-qMozizys.js").then((m) => m.default),
|
|
13
|
+
remove: () => import("./remove-26XFzkPd.js").then((m) => m.default),
|
|
14
|
+
add: () => import("./add-LJQa2my2.js").then((m) => m.default),
|
|
15
|
+
"add-json": () => import("./add-json-TEdYweZ5.js").then((m) => m.default),
|
|
16
|
+
clone: () => import("./clone-BVhYjRGO.js").then((m) => m.default),
|
|
17
|
+
get: () => import("./get-CjhNWyRj.js").then((m) => m.default),
|
|
18
|
+
"reset-project-choices": () => import("./reset-project-choices-D2F04LfC.js").then((m) => m.default),
|
|
19
|
+
backup: () => import("./backup-kyS5IVIr.js").then((m) => m.default),
|
|
20
|
+
restore: () => import("./restore-BYYsoNqF.js").then((m) => m.default),
|
|
21
|
+
profile: () => import("./profile-Dq3ORPil.js").then((m) => m.default),
|
|
22
|
+
skills: () => import("./skills-DfWk9mpk.js").then((m) => m.default),
|
|
23
|
+
plugins: () => import("./plugins-Dn2mPFKm.js").then((m) => m.default),
|
|
24
|
+
hooks: () => import("./hooks-DFmxgD0t.js").then((m) => m.default),
|
|
25
|
+
cache: () => import("./cache-DTfzTsEE.js").then((m) => m.default),
|
|
26
|
+
dev: () => import("./dev-Cst8WkQ-.js").then((m) => m.default),
|
|
27
|
+
marketplace: () => import("./marketplace-C3EGyIG0.js").then((m) => m.default),
|
|
28
|
+
reload: () => import("./reload-257iU7Z7.js").then((m) => m.default),
|
|
29
|
+
rollback: () => import("./rollback-CPdaME91.js").then((m) => m.default)
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
/**
|
|
@@ -108,4 +109,4 @@ const run = () => runMain(main, { showUsage: show_usage_with_examples });
|
|
|
108
109
|
//#endregion
|
|
109
110
|
export { run };
|
|
110
111
|
|
|
111
|
-
//# sourceMappingURL=cli-
|
|
112
|
+
//# sourceMappingURL=cli-By-0nYNQ.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as output } from "./output-
|
|
1
|
+
import { N as list_client_locations } from "./index.js";
|
|
2
|
+
import { n as output } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/clients.ts
|
|
5
5
|
var clients_default = defineCommand({
|
|
@@ -27,4 +27,4 @@ var clients_default = defineCommand({
|
|
|
27
27
|
//#endregion
|
|
28
28
|
export { clients_default as default };
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=clients-
|
|
30
|
+
//# sourceMappingURL=clients-qMozizys.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as validate_mcp_server } from "./validation-
|
|
2
|
-
import { i as find_server_in_scope, r as detect_server_scope } from "./config-
|
|
3
|
-
import { n as redact_server } from "./redact-
|
|
1
|
+
import { n as validate_mcp_server } from "./validation-xMlbgGCF.js";
|
|
2
|
+
import { i as find_server_in_scope, r as detect_server_scope } from "./config-DzMmTJYL.js";
|
|
3
|
+
import { n as redact_server } from "./redact-wBMtzbno.js";
|
|
4
4
|
import { d as add_mcp_via_cli, w as add_server_to_registry } from "./index.js";
|
|
5
|
-
import { n as output, t as error } from "./output-
|
|
5
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/cli/commands/clone.ts
|
|
8
8
|
var clone_default = defineCommand({
|
|
@@ -84,4 +84,4 @@ var clone_default = defineCommand({
|
|
|
84
84
|
//#endregion
|
|
85
85
|
export { clone_default as default };
|
|
86
86
|
|
|
87
|
-
//# sourceMappingURL=clone-
|
|
87
|
+
//# sourceMappingURL=clone-BVhYjRGO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { i as get_claude_config_path, o as get_current_project_path, v as get_project_mcp_json_path } from "./paths-BPISiJi4.js";
|
|
3
|
+
import { t as validate_claude_config } from "./validation-xMlbgGCF.js";
|
|
4
|
+
import { W as atomic_json_write } from "./index.js";
|
|
5
5
|
import { access, readFile } from "node:fs/promises";
|
|
6
6
|
//#region src/core/config.ts
|
|
7
7
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -173,4 +173,4 @@ async function get_enabled_servers_for_scope(scope) {
|
|
|
173
173
|
//#endregion
|
|
174
174
|
export { get_enabled_servers as a, write_claude_config as c, find_server_in_scope as i, create_config_from_servers as n, get_enabled_servers_for_scope as o, detect_server_scope as r, read_claude_config as s, config_exports as t };
|
|
175
175
|
|
|
176
|
-
//# sourceMappingURL=config-
|
|
176
|
+
//# sourceMappingURL=config-DzMmTJYL.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as output, t as error } from "./output-
|
|
1
|
+
import { i as get_claude_config_path, o as get_current_project_path, s as get_dev_overrides_path, v as get_project_mcp_json_path } from "./paths-BPISiJi4.js";
|
|
2
|
+
import { i as find_server_in_scope, r as detect_server_scope } from "./config-DzMmTJYL.js";
|
|
3
|
+
import { r as redact_server_base } from "./redact-wBMtzbno.js";
|
|
4
|
+
import { W as atomic_json_write } from "./index.js";
|
|
5
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/core/dev-override.ts
|
|
@@ -262,4 +262,4 @@ var dev_default = defineCommand({
|
|
|
262
262
|
//#endregion
|
|
263
263
|
export { dev_default as default };
|
|
264
264
|
|
|
265
|
-
//# sourceMappingURL=dev-
|
|
265
|
+
//# sourceMappingURL=dev-Cst8WkQ-.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { F as resolve_client_location, I as set_client_server_enabled, M as get_client_adapter, T as get_all_available_servers, b as remove_mcp_via_cli } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
|
+
import { defineCommand } from "citty";
|
|
4
|
+
//#region src/cli/commands/disable.ts
|
|
5
|
+
var disable_default = defineCommand({
|
|
6
|
+
meta: {
|
|
7
|
+
name: "disable",
|
|
8
|
+
description: "Disable an MCP server"
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
server: {
|
|
12
|
+
type: "positional",
|
|
13
|
+
description: "Server name to disable",
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
client: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Client to edit: claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi",
|
|
19
|
+
default: "claude-code"
|
|
20
|
+
},
|
|
21
|
+
scope: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Scope: local, project, or user (default: local for Claude Code)"
|
|
24
|
+
},
|
|
25
|
+
location: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Exact config path when a client has multiple matching locations"
|
|
28
|
+
},
|
|
29
|
+
json: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Output as JSON",
|
|
32
|
+
default: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async run({ args }) {
|
|
36
|
+
if (args.client && args.client !== "claude-code") {
|
|
37
|
+
await disable_client_server(args.client, args.server, args.scope, args.location, args.json);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const scope = args.scope || "local";
|
|
41
|
+
if (![
|
|
42
|
+
"local",
|
|
43
|
+
"project",
|
|
44
|
+
"user"
|
|
45
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
46
|
+
await get_all_available_servers();
|
|
47
|
+
const result = await remove_mcp_via_cli(args.server, scope);
|
|
48
|
+
if (!result.success) error(result.error || "Failed to disable server");
|
|
49
|
+
if (args.json) output({
|
|
50
|
+
disabled: args.server,
|
|
51
|
+
client: "claude-code",
|
|
52
|
+
scope
|
|
53
|
+
}, true);
|
|
54
|
+
else console.log(`Disabled '${args.server}' (scope: ${scope})`);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
async function disable_client_server(client, server, scope, location_path, json) {
|
|
58
|
+
const adapter = get_client_adapter(client);
|
|
59
|
+
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
60
|
+
if (scope && ![
|
|
61
|
+
"local",
|
|
62
|
+
"project",
|
|
63
|
+
"user"
|
|
64
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
65
|
+
try {
|
|
66
|
+
const location = resolve_client_location(adapter, scope, location_path);
|
|
67
|
+
const enabled_count = await set_client_server_enabled(adapter, location, server, false);
|
|
68
|
+
if (json) output({
|
|
69
|
+
disabled: server,
|
|
70
|
+
client: adapter.id,
|
|
71
|
+
scope: location.scope,
|
|
72
|
+
location: location.path,
|
|
73
|
+
enabledCount: enabled_count
|
|
74
|
+
}, true);
|
|
75
|
+
else console.log(`Disabled '${server}' (${adapter.id}:${location.scope})`);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
error(err instanceof Error ? err.message : "Failed to disable server");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { disable_default as default };
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=disable-BaOs9lrm.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { F as resolve_client_location, I as set_client_server_enabled, M as get_client_adapter, T as get_all_available_servers, d as add_mcp_via_cli } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
|
+
import { defineCommand } from "citty";
|
|
4
|
+
//#region src/cli/commands/enable.ts
|
|
5
|
+
var enable_default = defineCommand({
|
|
6
|
+
meta: {
|
|
7
|
+
name: "enable",
|
|
8
|
+
description: "Enable an MCP server"
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
server: {
|
|
12
|
+
type: "positional",
|
|
13
|
+
description: "Server name to enable",
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
client: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Client to edit: claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi",
|
|
19
|
+
default: "claude-code"
|
|
20
|
+
},
|
|
21
|
+
scope: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Scope: local, project, or user (default: local for Claude Code)"
|
|
24
|
+
},
|
|
25
|
+
location: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Exact config path when a client has multiple matching locations"
|
|
28
|
+
},
|
|
29
|
+
json: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Output as JSON",
|
|
32
|
+
default: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async run({ args }) {
|
|
36
|
+
if (args.client && args.client !== "claude-code") {
|
|
37
|
+
await enable_client_server(args.client, args.server, args.scope, args.location, args.json);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const scope = args.scope || "local";
|
|
41
|
+
if (![
|
|
42
|
+
"local",
|
|
43
|
+
"project",
|
|
44
|
+
"user"
|
|
45
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
46
|
+
const server = (await get_all_available_servers()).find((s) => s.name === args.server);
|
|
47
|
+
if (!server) error(`Server '${args.server}' not found in registry. Run 'mcpick list' to see available servers.`);
|
|
48
|
+
const result = await add_mcp_via_cli(server, scope);
|
|
49
|
+
if (!result.success) error(result.error || "Failed to enable server");
|
|
50
|
+
if (args.json) output({
|
|
51
|
+
enabled: server.name,
|
|
52
|
+
client: "claude-code",
|
|
53
|
+
scope
|
|
54
|
+
}, true);
|
|
55
|
+
else console.log(`Enabled '${server.name}' (scope: ${scope})`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
async function enable_client_server(client, server, scope, location_path, json) {
|
|
59
|
+
const adapter = get_client_adapter(client);
|
|
60
|
+
if (!adapter) error(`Invalid client: ${client}. Use claude-code, gemini-cli, vscode, cursor, windsurf, opencode, or pi.`);
|
|
61
|
+
if (scope && ![
|
|
62
|
+
"local",
|
|
63
|
+
"project",
|
|
64
|
+
"user"
|
|
65
|
+
].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
|
|
66
|
+
try {
|
|
67
|
+
const location = resolve_client_location(adapter, scope, location_path);
|
|
68
|
+
const enabled_count = await set_client_server_enabled(adapter, location, server, true);
|
|
69
|
+
if (json) output({
|
|
70
|
+
enabled: server,
|
|
71
|
+
client: adapter.id,
|
|
72
|
+
scope: location.scope,
|
|
73
|
+
location: location.path,
|
|
74
|
+
enabledCount: enabled_count
|
|
75
|
+
}, true);
|
|
76
|
+
else console.log(`Enabled '${server}' (${adapter.id}:${location.scope})`);
|
|
77
|
+
} catch (err) {
|
|
78
|
+
error(err instanceof Error ? err.message : "Failed to enable server");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { enable_default as default };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=enable--3mjSmTq.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as mcp_get_via_cli } from "./index.js";
|
|
2
|
-
import { n as output, t as error } from "./output-
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/cli/commands/get.ts
|
|
5
5
|
var get_default = defineCommand({
|
|
@@ -38,4 +38,4 @@ var get_default = defineCommand({
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { get_default as default };
|
|
40
40
|
|
|
41
|
-
//# sourceMappingURL=get-
|
|
41
|
+
//# sourceMappingURL=get-CjhNWyRj.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as output, t as error } from "./output-BgN9Uuxf.js";
|
|
1
|
+
import { H as remove_hook, L as add_hook, c as enable_plugin_hook, l as read_disabled_hooks, o as check_restored_hooks, s as disable_plugin_hook, u as redisable_restored_hooks, z as get_all_hooks } from "./index.js";
|
|
2
|
+
import { n as output, t as error } from "./output-HtT5HCof.js";
|
|
4
3
|
import { defineCommand } from "citty";
|
|
5
4
|
var hooks_default = defineCommand({
|
|
6
5
|
meta: {
|
|
@@ -277,4 +276,4 @@ var hooks_default = defineCommand({
|
|
|
277
276
|
//#endregion
|
|
278
277
|
export { hooks_default as default };
|
|
279
278
|
|
|
280
|
-
//# sourceMappingURL=hooks-
|
|
279
|
+
//# sourceMappingURL=hooks-DFmxgD0t.js.map
|