@funnycode/myclaude 0.1.299 → 0.1.300

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/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.299",
8
- BUILD_TIME: "2026-08-29T19:01:33.786Z",
7
+ VERSION: "0.1.300",
8
+ BUILD_TIME: "2026-08-30T18:28:58.366Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.299",
120030
+ version: "0.1.300",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -575996,6 +575996,99 @@ var init_addCommand = __esm(() => {
575996
575996
  init_checker();
575997
575997
  });
575998
575998
 
575999
+ // src/services/mcp/discovery.ts
576000
+ function normalizeRegistryUrl(url3) {
576001
+ try {
576002
+ const u2 = new URL(url3);
576003
+ u2.search = "";
576004
+ return u2.toString().replace(/\/$/, "");
576005
+ } catch {
576006
+ return;
576007
+ }
576008
+ }
576009
+ function nameFromUrl(url3) {
576010
+ try {
576011
+ const u2 = new URL(url3);
576012
+ const last2 = u2.pathname.split("/").filter(Boolean).pop();
576013
+ return (last2 || u2.hostname.split(".")[0]).toLowerCase();
576014
+ } catch {
576015
+ return url3;
576016
+ }
576017
+ }
576018
+ function extractDiscoverableServers(payload) {
576019
+ if (!payload || typeof payload !== "object")
576020
+ return [];
576021
+ const { servers } = payload;
576022
+ if (!Array.isArray(servers))
576023
+ return [];
576024
+ const seen = new Set;
576025
+ const out = [];
576026
+ for (const entry of servers) {
576027
+ const remotes = entry?.server?.remotes;
576028
+ if (!Array.isArray(remotes))
576029
+ continue;
576030
+ for (const remote of remotes) {
576031
+ const raw = remote?.url;
576032
+ if (typeof raw !== "string")
576033
+ continue;
576034
+ const normalized = normalizeRegistryUrl(raw);
576035
+ if (!normalized)
576036
+ continue;
576037
+ if (seen.has(normalized))
576038
+ continue;
576039
+ seen.add(normalized);
576040
+ out.push({ name: nameFromUrl(normalized), url: normalized });
576041
+ }
576042
+ }
576043
+ return out;
576044
+ }
576045
+ function formatDiscoverableServers(servers) {
576046
+ if (servers.length === 0) {
576047
+ return "No MCP servers found in the registry.";
576048
+ }
576049
+ const lines2 = servers.map((s, i3) => `${i3 + 1}. ${s.name} — ${s.url}`);
576050
+ return lines2.join(`
576051
+ `);
576052
+ }
576053
+ async function fetchDiscoverableServers(timeoutMs = 5000) {
576054
+ try {
576055
+ const response = await axios_default.get(MCP_REGISTRY_URL, { timeout: timeoutMs });
576056
+ return extractDiscoverableServers(response.data);
576057
+ } catch (error52) {
576058
+ console.error(`[mcp-discover] Failed to fetch MCP registry: ${errorMessage(error52)}`);
576059
+ return [];
576060
+ }
576061
+ }
576062
+ var MCP_REGISTRY_URL = "https://api.anthropic.com/mcp-registry/v0/servers?version=latest&visibility=commercial";
576063
+ var init_discovery = __esm(() => {
576064
+ init_axios2();
576065
+ init_errors();
576066
+ });
576067
+
576068
+ // src/commands/mcp/discoverCommand.ts
576069
+ function registerMcpDiscoverCommand(mcp2) {
576070
+ mcp2.command("discover").description(`List available MCP servers from the public registry.
576071
+
576072
+ ` + `Examples:
576073
+ ` + ` claude mcp discover
576074
+ ` + " claude mcp discover --limit 20").option("-l, --limit <n>", "Maximum number of servers to show", "20").action(async (options) => {
576075
+ const limit2 = parseInt(options.limit, 10) || 20;
576076
+ try {
576077
+ const servers = await fetchDiscoverableServers();
576078
+ const shown = servers.slice(0, limit2);
576079
+ const body = formatDiscoverableServers(shown);
576080
+ const extra = servers.length > shown.length ? `
576081
+ (${servers.length - shown.length} more available; use --limit to show more)` : "";
576082
+ cliOk(`${body}${extra}`);
576083
+ } catch (error52) {
576084
+ cliError(`Failed to discover MCP servers: ${error52 instanceof Error ? error52.message : String(error52)}`);
576085
+ }
576086
+ });
576087
+ }
576088
+ var init_discoverCommand = __esm(() => {
576089
+ init_discovery();
576090
+ });
576091
+
575999
576092
  // src/commands/mcp/xaaIdpCommand.ts
576000
576093
  function registerMcpXaaIdpCommand(mcp2) {
576001
576094
  const xaaIdp = mcp2.command("xaa").description("Manage the XAA (SEP-990) IdP connection");
@@ -591002,6 +591095,7 @@ Usage: myclaude --remote "your task description"`, () => gracefulShutdown(1));
591002
591095
  });
591003
591096
  });
591004
591097
  registerMcpAddCommand(mcp2);
591098
+ registerMcpDiscoverCommand(mcp2);
591005
591099
  if (isXaaEnabled()) {
591006
591100
  registerMcpXaaIdpCommand(mcp2);
591007
591101
  }
@@ -591392,6 +591486,7 @@ var init_main3 = __esm(() => {
591392
591486
  init_tempfile();
591393
591487
  init_uuid();
591394
591488
  init_addCommand();
591489
+ init_discoverCommand();
591395
591490
  init_xaaIdpCommand();
591396
591491
  init_internalLogging();
591397
591492
  init_claudeai();
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.299",
8
- BUILD_TIME: "2026-08-29T19:01:33.786Z",
7
+ VERSION: "0.1.300",
8
+ BUILD_TIME: "2026-08-30T18:28:58.366Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.299",
120030
+ version: "0.1.300",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -575996,6 +575996,99 @@ var init_addCommand = __esm(() => {
575996
575996
  init_checker();
575997
575997
  });
575998
575998
 
575999
+ // src/services/mcp/discovery.ts
576000
+ function normalizeRegistryUrl(url3) {
576001
+ try {
576002
+ const u2 = new URL(url3);
576003
+ u2.search = "";
576004
+ return u2.toString().replace(/\/$/, "");
576005
+ } catch {
576006
+ return;
576007
+ }
576008
+ }
576009
+ function nameFromUrl(url3) {
576010
+ try {
576011
+ const u2 = new URL(url3);
576012
+ const last2 = u2.pathname.split("/").filter(Boolean).pop();
576013
+ return (last2 || u2.hostname.split(".")[0]).toLowerCase();
576014
+ } catch {
576015
+ return url3;
576016
+ }
576017
+ }
576018
+ function extractDiscoverableServers(payload) {
576019
+ if (!payload || typeof payload !== "object")
576020
+ return [];
576021
+ const { servers } = payload;
576022
+ if (!Array.isArray(servers))
576023
+ return [];
576024
+ const seen = new Set;
576025
+ const out = [];
576026
+ for (const entry of servers) {
576027
+ const remotes = entry?.server?.remotes;
576028
+ if (!Array.isArray(remotes))
576029
+ continue;
576030
+ for (const remote of remotes) {
576031
+ const raw = remote?.url;
576032
+ if (typeof raw !== "string")
576033
+ continue;
576034
+ const normalized = normalizeRegistryUrl(raw);
576035
+ if (!normalized)
576036
+ continue;
576037
+ if (seen.has(normalized))
576038
+ continue;
576039
+ seen.add(normalized);
576040
+ out.push({ name: nameFromUrl(normalized), url: normalized });
576041
+ }
576042
+ }
576043
+ return out;
576044
+ }
576045
+ function formatDiscoverableServers(servers) {
576046
+ if (servers.length === 0) {
576047
+ return "No MCP servers found in the registry.";
576048
+ }
576049
+ const lines2 = servers.map((s, i3) => `${i3 + 1}. ${s.name} — ${s.url}`);
576050
+ return lines2.join(`
576051
+ `);
576052
+ }
576053
+ async function fetchDiscoverableServers(timeoutMs = 5000) {
576054
+ try {
576055
+ const response = await axios_default.get(MCP_REGISTRY_URL, { timeout: timeoutMs });
576056
+ return extractDiscoverableServers(response.data);
576057
+ } catch (error52) {
576058
+ console.error(`[mcp-discover] Failed to fetch MCP registry: ${errorMessage(error52)}`);
576059
+ return [];
576060
+ }
576061
+ }
576062
+ var MCP_REGISTRY_URL = "https://api.anthropic.com/mcp-registry/v0/servers?version=latest&visibility=commercial";
576063
+ var init_discovery = __esm(() => {
576064
+ init_axios2();
576065
+ init_errors();
576066
+ });
576067
+
576068
+ // src/commands/mcp/discoverCommand.ts
576069
+ function registerMcpDiscoverCommand(mcp2) {
576070
+ mcp2.command("discover").description(`List available MCP servers from the public registry.
576071
+
576072
+ ` + `Examples:
576073
+ ` + ` claude mcp discover
576074
+ ` + " claude mcp discover --limit 20").option("-l, --limit <n>", "Maximum number of servers to show", "20").action(async (options) => {
576075
+ const limit2 = parseInt(options.limit, 10) || 20;
576076
+ try {
576077
+ const servers = await fetchDiscoverableServers();
576078
+ const shown = servers.slice(0, limit2);
576079
+ const body = formatDiscoverableServers(shown);
576080
+ const extra = servers.length > shown.length ? `
576081
+ (${servers.length - shown.length} more available; use --limit to show more)` : "";
576082
+ cliOk(`${body}${extra}`);
576083
+ } catch (error52) {
576084
+ cliError(`Failed to discover MCP servers: ${error52 instanceof Error ? error52.message : String(error52)}`);
576085
+ }
576086
+ });
576087
+ }
576088
+ var init_discoverCommand = __esm(() => {
576089
+ init_discovery();
576090
+ });
576091
+
575999
576092
  // src/commands/mcp/xaaIdpCommand.ts
576000
576093
  function registerMcpXaaIdpCommand(mcp2) {
576001
576094
  const xaaIdp = mcp2.command("xaa").description("Manage the XAA (SEP-990) IdP connection");
@@ -591002,6 +591095,7 @@ Usage: myclaude --remote "your task description"`, () => gracefulShutdown(1));
591002
591095
  });
591003
591096
  });
591004
591097
  registerMcpAddCommand(mcp2);
591098
+ registerMcpDiscoverCommand(mcp2);
591005
591099
  if (isXaaEnabled()) {
591006
591100
  registerMcpXaaIdpCommand(mcp2);
591007
591101
  }
@@ -591392,6 +591486,7 @@ var init_main3 = __esm(() => {
591392
591486
  init_tempfile();
591393
591487
  init_uuid();
591394
591488
  init_addCommand();
591489
+ init_discoverCommand();
591395
591490
  init_xaaIdpCommand();
591396
591491
  init_internalLogging();
591397
591492
  init_claudeai();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.299",
3
+ "version": "0.1.300",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",