@hasna/connectors 0.2.9 → 0.3.0
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/bin/index.js +3 -3
- package/bin/mcp.js +24 -36
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -6583,7 +6583,7 @@ var PRESETS = {
|
|
|
6583
6583
|
commerce: { description: "Commerce and finance", connectors: ["stripe", "shopify", "revolut", "mercury", "pandadoc"] }
|
|
6584
6584
|
};
|
|
6585
6585
|
var program2 = new Command;
|
|
6586
|
-
program2.name("connectors").description("Install API connectors for your project").version("0.
|
|
6586
|
+
program2.name("connectors").description("Install API connectors for your project").version("0.3.0");
|
|
6587
6587
|
program2.command("interactive", { isDefault: true }).alias("i").description("Interactive connector browser").action(() => {
|
|
6588
6588
|
if (!isTTY) {
|
|
6589
6589
|
console.log(`Non-interactive environment detected. Use a subcommand:
|
|
@@ -7746,7 +7746,7 @@ program2.command("import").argument("<file>", "JSON backup file to import (use -
|
|
|
7746
7746
|
}
|
|
7747
7747
|
});
|
|
7748
7748
|
program2.command("upgrade").alias("self-update").option("--check", "Only check for updates, don't install", false).option("--json", "Output as JSON", false).description("Check for updates and upgrade to the latest version").action(async (options) => {
|
|
7749
|
-
const currentVersion = "0.
|
|
7749
|
+
const currentVersion = "0.3.0";
|
|
7750
7750
|
try {
|
|
7751
7751
|
const res = await fetch("https://registry.npmjs.org/@hasna/connectors/latest");
|
|
7752
7752
|
if (!res.ok)
|
|
@@ -7962,7 +7962,7 @@ Available presets:
|
|
|
7962
7962
|
program2.command("whoami").option("--json", "Output as JSON", false).description("Show current setup: config dir, installed connectors, auth status").action((options) => {
|
|
7963
7963
|
const configDir = join5(homedir3(), ".connectors");
|
|
7964
7964
|
const installed = getInstalledConnectors();
|
|
7965
|
-
const version = "0.
|
|
7965
|
+
const version = "0.3.0";
|
|
7966
7966
|
let configured = 0;
|
|
7967
7967
|
let unconfigured = 0;
|
|
7968
7968
|
const connectorDetails = [];
|
package/bin/mcp.js
CHANGED
|
@@ -20275,14 +20275,12 @@ function guessKeyField(name) {
|
|
|
20275
20275
|
loadConnectorVersions();
|
|
20276
20276
|
var server = new McpServer({
|
|
20277
20277
|
name: "connectors",
|
|
20278
|
-
version: "0.
|
|
20278
|
+
version: "0.3.0"
|
|
20279
20279
|
});
|
|
20280
20280
|
server.registerTool("search_connectors", {
|
|
20281
20281
|
title: "Search Connectors",
|
|
20282
|
-
description: "Search connectors by name
|
|
20283
|
-
inputSchema: {
|
|
20284
|
-
query: exports_external.string().describe("Search query")
|
|
20285
|
-
}
|
|
20282
|
+
description: "Search connectors by name or keyword.",
|
|
20283
|
+
inputSchema: { query: exports_external.string() }
|
|
20286
20284
|
}, async ({ query }) => {
|
|
20287
20285
|
const results = searchConnectors(query);
|
|
20288
20286
|
return {
|
|
@@ -20302,10 +20300,10 @@ server.registerTool("search_connectors", {
|
|
|
20302
20300
|
});
|
|
20303
20301
|
server.registerTool("list_connectors", {
|
|
20304
20302
|
title: "List Connectors",
|
|
20305
|
-
description: "List connectors
|
|
20303
|
+
description: "List connectors. category filters; compact=true returns names only.",
|
|
20306
20304
|
inputSchema: {
|
|
20307
|
-
category: exports_external.string().optional()
|
|
20308
|
-
compact: exports_external.boolean().optional()
|
|
20305
|
+
category: exports_external.string().optional(),
|
|
20306
|
+
compact: exports_external.boolean().optional()
|
|
20309
20307
|
}
|
|
20310
20308
|
}, async ({ category, compact }) => {
|
|
20311
20309
|
let connectors = CONNECTORS;
|
|
@@ -20337,10 +20335,10 @@ server.registerTool("list_connectors", {
|
|
|
20337
20335
|
});
|
|
20338
20336
|
server.registerTool("connector_docs", {
|
|
20339
20337
|
title: "Connector Documentation",
|
|
20340
|
-
description: "Get connector docs.
|
|
20338
|
+
description: "Get connector docs. essential=true returns auth+envVars only.",
|
|
20341
20339
|
inputSchema: {
|
|
20342
|
-
name: exports_external.string()
|
|
20343
|
-
essential: exports_external.boolean().optional()
|
|
20340
|
+
name: exports_external.string(),
|
|
20341
|
+
essential: exports_external.boolean().optional()
|
|
20344
20342
|
}
|
|
20345
20343
|
}, async ({ name, essential }) => {
|
|
20346
20344
|
const meta = getConnector(name);
|
|
@@ -20375,10 +20373,10 @@ server.registerTool("connector_docs", {
|
|
|
20375
20373
|
});
|
|
20376
20374
|
server.registerTool("install_connector", {
|
|
20377
20375
|
title: "Install Connector",
|
|
20378
|
-
description: "Install connectors into .connectors
|
|
20376
|
+
description: "Install connectors into .connectors/.",
|
|
20379
20377
|
inputSchema: {
|
|
20380
|
-
names: exports_external.array(exports_external.string())
|
|
20381
|
-
overwrite: exports_external.boolean().optional()
|
|
20378
|
+
names: exports_external.array(exports_external.string()),
|
|
20379
|
+
overwrite: exports_external.boolean().optional()
|
|
20382
20380
|
}
|
|
20383
20381
|
}, async ({ names, overwrite }) => {
|
|
20384
20382
|
const results = names.map((name) => installConnector(name, { overwrite: overwrite ?? false }));
|
|
@@ -20399,10 +20397,8 @@ server.registerTool("install_connector", {
|
|
|
20399
20397
|
});
|
|
20400
20398
|
server.registerTool("remove_connector", {
|
|
20401
20399
|
title: "Remove Connector",
|
|
20402
|
-
description: "Remove an installed connector
|
|
20403
|
-
inputSchema: {
|
|
20404
|
-
name: exports_external.string().describe("Connector name to remove")
|
|
20405
|
-
}
|
|
20400
|
+
description: "Remove an installed connector.",
|
|
20401
|
+
inputSchema: { name: exports_external.string() }
|
|
20406
20402
|
}, async ({ name }) => {
|
|
20407
20403
|
const removed = removeConnector(name);
|
|
20408
20404
|
return {
|
|
@@ -20432,9 +20428,7 @@ server.registerTool("list_installed", {
|
|
|
20432
20428
|
server.registerTool("connector_info", {
|
|
20433
20429
|
title: "Connector Info",
|
|
20434
20430
|
description: "Get connector metadata and installed status.",
|
|
20435
|
-
inputSchema: {
|
|
20436
|
-
name: exports_external.string().describe("Connector name")
|
|
20437
|
-
}
|
|
20431
|
+
inputSchema: { name: exports_external.string() }
|
|
20438
20432
|
}, async ({ name }) => {
|
|
20439
20433
|
const meta = getConnector(name);
|
|
20440
20434
|
if (!meta) {
|
|
@@ -20456,10 +20450,8 @@ server.registerTool("connector_info", {
|
|
|
20456
20450
|
});
|
|
20457
20451
|
server.registerTool("connector_auth_status", {
|
|
20458
20452
|
title: "Connector Auth Status",
|
|
20459
|
-
description: "Check
|
|
20460
|
-
inputSchema: {
|
|
20461
|
-
name: exports_external.string().describe("Connector name")
|
|
20462
|
-
}
|
|
20453
|
+
description: "Check auth status, token expiry, and env vars.",
|
|
20454
|
+
inputSchema: { name: exports_external.string() }
|
|
20463
20455
|
}, async ({ name }) => {
|
|
20464
20456
|
const meta = getConnector(name);
|
|
20465
20457
|
if (!meta) {
|
|
@@ -20484,11 +20476,11 @@ server.registerTool("connector_auth_status", {
|
|
|
20484
20476
|
});
|
|
20485
20477
|
server.registerTool("configure_auth", {
|
|
20486
20478
|
title: "Configure Auth",
|
|
20487
|
-
description: "Save an API key or
|
|
20479
|
+
description: "Save an API key or token for a connector.",
|
|
20488
20480
|
inputSchema: {
|
|
20489
|
-
name: exports_external.string()
|
|
20490
|
-
key: exports_external.string()
|
|
20491
|
-
field: exports_external.string().optional()
|
|
20481
|
+
name: exports_external.string(),
|
|
20482
|
+
key: exports_external.string(),
|
|
20483
|
+
field: exports_external.string().optional()
|
|
20492
20484
|
}
|
|
20493
20485
|
}, async ({ name, key, field }) => {
|
|
20494
20486
|
try {
|
|
@@ -20534,9 +20526,7 @@ server.registerTool("list_categories", {
|
|
|
20534
20526
|
server.registerTool("search_tools", {
|
|
20535
20527
|
title: "Search Tools",
|
|
20536
20528
|
description: "List tool names, optionally filtered by keyword.",
|
|
20537
|
-
inputSchema: {
|
|
20538
|
-
query: exports_external.string().optional().describe("Keyword filter")
|
|
20539
|
-
}
|
|
20529
|
+
inputSchema: { query: exports_external.string().optional() }
|
|
20540
20530
|
}, async ({ query }) => {
|
|
20541
20531
|
const all = [
|
|
20542
20532
|
"search_connectors",
|
|
@@ -20557,10 +20547,8 @@ server.registerTool("search_tools", {
|
|
|
20557
20547
|
});
|
|
20558
20548
|
server.registerTool("describe_tools", {
|
|
20559
20549
|
title: "Describe Tools",
|
|
20560
|
-
description: "Get descriptions for specific tools
|
|
20561
|
-
inputSchema: {
|
|
20562
|
-
names: exports_external.array(exports_external.string()).describe("Tool names")
|
|
20563
|
-
}
|
|
20550
|
+
description: "Get full descriptions for specific tools.",
|
|
20551
|
+
inputSchema: { names: exports_external.array(exports_external.string()) }
|
|
20564
20552
|
}, async ({ names }) => {
|
|
20565
20553
|
const descriptions = {
|
|
20566
20554
|
search_connectors: "Search connectors by name/keyword. Params: query",
|