@mcp-use/cli 2.1.25 → 2.2.0-canary.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/dist/index.js CHANGED
@@ -238,7 +238,7 @@ if (container && Component) {
238
238
  "widgets",
239
239
  widgetName
240
240
  );
241
- const baseUrl = `/mcp-use/widgets/${widgetName}/`;
241
+ const baseUrl = mcpUrl ? `${mcpUrl}/${widgetName}/` : `/mcp-use/widgets/${widgetName}/`;
242
242
  let widgetMetadata = {};
243
243
  try {
244
244
  const metadataTempDir = import_node_path.default.join(
@@ -330,13 +330,10 @@ if (container && Component) {
330
330
  }
331
331
  }
332
332
  });
333
- const metadataPath = import_node_path.default.join(outDir, "metadata.json");
334
- await fs.writeFile(
335
- metadataPath,
336
- JSON.stringify(widgetMetadata, null, 2),
337
- "utf8"
338
- );
339
- builtWidgets.push(widgetName);
333
+ builtWidgets.push({
334
+ name: widgetName,
335
+ metadata: widgetMetadata
336
+ });
340
337
  console.log(import_chalk.default.green(` \u2713 Built ${widgetName}`));
341
338
  } catch (error) {
342
339
  console.error(import_chalk.default.red(` \u2717 Failed to build ${widgetName}:`), error);
@@ -353,15 +350,15 @@ program.command("build").description("Build TypeScript and MCP UI widgets").opti
353
350
  console.log(import_chalk.default.gray("Building TypeScript..."));
354
351
  await runCommand("npx", ["tsc"], projectPath);
355
352
  console.log(import_chalk.default.green("\u2713 TypeScript build complete!"));
356
- const manifestPath = import_node_path.default.join(
357
- projectPath,
358
- "dist",
359
- ".mcp-use-manifest.json"
360
- );
353
+ const manifestPath = import_node_path.default.join(projectPath, "dist", "mcp-use.json");
354
+ const widgetsData = {};
355
+ for (const widget of builtWidgets) {
356
+ widgetsData[widget.name] = widget.metadata;
357
+ }
361
358
  const manifest = {
362
359
  includeInspector: options.withInspector || false,
363
360
  buildTime: (/* @__PURE__ */ new Date()).toISOString(),
364
- widgets: builtWidgets
361
+ widgets: widgetsData
365
362
  };
366
363
  await fs.mkdir(import_node_path.default.dirname(manifestPath), { recursive: true });
367
364
  await fs.writeFile(
package/dist/index.mjs CHANGED
@@ -215,7 +215,7 @@ if (container && Component) {
215
215
  "widgets",
216
216
  widgetName
217
217
  );
218
- const baseUrl = `/mcp-use/widgets/${widgetName}/`;
218
+ const baseUrl = mcpUrl ? `${mcpUrl}/${widgetName}/` : `/mcp-use/widgets/${widgetName}/`;
219
219
  let widgetMetadata = {};
220
220
  try {
221
221
  const metadataTempDir = path.join(
@@ -307,13 +307,10 @@ if (container && Component) {
307
307
  }
308
308
  }
309
309
  });
310
- const metadataPath = path.join(outDir, "metadata.json");
311
- await fs.writeFile(
312
- metadataPath,
313
- JSON.stringify(widgetMetadata, null, 2),
314
- "utf8"
315
- );
316
- builtWidgets.push(widgetName);
310
+ builtWidgets.push({
311
+ name: widgetName,
312
+ metadata: widgetMetadata
313
+ });
317
314
  console.log(chalk.green(` \u2713 Built ${widgetName}`));
318
315
  } catch (error) {
319
316
  console.error(chalk.red(` \u2717 Failed to build ${widgetName}:`), error);
@@ -330,15 +327,15 @@ program.command("build").description("Build TypeScript and MCP UI widgets").opti
330
327
  console.log(chalk.gray("Building TypeScript..."));
331
328
  await runCommand("npx", ["tsc"], projectPath);
332
329
  console.log(chalk.green("\u2713 TypeScript build complete!"));
333
- const manifestPath = path.join(
334
- projectPath,
335
- "dist",
336
- ".mcp-use-manifest.json"
337
- );
330
+ const manifestPath = path.join(projectPath, "dist", "mcp-use.json");
331
+ const widgetsData = {};
332
+ for (const widget of builtWidgets) {
333
+ widgetsData[widget.name] = widget.metadata;
334
+ }
338
335
  const manifest = {
339
336
  includeInspector: options.withInspector || false,
340
337
  buildTime: (/* @__PURE__ */ new Date()).toISOString(),
341
- widgets: builtWidgets
338
+ widgets: widgetsData
342
339
  };
343
340
  await fs.mkdir(path.dirname(manifestPath), { recursive: true });
344
341
  await fs.writeFile(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-use/cli",
3
- "version": "2.1.25",
3
+ "version": "2.2.0-canary.0",
4
4
  "description": "Build tool for MCP UI widgets - bundles React components into standalone HTML pages for Model Context Protocol servers",
5
5
  "author": "mcp-use, Inc.",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "tsx": "^4.0.0",
45
45
  "vite": "^6.0.0",
46
46
  "ws": "^8.18.0",
47
- "mcp-use": "1.2.4",
48
- "@mcp-use/inspector": "0.4.13"
47
+ "@mcp-use/inspector": "0.5.0-canary.0",
48
+ "mcp-use": "1.3.0-canary.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^20.0.0",