mcpick 0.0.22 → 0.0.24

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -0
  3. package/dist/add-Qzd8i-5k.js +184 -0
  4. package/dist/add-json-DGmsjB0O.js +115 -0
  5. package/dist/{backup-bdg6dvsb.js → backup-C7fvikFw.js} +5 -5
  6. package/dist/{cache-CSUcGdZP.js → cache-D3jjh5dD.js} +3 -3
  7. package/dist/{cli-avr5R1LO.js → cli-CZOlaqoZ.js} +22 -21
  8. package/dist/{clients-CSQgqHzb.js → clients-Bh93TGP4.js} +3 -3
  9. package/dist/{clone-CQ0skkT6.js → clone-MI8jJhTz.js} +6 -6
  10. package/dist/{config-BhX4eAgg.js → config-DE58Fik_.js} +4 -4
  11. package/dist/{dev-CTDg5g-c.js → dev-51esdZG9.js} +6 -6
  12. package/dist/disable-csYAn2Vk.js +106 -0
  13. package/dist/dry-run-XQ32fxPT.js +20 -0
  14. package/dist/enable-B5GbmhL-.js +107 -0
  15. package/dist/{get-l-eAJhBy.js → get-DacRZmwv.js} +3 -3
  16. package/dist/{hooks-BWZ_Kgx3.js → hooks-C_x49qap.js} +3 -4
  17. package/dist/index.js +717 -116
  18. package/dist/{list-By--kltj.js → list-BeBtsiae.js} +5 -5
  19. package/dist/{marketplace-DdiKDDKK.js → marketplace-BDC2YtvT.js} +4 -4
  20. package/dist/{output-BgN9Uuxf.js → output-HtT5HCof.js} +2 -2
  21. package/dist/{paths-6wrIM8yh.js → paths-BPISiJi4.js} +1 -1
  22. package/dist/{plugin-cache-DKcW8LGV.js → plugin-cache-DmLbh89d.js} +35 -16
  23. package/dist/{plugins-CsXE8AH4.js → plugins-Bkw-SKkZ.js} +4 -5
  24. package/dist/profile-DwJTVXiz.js +161 -0
  25. package/dist/{redact-Dltz2gde.js → redact-wBMtzbno.js} +1 -1
  26. package/dist/{reload-C29-vuvy.js → reload-Bl1mYK1I.js} +2 -2
  27. package/dist/remove-BSHgva79.js +107 -0
  28. package/dist/{reset-project-choices-Dhh4CxIC.js → reset-project-choices-BNLus9J9.js} +3 -3
  29. package/dist/{restore-BI8aiszM.js → restore-YisgARhc.js} +5 -6
  30. package/dist/rollback-GR1RkpXW.js +55 -0
  31. package/dist/{skills-DPBDmION.js → skills-rDTDqqZA.js} +3 -3
  32. package/dist/{validation-qWlF51fw.js → validation-xMlbgGCF.js} +1 -1
  33. package/package.json +4 -4
  34. package/.github/copilot-instructions.md +0 -50
  35. package/.github/workflows/ci.yml +0 -26
  36. package/.vscode/settings.json +0 -5
  37. package/CONTEXT.md +0 -49
  38. package/dist/add-Bok0qbXi.js +0 -112
  39. package/dist/add-json-C44vy2A_.js +0 -58
  40. package/dist/atomic-write-4lANmzsO.js +0 -26
  41. package/dist/disable-DLlOj7sc.js +0 -38
  42. package/dist/enable-CGFYYC2A.js +0 -39
  43. package/dist/profile-DzGPsdsl.js +0 -120
  44. package/dist/remove-B5q4rQRU.js +0 -30
  45. package/dist/settings-CZR8bVfh.js +0 -201
@@ -1,26 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v6
14
-
15
- - uses: pnpm/action-setup@v6
16
-
17
- - uses: actions/setup-node@v6
18
- with:
19
- node-version-file: package.json
20
- cache: pnpm
21
-
22
- - run: pnpm install --frozen-lockfile
23
-
24
- - run: pnpm run build
25
-
26
- - run: pnpm run test
@@ -1,5 +0,0 @@
1
- {
2
- "editor.defaultFormatter": "oxc.oxc-vscode",
3
- "editor.formatOnSave": true,
4
- "oxc.fmt.configPath": "./vite.config.ts"
5
- }
package/CONTEXT.md DELETED
@@ -1,49 +0,0 @@
1
- # MCPick
2
-
3
- MCPick manages Model Context Protocol configuration across AI
4
- development tools without making one vendor's config format the
5
- product model.
6
-
7
- ## Language
8
-
9
- **MCP Server**: A runnable or remote tool provider exposed through the
10
- Model Context Protocol. _Avoid_: Claude server, plugin server
11
-
12
- **MCP Client**: An AI application that loads MCP Server configuration
13
- and exposes those tools to a model. _Avoid_: Vendor, app, host
14
-
15
- **Client Adapter**: A module that translates between MCPick's portable
16
- MCP Server shape and one MCP Client's config file shape. _Avoid_:
17
- Provider, integration, plugin
18
-
19
- **Portable Server**: MCPick's canonical representation of an MCP
20
- Server independent of any MCP Client config file. _Avoid_: Claude
21
- config, raw config
22
-
23
- **Config Location**: A file path and scope where an MCP Client reads
24
- MCP Server configuration. _Avoid_: path helper, config target
25
-
26
- **Profile**: A saved set of Portable Servers intended to be applied to
27
- one or more MCP Clients. _Avoid_: Claude profile
28
-
29
- ## Relationships
30
-
31
- - An **MCP Client** reads one or more **Config Locations**.
32
- - A **Client Adapter** translates between a **Config Location** and
33
- **Portable Servers**.
34
- - A **Profile** contains **Portable Servers**.
35
- - An **MCP Server** may appear in multiple **MCP Clients** with
36
- client-specific options.
37
-
38
- ## Example dialogue
39
-
40
- > **Dev:** "Can we enable the Google docs MCP server in Gemini and
41
- > Cursor without rewriting the JSON twice?" **Domain expert:** "Yes —
42
- > keep it as a **Portable Server**, then let each **Client Adapter**
43
- > write the right **Config Location**."
44
-
45
- ## Flagged ambiguities
46
-
47
- - "server config" used to mean both MCPick registry entries and
48
- client-specific JSON. Resolved: **Portable Server** for MCPick's
49
- shape, **Config Location** for client-owned files.
@@ -1,112 +0,0 @@
1
- import { n as validate_mcp_server } from "./validation-qWlF51fw.js";
2
- import { 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-BgN9Uuxf.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
- scope: {
47
- type: "string",
48
- description: "Scope: local, project, or user (default: local)",
49
- default: "local"
50
- },
51
- json: {
52
- type: "boolean",
53
- description: "Output as JSON",
54
- default: false
55
- }
56
- },
57
- async run({ args }) {
58
- const scope = args.scope;
59
- if (![
60
- "local",
61
- "project",
62
- "user"
63
- ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
64
- const transport = args.type;
65
- if (![
66
- "stdio",
67
- "sse",
68
- "http"
69
- ].includes(transport)) error(`Invalid type: ${transport}. Use stdio, sse, or http.`);
70
- const server_data = { name: args.name };
71
- if (transport === "stdio") {
72
- if (!args.command) error("--command is required for stdio transport");
73
- server_data.command = args.command;
74
- if (args.args) server_data.args = args.args.split(",");
75
- } else {
76
- if (!args.url) error(`--url is required for ${transport} transport`);
77
- server_data.type = transport;
78
- server_data.url = args.url;
79
- if (args.headers) server_data.headers = parse_key_value_pairs(args.headers);
80
- }
81
- if (args.env) server_data.env = parse_key_value_pairs(args.env);
82
- if (args.description) server_data.description = args.description;
83
- let server;
84
- try {
85
- server = validate_mcp_server(server_data);
86
- } catch (err) {
87
- error(`Invalid server config: ${err instanceof Error ? err.message : "validation failed"}`);
88
- }
89
- await add_server_to_registry(server);
90
- const result = await add_mcp_via_cli(server, scope);
91
- if (args.json) output({
92
- added: server.name,
93
- scope,
94
- cli: result.success,
95
- error: result.error
96
- }, true);
97
- else if (result.success) console.log(`Added '${server.name}' and enabled (scope: ${scope})`);
98
- else console.log(`Added '${server.name}' to registry but CLI failed: ${result.error}`);
99
- }
100
- });
101
- function parse_key_value_pairs(input) {
102
- const result = {};
103
- for (const pair of input.split(",")) {
104
- const eq = pair.indexOf("=");
105
- if (eq > 0) result[pair.substring(0, eq)] = pair.substring(eq + 1);
106
- }
107
- return result;
108
- }
109
- //#endregion
110
- export { add_default as default };
111
-
112
- //# sourceMappingURL=add-Bok0qbXi.js.map
@@ -1,58 +0,0 @@
1
- import { _ as mcp_add_json_via_cli } from "./index.js";
2
- import { n as output, t as error } from "./output-BgN9Uuxf.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
- scope: {
22
- type: "string",
23
- description: "Scope: local, project, or user (default: local)",
24
- default: "local"
25
- },
26
- json: {
27
- type: "boolean",
28
- description: "Output as JSON",
29
- default: false
30
- }
31
- },
32
- async run({ args }) {
33
- const scope = args.scope;
34
- if (![
35
- "local",
36
- "project",
37
- "user"
38
- ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
39
- try {
40
- JSON.parse(args.config);
41
- } catch {
42
- error("Invalid JSON configuration. Provide a valid JSON string.");
43
- }
44
- const result = await mcp_add_json_via_cli(args.name, args.config, scope);
45
- if (args.json) output({
46
- added: args.name,
47
- scope,
48
- success: result.success,
49
- error: result.error
50
- }, true);
51
- else if (result.success) console.log(`Added '${args.name}' from JSON (scope: ${scope})`);
52
- else error(result.error || "Unknown error");
53
- }
54
- });
55
- //#endregion
56
- export { add_json_default as default };
57
-
58
- //# sourceMappingURL=add-json-C44vy2A_.js.map
@@ -1,26 +0,0 @@
1
- import { readFile, rename, writeFile } from "node:fs/promises";
2
- import { dirname, join } from "node:path";
3
- //#region src/utils/atomic-write.ts
4
- /**
5
- * Atomically write a JSON file with fresh-read merging.
6
- *
7
- * 1. Re-reads the file right before writing to pick up concurrent changes
8
- * 2. Applies the merge function to the freshest data
9
- * 3. Writes to a temp file, then renames (atomic on same filesystem)
10
- */
11
- async function atomic_json_write(file_path, merge) {
12
- let existing = {};
13
- try {
14
- const content = await readFile(file_path, "utf-8");
15
- existing = JSON.parse(content);
16
- } catch {}
17
- const merged = merge(existing);
18
- const content = JSON.stringify(merged, null, 2);
19
- const tmp_path = join(dirname(file_path), `.${Date.now()}.tmp`);
20
- await writeFile(tmp_path, content, "utf-8");
21
- await rename(tmp_path, file_path);
22
- }
23
- //#endregion
24
- export { atomic_json_write as t };
25
-
26
- //# sourceMappingURL=atomic-write-4lANmzsO.js.map
@@ -1,38 +0,0 @@
1
- import { T as get_all_available_servers, b as remove_mcp_via_cli } from "./index.js";
2
- import { t as error } from "./output-BgN9Uuxf.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
- scope: {
17
- type: "string",
18
- description: "Scope: local, project, or user (default: local)",
19
- default: "local"
20
- }
21
- },
22
- async run({ args }) {
23
- const scope = args.scope;
24
- if (![
25
- "local",
26
- "project",
27
- "user"
28
- ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
29
- await get_all_available_servers();
30
- const result = await remove_mcp_via_cli(args.server);
31
- if (!result.success) error(result.error || "Failed to disable server");
32
- console.log(`Disabled '${args.server}' (scope: ${scope})`);
33
- }
34
- });
35
- //#endregion
36
- export { disable_default as default };
37
-
38
- //# sourceMappingURL=disable-DLlOj7sc.js.map
@@ -1,39 +0,0 @@
1
- import { T as get_all_available_servers, d as add_mcp_via_cli } from "./index.js";
2
- import { t as error } from "./output-BgN9Uuxf.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
- scope: {
17
- type: "string",
18
- description: "Scope: local, project, or user (default: local)",
19
- default: "local"
20
- }
21
- },
22
- async run({ args }) {
23
- const scope = args.scope;
24
- if (![
25
- "local",
26
- "project",
27
- "user"
28
- ].includes(scope)) error(`Invalid scope: ${scope}. Use local, project, or user.`);
29
- const server = (await get_all_available_servers()).find((s) => s.name === args.server);
30
- if (!server) error(`Server '${args.server}' not found in registry. Run 'mcpick list' to see available servers.`);
31
- const result = await add_mcp_via_cli(server, scope);
32
- if (!result.success) error(result.error || "Failed to enable server");
33
- console.log(`Enabled '${server.name}' (scope: ${scope})`);
34
- }
35
- });
36
- //#endregion
37
- export { enable_default as default };
38
-
39
- //# sourceMappingURL=enable-CGFYYC2A.js.map
@@ -1,120 +0,0 @@
1
- import { c as write_claude_config } from "./config-BhX4eAgg.js";
2
- import { s as write_claude_settings } from "./settings-CZR8bVfh.js";
3
- import { n as load_profile, r as save_profile, t as list_profiles } from "./index.js";
4
- import { n as output, t as error } from "./output-BgN9Uuxf.js";
5
- import { defineCommand } from "citty";
6
- var profile_default = defineCommand({
7
- meta: {
8
- name: "profile",
9
- description: "Manage profiles (MCP servers + plugins)"
10
- },
11
- subCommands: {
12
- list: defineCommand({
13
- meta: {
14
- name: "list",
15
- description: "List all saved profiles"
16
- },
17
- args: { json: {
18
- type: "boolean",
19
- description: "Output as JSON",
20
- default: false
21
- } },
22
- async run({ args }) {
23
- const profiles = await list_profiles();
24
- if (args.json) output(profiles, true);
25
- else {
26
- if (profiles.length === 0) {
27
- console.log("No profiles found.");
28
- return;
29
- }
30
- for (const p of profiles) {
31
- const parts = [`${p.serverCount} servers`];
32
- if (p.pluginCount > 0) parts.push(`${p.pluginCount} plugins`);
33
- console.log(`${p.name} (${parts.join(", ")})`);
34
- }
35
- }
36
- }
37
- }),
38
- load: defineCommand({
39
- meta: {
40
- name: "load",
41
- description: "Load and apply a saved profile"
42
- },
43
- args: {
44
- name: {
45
- type: "positional",
46
- description: "Profile name",
47
- required: true
48
- },
49
- json: {
50
- type: "boolean",
51
- description: "Output as JSON",
52
- default: false
53
- }
54
- },
55
- async run({ args }) {
56
- try {
57
- const profile = await load_profile(args.name);
58
- await write_claude_config(profile.config);
59
- const server_count = Object.keys(profile.config.mcpServers || {}).length;
60
- let plugin_count = 0;
61
- if (profile.enabledPlugins) {
62
- await write_claude_settings({ enabledPlugins: profile.enabledPlugins });
63
- plugin_count = Object.keys(profile.enabledPlugins).length;
64
- }
65
- if (args.json) output({
66
- profile: args.name,
67
- servers: server_count,
68
- plugins: plugin_count
69
- }, true);
70
- else {
71
- const parts = [`${server_count} servers`];
72
- if (plugin_count > 0) parts.push(`${plugin_count} plugins`);
73
- console.log(`Profile '${args.name}' applied (${parts.join(", ")})`);
74
- }
75
- } catch (err) {
76
- error(err instanceof Error ? err.message : "Failed to load profile");
77
- }
78
- }
79
- }),
80
- save: defineCommand({
81
- meta: {
82
- name: "save",
83
- description: "Save current config as a profile"
84
- },
85
- args: {
86
- name: {
87
- type: "positional",
88
- description: "Profile name",
89
- required: true
90
- },
91
- json: {
92
- type: "boolean",
93
- description: "Output as JSON",
94
- default: false
95
- }
96
- },
97
- async run({ args }) {
98
- try {
99
- const counts = await save_profile(args.name);
100
- if (args.json) output({
101
- profile: args.name,
102
- servers: counts.serverCount,
103
- plugins: counts.pluginCount
104
- }, true);
105
- else {
106
- const parts = [`${counts.serverCount} servers`];
107
- if (counts.pluginCount > 0) parts.push(`${counts.pluginCount} plugins`);
108
- console.log(`Profile '${args.name}' saved (${parts.join(", ")})`);
109
- }
110
- } catch (err) {
111
- error(err instanceof Error ? err.message : "Failed to save profile");
112
- }
113
- }
114
- })
115
- }
116
- });
117
- //#endregion
118
- export { profile_default as default };
119
-
120
- //# sourceMappingURL=profile-DzGPsdsl.js.map
@@ -1,30 +0,0 @@
1
- import { O as read_server_registry, T as get_all_available_servers, b as remove_mcp_via_cli, k as write_server_registry } from "./index.js";
2
- import { t as error } from "./output-BgN9Uuxf.js";
3
- import { defineCommand } from "citty";
4
- //#region src/cli/commands/remove.ts
5
- var remove_default = defineCommand({
6
- meta: {
7
- name: "remove",
8
- description: "Remove an MCP server from the registry and disable it"
9
- },
10
- args: { server: {
11
- type: "positional",
12
- description: "Server name to remove",
13
- required: true
14
- } },
15
- async run({ args }) {
16
- if (!(await get_all_available_servers()).find((s) => s.name === args.server)) error(`Server '${args.server}' not found. Run 'mcpick list' to see available servers.`);
17
- const registry = await read_server_registry();
18
- const index = registry.servers.findIndex((s) => s.name === args.server);
19
- if (index >= 0) {
20
- registry.servers.splice(index, 1);
21
- await write_server_registry(registry);
22
- }
23
- await remove_mcp_via_cli(args.server);
24
- console.log(`Removed '${args.server}'`);
25
- }
26
- });
27
- //#endregion
28
- export { remove_default as default };
29
-
30
- //# sourceMappingURL=remove-B5q4rQRU.js.map