@fjyueke/bify-mcp 1.0.1 → 1.0.2

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 (2) hide show
  1. package/dist/index.js +578 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26,9 +26,9 @@ var config = {
26
26
  )
27
27
  },
28
28
  server: {
29
- name: "tify-mcp",
30
- version: "1.0.0",
31
- description: "Provides documentation and example for Tify components"
29
+ name: "bify-mcp",
30
+ version: "1.0.2",
31
+ description: "Provides documentation, examples and Arco conversion for Bify components"
32
32
  }
33
33
  };
34
34
 
@@ -161,6 +161,546 @@ ${content}
161
161
  }
162
162
  };
163
163
 
164
+ // src/services/arco-mapping.ts
165
+ var componentMappings = [
166
+ {
167
+ arcoName: "Cell",
168
+ bifyName: "Cell",
169
+ arcoImport: "@arco-design/mobile-react",
170
+ bifyImport: "@fjyueke/bify-core",
171
+ propMappings: [
172
+ { arcoProp: "label", bifyProp: "title" },
173
+ { arcoProp: "desc", bifyProp: "brief" },
174
+ { arcoProp: "text", bifyProp: "children" },
175
+ { arcoProp: "showArrow", bifyProp: "clickable" },
176
+ { arcoProp: "bordered", bifyProp: "bordered" },
177
+ { arcoProp: "icon", bifyProp: "icon" }
178
+ ]
179
+ },
180
+ {
181
+ arcoName: "CellGroup",
182
+ bifyName: "CellGroup",
183
+ arcoImport: "@arco-design/mobile-react",
184
+ bifyImport: "@fjyueke/bify-core",
185
+ propMappings: []
186
+ },
187
+ {
188
+ arcoName: "Button",
189
+ bifyName: "Button",
190
+ arcoImport: "@arco-design/mobile-react",
191
+ bifyImport: "@fjyueke/bify-core",
192
+ propMappings: [
193
+ { arcoProp: "type", bifyProp: "type" },
194
+ { arcoProp: "size", bifyProp: "size" },
195
+ { arcoProp: "disabled", bifyProp: "disabled" },
196
+ { arcoProp: "loading", bifyProp: "loading" },
197
+ { arcoProp: "block", bifyProp: "block" },
198
+ { arcoProp: "ghost", bifyProp: "plain" }
199
+ ]
200
+ },
201
+ {
202
+ arcoName: "Icon",
203
+ bifyName: "",
204
+ arcoImport: "@arco-design/mobile-react",
205
+ bifyImport: "@fjyueke/bify-icons",
206
+ propMappings: []
207
+ },
208
+ {
209
+ arcoName: "Avatar",
210
+ bifyName: "Avatar",
211
+ arcoImport: "@arco-design/mobile-react",
212
+ bifyImport: "@fjyueke/bify-core",
213
+ propMappings: [
214
+ { arcoProp: "size", bifyProp: "size" },
215
+ { arcoProp: "src", bifyProp: "src" },
216
+ { arcoProp: "icon", bifyProp: "icon" }
217
+ ]
218
+ },
219
+ {
220
+ arcoName: "Badge",
221
+ bifyName: "Badge",
222
+ arcoImport: "@arco-design/mobile-react",
223
+ bifyImport: "@fjyueke/bify-core",
224
+ propMappings: [
225
+ { arcoProp: "dot", bifyProp: "dot" },
226
+ { arcoProp: "count", bifyProp: "content" },
227
+ { arcoProp: "maxCount", bifyProp: "max" }
228
+ ]
229
+ },
230
+ {
231
+ arcoName: "Tag",
232
+ bifyName: "Tag",
233
+ arcoImport: "@arco-design/mobile-react",
234
+ bifyImport: "@fjyueke/bify-core",
235
+ propMappings: [
236
+ { arcoProp: "type", bifyProp: "type" },
237
+ { arcoProp: "size", bifyProp: "size" },
238
+ { arcoProp: "closable", bifyProp: "closable" }
239
+ ]
240
+ },
241
+ {
242
+ arcoName: "Switch",
243
+ bifyName: "Switch",
244
+ arcoImport: "@arco-design/mobile-react",
245
+ bifyImport: "@fjyueke/bify-core",
246
+ propMappings: [
247
+ { arcoProp: "checked", bifyProp: "checked" },
248
+ { arcoProp: "disabled", bifyProp: "disabled" },
249
+ { arcoProp: "onChange", bifyProp: "onChange" }
250
+ ]
251
+ },
252
+ {
253
+ arcoName: "Checkbox",
254
+ bifyName: "Checkbox",
255
+ arcoImport: "@arco-design/mobile-react",
256
+ bifyImport: "@fjyueke/bify-core",
257
+ propMappings: [
258
+ { arcoProp: "checked", bifyProp: "checked" },
259
+ { arcoProp: "disabled", bifyProp: "disabled" },
260
+ { arcoProp: "onChange", bifyProp: "onChange" }
261
+ ]
262
+ },
263
+ {
264
+ arcoName: "Radio",
265
+ bifyName: "Radio",
266
+ arcoImport: "@arco-design/mobile-react",
267
+ bifyImport: "@fjyueke/bify-core",
268
+ propMappings: [
269
+ { arcoProp: "checked", bifyProp: "checked" },
270
+ { arcoProp: "disabled", bifyProp: "disabled" },
271
+ { arcoProp: "onChange", bifyProp: "onChange" }
272
+ ]
273
+ },
274
+ {
275
+ arcoName: "Dialog",
276
+ bifyName: "Dialog",
277
+ arcoImport: "@arco-design/mobile-react",
278
+ bifyImport: "@fjyueke/bify-core",
279
+ propMappings: [
280
+ { arcoProp: "visible", bifyProp: "open" },
281
+ { arcoProp: "title", bifyProp: "title" },
282
+ { arcoProp: "content", bifyProp: "children" },
283
+ { arcoProp: "onClose", bifyProp: "onClose" }
284
+ ]
285
+ },
286
+ {
287
+ arcoName: "Toast",
288
+ bifyName: "Toast",
289
+ arcoImport: "@arco-design/mobile-react",
290
+ bifyImport: "@fjyueke/bify-core",
291
+ propMappings: []
292
+ },
293
+ {
294
+ arcoName: "Popup",
295
+ bifyName: "Popup",
296
+ arcoImport: "@arco-design/mobile-react",
297
+ bifyImport: "@fjyueke/bify-core",
298
+ propMappings: [
299
+ { arcoProp: "visible", bifyProp: "open" },
300
+ { arcoProp: "position", bifyProp: "position" },
301
+ { arcoProp: "onClose", bifyProp: "onClose" }
302
+ ]
303
+ },
304
+ {
305
+ arcoName: "Tabs",
306
+ bifyName: "Tabs",
307
+ arcoImport: "@arco-design/mobile-react",
308
+ bifyImport: "@fjyueke/bify-core",
309
+ propMappings: [
310
+ { arcoProp: "activeTab", bifyProp: "active" },
311
+ { arcoProp: "onChange", bifyProp: "onChange" }
312
+ ]
313
+ },
314
+ {
315
+ arcoName: "TabPane",
316
+ bifyName: "Tabs.Tab",
317
+ arcoImport: "@arco-design/mobile-react",
318
+ bifyImport: "@fjyueke/bify-core",
319
+ propMappings: [
320
+ { arcoProp: "title", bifyProp: "title" },
321
+ { arcoProp: "key", bifyProp: "key" }
322
+ ]
323
+ },
324
+ {
325
+ arcoName: "Picker",
326
+ bifyName: "Picker",
327
+ arcoImport: "@arco-design/mobile-react",
328
+ bifyImport: "@fjyueke/bify-core",
329
+ propMappings: [
330
+ { arcoProp: "visible", bifyProp: "open" },
331
+ { arcoProp: "title", bifyProp: "title" },
332
+ { arcoProp: "onClose", bifyProp: "onClose" }
333
+ ]
334
+ },
335
+ {
336
+ arcoName: "PickerView",
337
+ bifyName: "Picker",
338
+ arcoImport: "@arco-design/mobile-react",
339
+ bifyImport: "@fjyueke/bify-core",
340
+ propMappings: []
341
+ },
342
+ {
343
+ arcoName: "DatePicker",
344
+ bifyName: "DatePicker",
345
+ arcoImport: "@arco-design/mobile-react",
346
+ bifyImport: "@fjyueke/bify-core",
347
+ propMappings: [
348
+ { arcoProp: "visible", bifyProp: "open" },
349
+ { arcoProp: "onClose", bifyProp: "onClose" }
350
+ ]
351
+ },
352
+ {
353
+ arcoName: "SearchBar",
354
+ bifyName: "Search",
355
+ arcoImport: "@arco-design/mobile-react",
356
+ bifyImport: "@fjyueke/bify-core",
357
+ propMappings: [
358
+ { arcoProp: "value", bifyProp: "modelValue" },
359
+ { arcoProp: "placeholder", bifyProp: "placeholder" },
360
+ { arcoProp: "onChange", bifyProp: "onChange" },
361
+ { arcoProp: "onSearch", bifyProp: "onSearch" }
362
+ ]
363
+ },
364
+ {
365
+ arcoName: "Field",
366
+ bifyName: "Field",
367
+ arcoImport: "@arco-design/mobile-react",
368
+ bifyImport: "@fjyueke/bify-core",
369
+ propMappings: [
370
+ { arcoProp: "value", bifyProp: "modelValue" },
371
+ { arcoProp: "placeholder", bifyProp: "placeholder" },
372
+ { arcoProp: "label", bifyProp: "label" },
373
+ { arcoProp: "onChange", bifyProp: "onChange" }
374
+ ]
375
+ },
376
+ {
377
+ arcoName: "Textarea",
378
+ bifyName: "Field",
379
+ arcoImport: "@arco-design/mobile-react",
380
+ bifyImport: "@fjyueke/bify-core",
381
+ propMappings: [
382
+ { arcoProp: "value", bifyProp: "modelValue" },
383
+ { arcoProp: "placeholder", bifyProp: "placeholder" },
384
+ { arcoProp: "onChange", bifyProp: "onChange" }
385
+ ]
386
+ },
387
+ {
388
+ arcoName: "Stepper",
389
+ bifyName: "Stepper",
390
+ arcoImport: "@arco-design/mobile-react",
391
+ bifyImport: "@fjyueke/bify-core",
392
+ propMappings: [
393
+ { arcoProp: "value", bifyProp: "modelValue" },
394
+ { arcoProp: "min", bifyProp: "min" },
395
+ { arcoProp: "max", bifyProp: "max" },
396
+ { arcoProp: "step", bifyProp: "step" },
397
+ { arcoProp: "onChange", bifyProp: "onChange" }
398
+ ]
399
+ },
400
+ {
401
+ arcoName: "Slider",
402
+ bifyName: "Slider",
403
+ arcoImport: "@arco-design/mobile-react",
404
+ bifyImport: "@fjyueke/bify-core",
405
+ propMappings: [
406
+ { arcoProp: "value", bifyProp: "modelValue" },
407
+ { arcoProp: "min", bifyProp: "min" },
408
+ { arcoProp: "max", bifyProp: "max" },
409
+ { arcoProp: "onChange", bifyProp: "onChange" }
410
+ ]
411
+ },
412
+ {
413
+ arcoName: "Rate",
414
+ bifyName: "Rate",
415
+ arcoImport: "@arco-design/mobile-react",
416
+ bifyImport: "@fjyueke/bify-core",
417
+ propMappings: [
418
+ { arcoProp: "value", bifyProp: "modelValue" },
419
+ { arcoProp: "max", bifyProp: "count" },
420
+ { arcoProp: "onChange", bifyProp: "onChange" }
421
+ ]
422
+ },
423
+ {
424
+ arcoName: "Uploader",
425
+ bifyName: "Uploader",
426
+ arcoImport: "@arco-design/mobile-react",
427
+ bifyImport: "@fjyueke/bify-core",
428
+ propMappings: [
429
+ { arcoProp: "fileList", bifyProp: "fileList" },
430
+ { arcoProp: "onChange", bifyProp: "onChange" }
431
+ ]
432
+ },
433
+ {
434
+ arcoName: "Image",
435
+ bifyName: "Image",
436
+ arcoImport: "@arco-design/mobile-react",
437
+ bifyImport: "@fjyueke/bify-core",
438
+ propMappings: [
439
+ { arcoProp: "src", bifyProp: "src" },
440
+ { arcoProp: "alt", bifyProp: "alt" }
441
+ ]
442
+ },
443
+ {
444
+ arcoName: "Divider",
445
+ bifyName: "Divider",
446
+ arcoImport: "@arco-design/mobile-react",
447
+ bifyImport: "@fjyueke/bify-core",
448
+ propMappings: [
449
+ { arcoProp: "content", bifyProp: "children" }
450
+ ]
451
+ },
452
+ {
453
+ arcoName: "Loading",
454
+ bifyName: "Loading",
455
+ arcoImport: "@arco-design/mobile-react",
456
+ bifyImport: "@fjyueke/bify-core",
457
+ propMappings: [
458
+ { arcoProp: "type", bifyProp: "type" },
459
+ { arcoProp: "size", bifyProp: "size" }
460
+ ]
461
+ },
462
+ {
463
+ arcoName: "NoticeBar",
464
+ bifyName: "NoticeBar",
465
+ arcoImport: "@arco-design/mobile-react",
466
+ bifyImport: "@fjyueke/bify-core",
467
+ propMappings: [
468
+ { arcoProp: "text", bifyProp: "children" },
469
+ { arcoProp: "leftIcon", bifyProp: "leftIcon" }
470
+ ]
471
+ },
472
+ {
473
+ arcoName: "Progress",
474
+ bifyName: "Progress",
475
+ arcoImport: "@arco-design/mobile-react",
476
+ bifyImport: "@fjyueke/bify-core",
477
+ propMappings: [
478
+ { arcoProp: "percent", bifyProp: "percentage" },
479
+ { arcoProp: "strokeWidth", bifyProp: "strokeWidth" }
480
+ ]
481
+ },
482
+ {
483
+ arcoName: "Skeleton",
484
+ bifyName: "Skeleton",
485
+ arcoImport: "@arco-design/mobile-react",
486
+ bifyImport: "@fjyueke/bify-core",
487
+ propMappings: []
488
+ },
489
+ {
490
+ arcoName: "Grid",
491
+ bifyName: "Grid",
492
+ arcoImport: "@arco-design/mobile-react",
493
+ bifyImport: "@fjyueke/bify-core",
494
+ propMappings: [
495
+ { arcoProp: "columnNum", bifyProp: "columnNum" }
496
+ ]
497
+ },
498
+ {
499
+ arcoName: "Collapse",
500
+ bifyName: "Collapse",
501
+ arcoImport: "@arco-design/mobile-react",
502
+ bifyImport: "@fjyueke/bify-core",
503
+ propMappings: [
504
+ { arcoProp: "defaultActiveKey", bifyProp: "defaultActiveNames" },
505
+ { arcoProp: "activeKey", bifyProp: "activeNames" }
506
+ ]
507
+ },
508
+ {
509
+ arcoName: "PullRefresh",
510
+ bifyName: "PullRefresh",
511
+ arcoImport: "@arco-design/mobile-react",
512
+ bifyImport: "@fjyueke/bify-core",
513
+ propMappings: [
514
+ { arcoProp: "onRefresh", bifyProp: "onRefresh" }
515
+ ]
516
+ },
517
+ {
518
+ arcoName: "NavHeader",
519
+ bifyName: "NavBar",
520
+ arcoImport: "@arco-design/mobile-react",
521
+ bifyImport: "@fjyueke/bify-core",
522
+ propMappings: [
523
+ { arcoProp: "title", bifyProp: "title" },
524
+ { arcoProp: "left", bifyProp: "left" },
525
+ { arcoProp: "right", bifyProp: "right" }
526
+ ]
527
+ },
528
+ {
529
+ arcoName: "CountDown",
530
+ bifyName: "Countdown",
531
+ arcoImport: "@arco-design/mobile-react",
532
+ bifyImport: "@fjyueke/bify-core",
533
+ propMappings: [
534
+ { arcoProp: "endTime", bifyProp: "endTime" }
535
+ ]
536
+ }
537
+ ];
538
+ function findMappingByArcoName(arcoName) {
539
+ return componentMappings.find((m) => m.arcoName === arcoName);
540
+ }
541
+ function findAllArcoComponents() {
542
+ return componentMappings.map((m) => m.arcoName);
543
+ }
544
+
545
+ // src/services/arco-converter.ts
546
+ async function convertArcoToBify(arcoCode) {
547
+ let result = arcoCode;
548
+ result = convertImports(result);
549
+ result = convertComponents(result);
550
+ result = convertIconImports(result);
551
+ return result;
552
+ }
553
+ function convertImports(code) {
554
+ let result = code;
555
+ const arcoImportRegex = /import\s+([\s\S]*?)\s+from\s+['"]@arco-design\/mobile-react['"]/g;
556
+ const matches = [...code.matchAll(arcoImportRegex)];
557
+ const bifyCoreComponents = [];
558
+ const bifyIconComponents = [];
559
+ const remainingComponents = [];
560
+ for (const match of matches) {
561
+ const importContent = match[1].trim();
562
+ const namedImportRegex = /\{([\s\S]*?)\}/;
563
+ const namedMatch = importContent.match(namedImportRegex);
564
+ if (namedMatch) {
565
+ const components = namedMatch[1].split(",").map((c) => c.trim()).filter((c) => c);
566
+ for (const component of components) {
567
+ const mapping = findMappingByArcoName(component);
568
+ if (mapping) {
569
+ if (mapping.bifyImport === "@fjyueke/bify-icons") {
570
+ bifyIconComponents.push(component);
571
+ } else {
572
+ bifyCoreComponents.push(mapping.bifyName || component);
573
+ }
574
+ } else {
575
+ remainingComponents.push(component);
576
+ }
577
+ }
578
+ } else {
579
+ remainingComponents.push(importContent);
580
+ }
581
+ result = result.replace(match[0], "");
582
+ }
583
+ result = result.trim();
584
+ if (bifyCoreComponents.length > 0) {
585
+ const coreImport = `import { ${bifyCoreComponents.join(", ")} } from "@fjyueke/bify-core"
586
+ `;
587
+ result = coreImport + result;
588
+ }
589
+ if (bifyIconComponents.length > 0) {
590
+ const iconImport = `import { ${bifyIconComponents.join(", ")} } from "@fjyueke/bify-icons"
591
+ `;
592
+ result = iconImport + result;
593
+ }
594
+ return result;
595
+ }
596
+ function convertComponents(code) {
597
+ let result = code;
598
+ const arcoComponents = findAllArcoComponents();
599
+ for (const arcoComponent of arcoComponents) {
600
+ const mapping = findMappingByArcoName(arcoComponent);
601
+ if (!mapping || !mapping.bifyName) continue;
602
+ const bifyComponent = mapping.bifyName;
603
+ const componentRegex = new RegExp(
604
+ `<${arcoComponent}([^>]*)\\/?>`,
605
+ "g"
606
+ );
607
+ result = result.replace(componentRegex, (match, props) => {
608
+ let newProps = props;
609
+ for (const propMapping of mapping.propMappings) {
610
+ const propRegex = new RegExp(
611
+ `${propMapping.arcoProp}=(["'])(.*?)\\1`,
612
+ "g"
613
+ );
614
+ newProps = newProps.replace(propRegex, `${propMapping.bifyProp}=$1$2$1`);
615
+ }
616
+ if (arcoComponent === "Dialog" || arcoComponent === "Popup") {
617
+ newProps = newProps.replace(/visible=/g, "open=");
618
+ }
619
+ if (arcoComponent === "SearchBar" || arcoComponent === "Field" || arcoComponent === "Textarea") {
620
+ newProps = newProps.replace(/value=/g, "modelValue=");
621
+ }
622
+ if (arcoComponent === "Cell") {
623
+ newProps = newProps.replace(/showArrow/g, "clickable");
624
+ }
625
+ return `<${bifyComponent}${newProps}/>`;
626
+ });
627
+ const closingComponentRegex = new RegExp(
628
+ `<${arcoComponent}([^>]*)>([sS]*?)</${arcoComponent}>`,
629
+ "g"
630
+ );
631
+ result = result.replace(closingComponentRegex, (match, props, children) => {
632
+ let newProps = props;
633
+ for (const propMapping of mapping.propMappings) {
634
+ const propRegex = new RegExp(
635
+ `${propMapping.arcoProp}=(["'])(.*?)\\1`,
636
+ "g"
637
+ );
638
+ newProps = newProps.replace(propRegex, `${propMapping.bifyProp}=$1$2$1`);
639
+ }
640
+ if (arcoComponent === "Dialog" || arcoComponent === "Popup") {
641
+ newProps = newProps.replace(/visible=/g, "open=");
642
+ }
643
+ if (arcoComponent === "SearchBar" || arcoComponent === "Field" || arcoComponent === "Textarea") {
644
+ newProps = newProps.replace(/value=/g, "modelValue=");
645
+ }
646
+ if (arcoComponent === "Cell") {
647
+ newProps = newProps.replace(/showArrow/g, "clickable");
648
+ }
649
+ return `<${bifyComponent}${newProps}>${children}</${bifyComponent}>`;
650
+ });
651
+ }
652
+ return result;
653
+ }
654
+ function convertIconImports(code) {
655
+ let result = code;
656
+ const arcoIconRegex = /import\s+Icon(\w+)\s+from\s+['"]@arco-design\/mobile-react\/es\/icon\/Icon(\w+)['"]/g;
657
+ result = result.replace(arcoIconRegex, 'import { Icon$1 } from "@fjyueke/bify-icons"');
658
+ return result;
659
+ }
660
+ async function getArcoConversionHelp() {
661
+ const availableComponents = componentMappings.filter((m) => m.bifyName).map((m) => `- ${m.arcoName} \u2192 ${m.bifyName}`).join("\n");
662
+ return `## Arco Mobile \u2192 Bify \u4EE3\u7801\u8F6C\u6362
663
+
664
+ ### \u652F\u6301\u7684\u7EC4\u4EF6
665
+
666
+ ${availableComponents}
667
+
668
+ ### \u4F7F\u7528\u65B9\u5F0F
669
+
670
+ \`\`\`tsx
671
+ // Arco Mobile \u4EE3\u7801
672
+ import { Cell, CellGroup, Button } from '@arco-design/mobile-react';
673
+
674
+ <CellGroup>
675
+ <Cell label="\u6807\u9898" desc="\u63CF\u8FF0" showArrow>\u5185\u5BB9</Cell>
676
+ </CellGroup>
677
+ <Button type="primary">\u6309\u94AE</Button>
678
+
679
+ // \u8F6C\u6362\u4E3A Bify \u4EE3\u7801
680
+ import { Cell, CellGroup, Button } from '@fjyueke/bify-core';
681
+
682
+ <CellGroup>
683
+ <Cell title="\u6807\u9898" brief="\u63CF\u8FF0" clickable>\u5185\u5BB9</Cell>
684
+ </CellGroup>
685
+ <Button type="primary">\u6309\u94AE</Button>
686
+ \`\`\`
687
+
688
+ ### \u5C5E\u6027\u6620\u5C04\u793A\u4F8B
689
+
690
+ | Arco \u5C5E\u6027 | Bify \u5C5E\u6027 |
691
+ |-----------|-----------|
692
+ | \`label\` | \`title\` |
693
+ | \`desc\` | \`brief\` |
694
+ | \`showArrow\` | \`clickable\` |
695
+ | \`visible\` | \`open\` |
696
+ | \`value\` | \`modelValue\` |
697
+ | \`ghost\` | \`plain\` |
698
+
699
+ ### \u8C03\u7528\u65B9\u5F0F
700
+
701
+ \u4F7F\u7528 \`convert-arco-to-bify\` \u5DE5\u5177\uFF0C\u4F20\u5165 Arco Mobile \u4EE3\u7801\u5373\u53EF\u83B7\u5F97\u8F6C\u6362\u540E\u7684 Bify \u4EE3\u7801\u3002`;
702
+ }
703
+
164
704
  // src/tools/components.ts
165
705
  function registerTifyTools(server) {
166
706
  server.tool(
@@ -228,6 +768,41 @@ function registerTifyTools(server) {
228
768
  };
229
769
  }
230
770
  );
771
+ server.tool(
772
+ "convert-arco-to-bify",
773
+ "Converts Arco Mobile React code to Bify code",
774
+ { arcoCode: z.string() },
775
+ async (args) => {
776
+ const convertedCode = await convertArcoToBify(args.arcoCode);
777
+ return {
778
+ content: [
779
+ {
780
+ type: "text",
781
+ text: `## \u8F6C\u6362\u7ED3\u679C
782
+
783
+ \`\`\`tsx
784
+ ${convertedCode}
785
+ \`\`\``
786
+ }
787
+ ]
788
+ };
789
+ }
790
+ );
791
+ server.tool(
792
+ "get-arco-conversion-help",
793
+ "Gets help information for Arco Mobile to Bify conversion",
794
+ async () => {
795
+ const help = await getArcoConversionHelp();
796
+ return {
797
+ content: [
798
+ {
799
+ type: "text",
800
+ text: help
801
+ }
802
+ ]
803
+ };
804
+ }
805
+ );
231
806
  }
232
807
 
233
808
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjyueke/bify-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "MCP UI builder by Bify",
6
6
  "license": "MIT",