add-mcp 1.13.1 → 1.13.3

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 (3) hide show
  1. package/README.md +36 -8
  2. package/dist/index.js +22 -24
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,15 +34,15 @@ console.log(result);
34
34
 
35
35
  You can add env variables and arguments (stdio) and headers (remote) to the server config using the `--env`, `--args` and `--header` options. With `${VAR}` placeholders, interactive installs prompt for each variable (omit skipped optional keys so empty strings are not written to config).
36
36
 
37
- ## Find an MCP Servers
37
+ ## Find MCP Servers
38
38
 
39
- Find and install MCP servers from the integrations.sh MCP registry and/or the official Anthropic MCP registry:
39
+ Find and install MCP servers from the integrations.sh MCP registry:
40
40
 
41
41
  ```bash
42
42
  npx add-mcp find vercel
43
43
  ```
44
44
 
45
- When running `find`/`search` for the first time, the CLI prompts you to choose which registries to enable (integrations.sh MCP registry and/or official Anthropic registry). You can also add custom registries to the configuration file.
45
+ The first `find`/`search` run automatically saves the integrations.sh registry to `~/.config/add-mcp/config.json` (or `$XDG_CONFIG_HOME/add-mcp/config.json`). You can edit that file to replace the default registry, add the official Anthropic registry, or point at any registry-compatible server.
46
46
 
47
47
  ## Supported Agents
48
48
 
@@ -284,9 +284,7 @@ If a selected remote server defines URL variables or header inputs:
284
284
 
285
285
  ### Configuring Registries for Find / Search
286
286
 
287
- The first time you run `find` or `search`, the CLI prompts you to choose which registries to enable. Your selection is saved to `~/.config/add-mcp/config.json` (respects `XDG_CONFIG_HOME`) and reused on every subsequent search.
288
-
289
- If you run with `-y` before this one-time registry setup is completed, the CLI exits with guidance to rerun without `--yes`.
287
+ The first time you run `find` or `search`, the CLI automatically saves the integrations.sh MCP registry to `~/.config/add-mcp/config.json` (respects `XDG_CONFIG_HOME`) and reuses that registry on every subsequent search.
290
288
 
291
289
  ### Built-in Registries
292
290
 
@@ -308,7 +306,37 @@ bun run registry:verify
308
306
 
309
307
  ### Editing or Removing Registries
310
308
 
311
- Registry selections are stored in `~/.config/add-mcp/config.json` under the `findRegistries` key. You can edit this file directly to add, remove, or reorder registries:
309
+ Registry selections are stored in `~/.config/add-mcp/config.json` under the `findRegistries` key. You can edit this file directly to replace, add, remove, or reorder registries.
310
+
311
+ Default integrations.sh registry:
312
+
313
+ ```json
314
+ {
315
+ "version": 1,
316
+ "findRegistries": [
317
+ {
318
+ "url": "https://mcp.agent-tooling.dev/api/v1/servers",
319
+ "label": "integrations.sh MCP registry"
320
+ }
321
+ ]
322
+ }
323
+ ```
324
+
325
+ Replace the default with the official Anthropic registry:
326
+
327
+ ```json
328
+ {
329
+ "version": 1,
330
+ "findRegistries": [
331
+ {
332
+ "url": "https://registry.modelcontextprotocol.io/v0.1/servers",
333
+ "label": "Official Anthropic registry"
334
+ }
335
+ ]
336
+ }
337
+ ```
338
+
339
+ Search both integrations.sh and the official Anthropic registry:
312
340
 
313
341
  ```json
314
342
  {
@@ -326,7 +354,7 @@ Registry selections are stored in `~/.config/add-mcp/config.json` under the `fin
326
354
  }
327
355
  ```
328
356
 
329
- To reset and re-trigger the interactive selection prompt, remove the `findRegistries` key (or delete the file entirely).
357
+ To reset to the default integrations.sh registry, remove the `findRegistries` key or delete the config file.
330
358
 
331
359
  ### Adding a Custom Registry
332
360
 
package/dist/index.js CHANGED
@@ -472,9 +472,22 @@ function transportLabel(entry) {
472
472
  if (entry.remotes && entry.remotes.length > 0) parts.push("remote");
473
473
  return parts.length > 0 ? parts.join(", ") : "unknown";
474
474
  }
475
+ function formatRemoteTarget(url) {
476
+ return url.replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").replace(/\/$/, "");
477
+ }
478
+ function formatFindResultTarget(entry) {
479
+ const remote = pickRemote(entry);
480
+ if (remote) {
481
+ return formatRemoteTarget(remote.url);
482
+ }
483
+ if (entry.package) {
484
+ return formatPackageTarget(entry.package);
485
+ }
486
+ return entry.name;
487
+ }
475
488
  function formatFindResultRow(entry) {
476
489
  const display = entry.title ?? entry.name;
477
- return `${display} (${entry.name}) [${transportLabel(entry)}]`;
490
+ return `${display} (${formatFindResultTarget(entry)}) [${transportLabel(entry)}]`;
478
491
  }
479
492
  async function promptValue(field) {
480
493
  return p.text({
@@ -784,7 +797,7 @@ async function runFind(query, options) {
784
797
  // package.json
785
798
  var package_default = {
786
799
  name: "add-mcp",
787
- version: "1.13.1",
800
+ version: "1.13.3",
788
801
  description: "Add MCP servers to your favorite coding agents with a single command.",
789
802
  author: "Andre Landgraf <andre@neon.tech>",
790
803
  license: "Apache-2.0",
@@ -914,34 +927,19 @@ function resolveAgentType(input) {
914
927
  }
915
928
  return null;
916
929
  }
917
- async function ensureFindRegistriesConfigured(yes) {
930
+ async function ensureFindRegistriesConfigured() {
918
931
  const configured = await getFindRegistries();
919
932
  if (configured.length > 0) {
920
933
  return configured;
921
934
  }
922
- p2.log.warn("Find requires configuring one or more registries");
923
- if (yes) {
924
- p2.log.error("Re-run without --yes to configure registries for find/search");
925
- return null;
926
- }
927
- const defaults = getDefaultFindRegistries();
928
- const selected = await p2.multiselect({
929
- message: "[One time] Please select what MCP registries you would like to configure globally for search",
930
- options: defaults.map((registry) => ({
931
- value: registry.url,
932
- label: registry.label ?? registry.url
933
- })),
934
- required: true
935
- });
936
- if (p2.isCancel(selected)) {
937
- return null;
935
+ const defaultRegistry = getDefaultFindRegistries()[0];
936
+ if (!defaultRegistry) {
937
+ throw new Error("No default find registry is configured");
938
938
  }
939
- const selectedRegistries = defaults.filter(
940
- (registry) => selected.includes(registry.url)
941
- );
939
+ const selectedRegistries = [defaultRegistry];
942
940
  await saveFindRegistries(selectedRegistries);
943
941
  p2.log.info(
944
- `Selection has been saved to ${shortenPath(getConfigPath())} - you can remove or update it any time.`
942
+ `Using ${defaultRegistry.label ?? defaultRegistry.url}. Saved to ${shortenPath(getConfigPath())} - you can remove or update it any time.`
945
943
  );
946
944
  return selectedRegistries;
947
945
  }
@@ -1167,7 +1165,7 @@ async function runFindCommand(keyword, rawOptions) {
1167
1165
  ...extractSubcommandOptionsFromArgv()
1168
1166
  };
1169
1167
  const query = (keyword ?? "").trim();
1170
- const registries = await ensureFindRegistriesConfigured(options.yes);
1168
+ const registries = await ensureFindRegistriesConfigured();
1171
1169
  if (!registries) {
1172
1170
  p2.cancel("Find cancelled");
1173
1171
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-mcp",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "Add MCP servers to your favorite coding agents with a single command.",
5
5
  "author": "Andre Landgraf <andre@neon.tech>",
6
6
  "license": "Apache-2.0",