@getmcp/cli 0.5.1 → 0.6.1
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 +77 -12
- package/dist/app-selection.d.ts +44 -0
- package/dist/app-selection.d.ts.map +1 -0
- package/dist/app-selection.js +99 -0
- package/dist/app-selection.js.map +1 -0
- package/dist/bin.js +54 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/add.d.ts +6 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +215 -11
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/check.d.ts +4 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +44 -8
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +179 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/import.d.ts +13 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +148 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +75 -6
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/remove.d.ts +3 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +20 -8
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/sync.d.ts +19 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +214 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +3 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/config-file.d.ts +4 -0
- package/dist/config-file.d.ts.map +1 -1
- package/dist/config-file.js +12 -1
- package/dist/config-file.js.map +1 -1
- package/dist/detect.d.ts +17 -7
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js +40 -17
- package/dist/detect.js.map +1 -1
- package/dist/errors.d.ts +3 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -9
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lock.d.ts +47 -1
- package/dist/lock.d.ts.map +1 -1
- package/dist/lock.js +36 -3
- package/dist/lock.js.map +1 -1
- package/dist/utils.d.ts +14 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +49 -1
- package/dist/utils.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -136,6 +136,57 @@ Interactive wizard to scaffold a new MCP server registry entry. Prompts for meta
|
|
|
136
136
|
getmcp init
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
+
### `getmcp doctor`
|
|
140
|
+
|
|
141
|
+
Health diagnostics for your MCP setup. Checks installed apps, config file parsing, registry status, orphaned servers, env vars, and runtime dependencies.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Interactive report
|
|
145
|
+
getmcp doctor
|
|
146
|
+
|
|
147
|
+
# Structured JSON output
|
|
148
|
+
getmcp doctor --json
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### `getmcp import`
|
|
152
|
+
|
|
153
|
+
Scan existing app configs and adopt configured servers into getmcp tracking.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Interactive — select which servers to import
|
|
157
|
+
getmcp import
|
|
158
|
+
|
|
159
|
+
# Auto-import all matched servers
|
|
160
|
+
getmcp import -y
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### `getmcp sync`
|
|
164
|
+
|
|
165
|
+
Read a `getmcp.json` project manifest and install all declared servers into detected apps. Ideal for team-shared MCP configurations.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Sync all servers from getmcp.json
|
|
169
|
+
getmcp sync -y --all-apps
|
|
170
|
+
|
|
171
|
+
# Preview what would be written
|
|
172
|
+
getmcp sync --dry-run
|
|
173
|
+
|
|
174
|
+
# Structured JSON output
|
|
175
|
+
getmcp sync --json
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Manifest format** (`getmcp.json`):
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"servers": {
|
|
183
|
+
"github": {},
|
|
184
|
+
"brave-search": { "env": { "BRAVE_API_KEY": "my-key" } },
|
|
185
|
+
"memory": { "apps": ["claude-desktop", "vscode"] }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
139
190
|
## Command Aliases
|
|
140
191
|
|
|
141
192
|
| Command | Aliases |
|
|
@@ -144,20 +195,26 @@ getmcp init
|
|
|
144
195
|
| `remove` | `rm`, `r`, `uninstall` |
|
|
145
196
|
| `list` | `ls` |
|
|
146
197
|
| `find` | `search`, `s`, `f` |
|
|
198
|
+
| `doctor` | `dr` |
|
|
147
199
|
|
|
148
200
|
## Options
|
|
149
201
|
|
|
150
|
-
| Flag
|
|
151
|
-
|
|
|
152
|
-
| `--help`, `-h`
|
|
153
|
-
| `--version`, `-v`
|
|
154
|
-
| `--yes`, `-y`
|
|
155
|
-
| `--app <id>`
|
|
156
|
-
| `--all-apps`
|
|
157
|
-
| `--dry-run`
|
|
158
|
-
| `--installed`
|
|
159
|
-
| `--search=<query>`
|
|
160
|
-
| `--category=<cat>`
|
|
202
|
+
| Flag | Description |
|
|
203
|
+
| ------------------- | --------------------------------------------------------------------- |
|
|
204
|
+
| `--help`, `-h` | Show help message |
|
|
205
|
+
| `--version`, `-v` | Show version number |
|
|
206
|
+
| `--yes`, `-y` | Skip confirmation prompts (use defaults) |
|
|
207
|
+
| `--app <id>` | Target a specific app (repeatable for multiple apps) |
|
|
208
|
+
| `--all-apps` | Target all detected apps |
|
|
209
|
+
| `--dry-run` | Preview changes without writing files |
|
|
210
|
+
| `--installed` | List servers installed in detected apps (for `list` command) |
|
|
211
|
+
| `--search=<query>` | Search the registry (for `list` command) |
|
|
212
|
+
| `--category=<cat>` | Filter by category (for `list` command) |
|
|
213
|
+
| `--json` | Output structured JSON (for `list`, `add`, `check`, `doctor`, `sync`) |
|
|
214
|
+
| `--quiet`, `-q` | Output one server ID per line (for `list` command) |
|
|
215
|
+
| `--from-npm <pkg>` | Install unverified npm package as MCP server (for `add` command) |
|
|
216
|
+
| `--from-pypi <pkg>` | Install unverified PyPI package as MCP server (for `add` command) |
|
|
217
|
+
| `--from-url <url>` | Install unverified remote URL as MCP server (for `add` command) |
|
|
161
218
|
|
|
162
219
|
## Installation Tracking
|
|
163
220
|
|
|
@@ -165,10 +222,11 @@ When you install or remove servers, getmcp records the action in a `getmcp-lock.
|
|
|
165
222
|
|
|
166
223
|
- Tracks which servers are installed to which apps
|
|
167
224
|
- Records which environment variable names were set (values are **not** stored for security)
|
|
225
|
+
- Tracks the installation scope (project or global) **per app** — so a server installed globally for Claude Code and at project level for Claude Desktop is tracked correctly
|
|
168
226
|
- Stores installation and last-update timestamps
|
|
169
227
|
- Can be **committed to version control** for team sharing (like `package-lock.json`)
|
|
170
228
|
|
|
171
|
-
The lock file enables the `check` and `update` commands — `check` compares your lock file against actual app configs to detect drift, and `update` re-applies configs from the registry.
|
|
229
|
+
The lock file enables the `check` and `update` commands — `check` compares your lock file against actual app configs to detect drift (using per-app scopes to resolve the correct config path), and `update` re-applies configs from the registry.
|
|
172
230
|
|
|
173
231
|
## Supported Apps
|
|
174
232
|
|
|
@@ -179,6 +237,7 @@ The CLI auto-detects and generates configs for:
|
|
|
179
237
|
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS), `%AppData%\Claude\claude_desktop_config.json` (Windows) | JSON |
|
|
180
238
|
| Claude Code | `.mcp.json` (project), `~/.claude.json` (user) | JSON |
|
|
181
239
|
| VS Code / Copilot | `.vscode/mcp.json` | JSON |
|
|
240
|
+
| VS Code Insiders | `.vscode-insiders/mcp.json` | JSON |
|
|
182
241
|
| Cursor | `.cursor/mcp.json` | JSON |
|
|
183
242
|
| Cline | `cline_mcp_settings.json` (VS Code globalStorage) | JSON |
|
|
184
243
|
| Roo Code | `mcp_settings.json` (VS Code globalStorage) | JSON |
|
|
@@ -188,6 +247,12 @@ The CLI auto-detects and generates configs for:
|
|
|
188
247
|
| Zed | `settings.json` (Zed settings) | JSON |
|
|
189
248
|
| PyCharm | `.ai/mcp/mcp.json` (project-level, requires JetBrains AI Assistant plugin) | JSON |
|
|
190
249
|
| Codex | `~/.codex/config.toml` (global), `.codex/config.toml` (project) | TOML |
|
|
250
|
+
| Gemini CLI | `~/.gemini/settings.json` | JSON |
|
|
251
|
+
| Continue | `~/.continue/config.json` | JSON |
|
|
252
|
+
| Amazon Q | `~/.aws/amazonq/mcp.json` | JSON |
|
|
253
|
+
| Trae | `.trae/mcp.json` (project-scoped) | JSON |
|
|
254
|
+
| Bolt AI | `~/Library/Application Support/BoltAI/mcp_config.json` (macOS only) | JSON |
|
|
255
|
+
| LibreChat | `librechat.yaml` | YAML |
|
|
191
256
|
|
|
192
257
|
## Programmatic API
|
|
193
258
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared app selection and scope selection helpers.
|
|
3
|
+
*
|
|
4
|
+
* Used by `add`, `sync`, and `addUnverifiedServer` to resolve
|
|
5
|
+
* which apps and scope to use based on flags, detection, and prompts.
|
|
6
|
+
*/
|
|
7
|
+
import { type DetectedApp } from "./detect.js";
|
|
8
|
+
export interface AppSelectionFlags {
|
|
9
|
+
apps?: string[];
|
|
10
|
+
allApps?: boolean;
|
|
11
|
+
global?: boolean;
|
|
12
|
+
project?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolve target apps based on CLI flags.
|
|
16
|
+
*
|
|
17
|
+
* Returns the filtered list of apps, or null if resolution failed
|
|
18
|
+
* (after logging the appropriate error).
|
|
19
|
+
*
|
|
20
|
+
* Handles:
|
|
21
|
+
* --all-apps: all detected apps
|
|
22
|
+
* --app <id>: validate + filter by ID
|
|
23
|
+
* default: all detected apps (for non-interactive fallback)
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveAppsFromFlags(flags: AppSelectionFlags): {
|
|
26
|
+
apps: DetectedApp[];
|
|
27
|
+
allApps: DetectedApp[];
|
|
28
|
+
} | null;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve scope for dual-scope apps based on CLI flags.
|
|
31
|
+
*
|
|
32
|
+
* Returns the updated apps list with config paths resolved for the chosen scope.
|
|
33
|
+
*
|
|
34
|
+
* Handles:
|
|
35
|
+
* --global: "global"
|
|
36
|
+
* --project: "project"
|
|
37
|
+
* non-interactive default: "project"
|
|
38
|
+
* interactive: prompts user
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveScope(apps: DetectedApp[], flags: AppSelectionFlags, isNonInteractive: boolean): Promise<{
|
|
41
|
+
apps: DetectedApp[];
|
|
42
|
+
scope: "project" | "global";
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=app-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-selection.d.ts","sourceRoot":"","sources":["../src/app-selection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/E,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,GACvB;IAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,WAAW,EAAE,CAAA;CAAE,GAAG,IAAI,CAsCxD;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,WAAW,EAAE,EACnB,KAAK,EAAE,iBAAiB,EACxB,gBAAgB,EAAE,OAAO,GACxB,OAAO,CAAC;IAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,CAAC,CA4B/D"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared app selection and scope selection helpers.
|
|
3
|
+
*
|
|
4
|
+
* Used by `add`, `sync`, and `addUnverifiedServer` to resolve
|
|
5
|
+
* which apps and scope to use based on flags, detection, and prompts.
|
|
6
|
+
*/
|
|
7
|
+
import * as p from "@clack/prompts";
|
|
8
|
+
import { getAppIds } from "@getmcp/generators";
|
|
9
|
+
import { detectApps, resolveAppForScope } from "./detect.js";
|
|
10
|
+
import { InvalidAppError, AppNotDetectedError } from "./errors.js";
|
|
11
|
+
/**
|
|
12
|
+
* Resolve target apps based on CLI flags.
|
|
13
|
+
*
|
|
14
|
+
* Returns the filtered list of apps, or null if resolution failed
|
|
15
|
+
* (after logging the appropriate error).
|
|
16
|
+
*
|
|
17
|
+
* Handles:
|
|
18
|
+
* --all-apps: all detected apps
|
|
19
|
+
* --app <id>: validate + filter by ID
|
|
20
|
+
* default: all detected apps (for non-interactive fallback)
|
|
21
|
+
*/
|
|
22
|
+
export function resolveAppsFromFlags(flags) {
|
|
23
|
+
const allApps = detectApps();
|
|
24
|
+
const detected = allApps.filter((app) => app.exists);
|
|
25
|
+
if (flags.allApps) {
|
|
26
|
+
if (detected.length === 0) {
|
|
27
|
+
p.log.error(new AppNotDetectedError().format());
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return { apps: detected, allApps };
|
|
31
|
+
}
|
|
32
|
+
if (flags.apps && flags.apps.length > 0) {
|
|
33
|
+
const validIds = getAppIds();
|
|
34
|
+
const selectedApps = [];
|
|
35
|
+
for (const appId of flags.apps) {
|
|
36
|
+
if (!validIds.includes(appId)) {
|
|
37
|
+
p.log.error(new InvalidAppError(appId, validIds).format());
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
const app = allApps.find((a) => a.id === appId);
|
|
41
|
+
if (app) {
|
|
42
|
+
selectedApps.push(app);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
p.log.warn(`App "${appId}" has no config path for this platform. Skipping.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (selectedApps.length === 0) {
|
|
49
|
+
p.log.error("None of the specified apps are available on this platform.");
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
return { apps: selectedApps, allApps };
|
|
53
|
+
}
|
|
54
|
+
// Default: return all detected apps
|
|
55
|
+
return { apps: detected, allApps };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resolve scope for dual-scope apps based on CLI flags.
|
|
59
|
+
*
|
|
60
|
+
* Returns the updated apps list with config paths resolved for the chosen scope.
|
|
61
|
+
*
|
|
62
|
+
* Handles:
|
|
63
|
+
* --global: "global"
|
|
64
|
+
* --project: "project"
|
|
65
|
+
* non-interactive default: "project"
|
|
66
|
+
* interactive: prompts user
|
|
67
|
+
*/
|
|
68
|
+
export async function resolveScope(apps, flags, isNonInteractive) {
|
|
69
|
+
const dualScopeApps = apps.filter((a) => a.supportsBothScopes);
|
|
70
|
+
if (dualScopeApps.length === 0)
|
|
71
|
+
return { apps, scope: "project" };
|
|
72
|
+
let chosenScope;
|
|
73
|
+
if (flags.global) {
|
|
74
|
+
chosenScope = "global";
|
|
75
|
+
}
|
|
76
|
+
else if (flags.project) {
|
|
77
|
+
chosenScope = "project";
|
|
78
|
+
}
|
|
79
|
+
else if (isNonInteractive) {
|
|
80
|
+
chosenScope = "project";
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
const scopeChoice = await p.select({
|
|
84
|
+
message: "Install globally or per-project?",
|
|
85
|
+
options: [
|
|
86
|
+
{ label: "Project", hint: "config in current directory", value: "project" },
|
|
87
|
+
{ label: "Global", hint: "config in home directory", value: "global" },
|
|
88
|
+
],
|
|
89
|
+
initialValue: "project",
|
|
90
|
+
});
|
|
91
|
+
if (p.isCancel(scopeChoice)) {
|
|
92
|
+
p.cancel("Operation cancelled.");
|
|
93
|
+
process.exit(0);
|
|
94
|
+
}
|
|
95
|
+
chosenScope = scopeChoice;
|
|
96
|
+
}
|
|
97
|
+
return { apps: apps.map((app) => resolveAppForScope(app, chosenScope)), scope: chosenScope };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=app-selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-selection.js","sourceRoot":"","sources":["../src/app-selection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAoB,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AASnE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAwB;IAExB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAErD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,mBAAmB,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IACrC,CAAC;IAED,IAAI,KAAK,CAAC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-19,6 +19,9 @@ import { findCommand } from "./commands/find.js";
|
|
|
19
19
|
import { checkCommand } from "./commands/check.js";
|
|
20
20
|
import { updateCommand } from "./commands/update.js";
|
|
21
21
|
import { initCommand } from "./commands/init.js";
|
|
22
|
+
import { doctorCommand } from "./commands/doctor.js";
|
|
23
|
+
import { importCommand } from "./commands/import.js";
|
|
24
|
+
import { syncCommand } from "./commands/sync.js";
|
|
22
25
|
import { parseFlags, resolveAlias } from "./utils.js";
|
|
23
26
|
const require = createRequire(import.meta.url);
|
|
24
27
|
const { version: VERSION } = require("../package.json");
|
|
@@ -37,12 +40,16 @@ Usage:
|
|
|
37
40
|
getmcp check Check for registry updates
|
|
38
41
|
getmcp update Update installed servers
|
|
39
42
|
getmcp init Scaffold a new server entry
|
|
43
|
+
getmcp doctor Run health diagnostics
|
|
44
|
+
getmcp import Import existing servers into tracking
|
|
45
|
+
getmcp sync Sync servers from getmcp.json manifest
|
|
40
46
|
|
|
41
47
|
Command Aliases:
|
|
42
48
|
add install, i
|
|
43
49
|
remove rm, r, uninstall
|
|
44
50
|
list ls
|
|
45
51
|
find search, s, f
|
|
52
|
+
doctor dr
|
|
46
53
|
|
|
47
54
|
Options:
|
|
48
55
|
--help, -h Show this help message
|
|
@@ -51,6 +58,13 @@ Options:
|
|
|
51
58
|
--app <id> Target specific app (repeatable)
|
|
52
59
|
--all-apps Target all detected apps
|
|
53
60
|
--dry-run Preview changes without writing files
|
|
61
|
+
--json Output machine-readable JSON
|
|
62
|
+
--quiet, -q Minimal output (one item per line)
|
|
63
|
+
--global, -g Install to global config (for dual-scope apps)
|
|
64
|
+
--project Install to project config (for dual-scope apps)
|
|
65
|
+
--from-npm <pkg> Install unverified npm package as MCP server
|
|
66
|
+
--from-pypi <pkg> Install unverified PyPI package as MCP server
|
|
67
|
+
--from-url <url> Install unverified remote URL as MCP server
|
|
54
68
|
|
|
55
69
|
Examples:
|
|
56
70
|
getmcp add # Interactive server selection
|
|
@@ -91,6 +105,12 @@ async function main() {
|
|
|
91
105
|
apps: flags.apps,
|
|
92
106
|
allApps: flags.allApps,
|
|
93
107
|
dryRun: flags.dryRun,
|
|
108
|
+
json: flags.json,
|
|
109
|
+
fromNpm: flags.fromNpm,
|
|
110
|
+
fromPypi: flags.fromPypi,
|
|
111
|
+
fromUrl: flags.fromUrl,
|
|
112
|
+
global: flags.global,
|
|
113
|
+
project: flags.project,
|
|
94
114
|
});
|
|
95
115
|
break;
|
|
96
116
|
}
|
|
@@ -99,6 +119,8 @@ async function main() {
|
|
|
99
119
|
yes: flags.yes,
|
|
100
120
|
apps: flags.apps,
|
|
101
121
|
dryRun: flags.dryRun,
|
|
122
|
+
global: flags.global,
|
|
123
|
+
project: flags.project,
|
|
102
124
|
});
|
|
103
125
|
break;
|
|
104
126
|
}
|
|
@@ -107,6 +129,8 @@ async function main() {
|
|
|
107
129
|
installed: flags.installed,
|
|
108
130
|
search: flags.search,
|
|
109
131
|
category: flags.category,
|
|
132
|
+
json: flags.json,
|
|
133
|
+
quiet: flags.quiet,
|
|
110
134
|
});
|
|
111
135
|
break;
|
|
112
136
|
}
|
|
@@ -115,7 +139,9 @@ async function main() {
|
|
|
115
139
|
break;
|
|
116
140
|
}
|
|
117
141
|
case "check": {
|
|
118
|
-
await checkCommand(
|
|
142
|
+
await checkCommand({
|
|
143
|
+
json: flags.json,
|
|
144
|
+
});
|
|
119
145
|
break;
|
|
120
146
|
}
|
|
121
147
|
case "update": {
|
|
@@ -124,6 +150,8 @@ async function main() {
|
|
|
124
150
|
apps: flags.apps,
|
|
125
151
|
allApps: flags.allApps,
|
|
126
152
|
dryRun: flags.dryRun,
|
|
153
|
+
global: flags.global,
|
|
154
|
+
project: flags.project,
|
|
127
155
|
});
|
|
128
156
|
break;
|
|
129
157
|
}
|
|
@@ -131,6 +159,31 @@ async function main() {
|
|
|
131
159
|
await initCommand();
|
|
132
160
|
break;
|
|
133
161
|
}
|
|
162
|
+
case "doctor": {
|
|
163
|
+
await doctorCommand({
|
|
164
|
+
json: flags.json,
|
|
165
|
+
});
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
case "import": {
|
|
169
|
+
await importCommand({
|
|
170
|
+
yes: flags.yes,
|
|
171
|
+
json: flags.json,
|
|
172
|
+
});
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case "sync": {
|
|
176
|
+
await syncCommand({
|
|
177
|
+
yes: flags.yes,
|
|
178
|
+
apps: flags.apps,
|
|
179
|
+
allApps: flags.allApps,
|
|
180
|
+
dryRun: flags.dryRun,
|
|
181
|
+
json: flags.json,
|
|
182
|
+
global: flags.global,
|
|
183
|
+
project: flags.project,
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
134
187
|
default:
|
|
135
188
|
console.error(`Unknown command: ${rawCommand}`);
|
|
136
189
|
printHelp();
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,OAAO,EAAE,OAAO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ANGED
|
@@ -17,6 +17,12 @@ export interface AddOptions {
|
|
|
17
17
|
apps?: string[];
|
|
18
18
|
allApps?: boolean;
|
|
19
19
|
dryRun?: boolean;
|
|
20
|
+
json?: boolean;
|
|
21
|
+
fromNpm?: string;
|
|
22
|
+
fromPypi?: string;
|
|
23
|
+
fromUrl?: string;
|
|
24
|
+
global?: boolean;
|
|
25
|
+
project?: boolean;
|
|
20
26
|
}
|
|
21
27
|
export declare function addCommand(serverIdArg?: string, options?: AddOptions): Promise<void>;
|
|
22
28
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsBH,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAwV9F"}
|