add-mcp 1.13.2 → 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.
- package/dist/index.js +15 -2
- package/package.json +1 -1
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
|
|
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.
|
|
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",
|