@mcp-b/react-components 0.6.4 → 0.7.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.
Files changed (42) hide show
  1. package/dist/PromptInput-D6-G24p7.d.ts +528 -0
  2. package/dist/ThinkChatToolParts-DnUiZgCC.d.ts +83 -0
  3. package/dist/components/AgentChat.d.ts +11 -14
  4. package/dist/components/AgentChat.js +76 -57
  5. package/dist/components/AgentConnection.js +21 -18
  6. package/dist/components/Context.d.ts +6 -10
  7. package/dist/components/Context.js +4 -2
  8. package/dist/components/Conversation.d.ts +28 -28
  9. package/dist/components/Conversation.js +35 -54
  10. package/dist/components/Marker.d.ts +57 -0
  11. package/dist/components/Marker.js +89 -0
  12. package/dist/components/McpServerPicker.js +8 -10
  13. package/dist/components/MessageScroller.d.ts +52 -0
  14. package/dist/components/MessageScroller.js +62 -0
  15. package/dist/components/PromptInput.d.ts +2 -534
  16. package/dist/components/PromptInput.js +17 -11
  17. package/dist/components/ThinkChat.d.ts +10 -77
  18. package/dist/components/ThinkChat.js +59 -856
  19. package/dist/components/ThinkChatActivity.d.ts +73 -0
  20. package/dist/components/ThinkChatActivity.js +429 -0
  21. package/dist/components/ThinkChatContext.d.ts +28 -0
  22. package/dist/components/ThinkChatContext.js +10 -0
  23. package/dist/components/ThinkChatToolPanels.d.ts +39 -0
  24. package/dist/components/ThinkChatToolPanels.js +355 -0
  25. package/dist/components/ThinkChatToolParts.d.ts +2 -0
  26. package/dist/components/ThinkChatToolParts.js +66 -0
  27. package/dist/components/WorkspaceExplorer.d.ts +1 -1
  28. package/dist/components/useStickToBottom.d.ts +5 -2
  29. package/dist/components/useStickToBottom.js +5 -2
  30. package/dist/styles/agent-chat.css +15 -3
  31. package/dist/styles/agent-connection.css +12 -0
  32. package/dist/styles/code-block.css +4 -4
  33. package/dist/styles/conversation.css +10 -0
  34. package/dist/styles/index.css +2 -0
  35. package/dist/styles/marker.css +95 -0
  36. package/dist/styles/message-scroller.css +90 -0
  37. package/dist/styles/message.css +2 -1
  38. package/dist/styles/scrollbars.css +10 -2
  39. package/dist/styles/streamdown.css +2 -0
  40. package/dist/utils/mcp-server-catalog.d.ts +392 -1
  41. package/dist/utils/mcp-server-catalog.js +137 -1
  42. package/package.json +3 -2
@@ -1,6 +1,91 @@
1
1
  //#region src/utils/mcp-server-catalog.ts
2
2
  const DCR_CATEGORY = "Auto";
3
3
  const MANUAL_CATEGORY = "Manual";
4
+ const MCP_SERVER_SETUP_AUTH = {
5
+ bearer: {
6
+ type: "bearer",
7
+ label: "Bearer / API key",
8
+ fields: [{
9
+ name: "bearerToken",
10
+ label: "API key / Bearer token",
11
+ inputType: "password",
12
+ placeholder: "Paste token",
13
+ required: true
14
+ }]
15
+ },
16
+ manualOAuthClient: {
17
+ type: "manual_oauth_client",
18
+ label: "OAuth client ID",
19
+ fields: [
20
+ {
21
+ name: "clientId",
22
+ label: "OAuth client ID",
23
+ placeholder: "Client ID",
24
+ required: true
25
+ },
26
+ {
27
+ name: "redirectUrl",
28
+ label: "Redirect URL",
29
+ inputType: "url",
30
+ placeholder: "Registered OAuth callback URL"
31
+ },
32
+ {
33
+ name: "scope",
34
+ label: "Scope",
35
+ placeholder: "Space-separated scopes"
36
+ }
37
+ ]
38
+ },
39
+ manualOAuthClientSecret: {
40
+ type: "manual_oauth_client",
41
+ label: "OAuth client ID + secret",
42
+ fields: [
43
+ {
44
+ name: "clientId",
45
+ label: "OAuth client ID",
46
+ placeholder: "Client ID",
47
+ required: true
48
+ },
49
+ {
50
+ name: "clientSecret",
51
+ label: "OAuth client secret",
52
+ inputType: "password",
53
+ placeholder: "Client secret",
54
+ required: true
55
+ },
56
+ {
57
+ name: "redirectUrl",
58
+ label: "Redirect URL",
59
+ inputType: "url",
60
+ placeholder: "Registered OAuth callback URL"
61
+ },
62
+ {
63
+ name: "scope",
64
+ label: "Scope",
65
+ placeholder: "Space-separated scopes"
66
+ }
67
+ ]
68
+ },
69
+ none: {
70
+ type: "none",
71
+ label: "No auth",
72
+ fields: []
73
+ }
74
+ };
75
+ function getMcpServerIconSrc(server) {
76
+ if (typeof server.icon === "string") return server.icon;
77
+ if (server.icon?.src) return server.icon.src;
78
+ return inferMcpServerFaviconUrl(server.url);
79
+ }
80
+ function inferMcpServerFaviconUrl(url) {
81
+ try {
82
+ const parsed = new URL(url);
83
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return void 0;
84
+ return new URL("/favicon.ico", parsed).href;
85
+ } catch {
86
+ return;
87
+ }
88
+ }
4
89
  /** Remote MCP servers whose OAuth metadata exposes a registration_endpoint. */
5
90
  const DCR_MCP_SERVER_CARDS = [
6
91
  {
@@ -270,6 +355,7 @@ const MANUAL_MCP_SERVER_CARDS = [
270
355
  category: MANUAL_CATEGORY,
271
356
  icon: "https://cdn.simpleicons.org/asana/F06A6A",
272
357
  manualSetup: {
358
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClientSecret,
273
359
  description: "Create an Asana MCP app, configure its redirect URL and workspace distribution, then connect with the app client ID and secret.",
274
360
  links: [
275
361
  {
@@ -295,6 +381,7 @@ const MANUAL_MCP_SERVER_CARDS = [
295
381
  category: MANUAL_CATEGORY,
296
382
  icon: "https://cdn.simpleicons.org/gmail/EA4335",
297
383
  manualSetup: {
384
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
298
385
  description: "Enable Gmail and Gmail MCP APIs, configure OAuth consent, add Gmail read/compose scopes, and create a web OAuth client.",
299
386
  links: [
300
387
  {
@@ -324,6 +411,7 @@ const MANUAL_MCP_SERVER_CARDS = [
324
411
  category: MANUAL_CATEGORY,
325
412
  icon: "https://cdn.simpleicons.org/googlecalendar/4285F4",
326
413
  manualSetup: {
414
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
327
415
  description: "Enable Calendar and Calendar MCP APIs, configure OAuth consent, add calendar read/freebusy scopes, and create a web OAuth client.",
328
416
  links: [
329
417
  {
@@ -353,6 +441,7 @@ const MANUAL_MCP_SERVER_CARDS = [
353
441
  category: MANUAL_CATEGORY,
354
442
  icon: "https://cdn.simpleicons.org/googlechat/00AC47",
355
443
  manualSetup: {
444
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
356
445
  description: "Enable Chat and Chat MCP APIs, configure a Chat app, add Chat read/send scopes, and create a web OAuth client.",
357
446
  links: [
358
447
  {
@@ -382,6 +471,7 @@ const MANUAL_MCP_SERVER_CARDS = [
382
471
  category: MANUAL_CATEGORY,
383
472
  icon: "https://cdn.simpleicons.org/googledrive/4285F4",
384
473
  manualSetup: {
474
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
385
475
  description: "Enable Drive and Drive MCP APIs, configure OAuth consent, add Drive read/file scopes, and create a web OAuth client.",
386
476
  links: [
387
477
  {
@@ -411,6 +501,7 @@ const MANUAL_MCP_SERVER_CARDS = [
411
501
  category: MANUAL_CATEGORY,
412
502
  icon: "https://cdn.simpleicons.org/google/4285F4",
413
503
  manualSetup: {
504
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
414
505
  description: "Enable People API, configure OAuth consent, add contacts/profile/directory scopes, and create a web OAuth client.",
415
506
  links: [
416
507
  {
@@ -440,6 +531,7 @@ const MANUAL_MCP_SERVER_CARDS = [
440
531
  category: MANUAL_CATEGORY,
441
532
  icon: "https://cdn.simpleicons.org/google/4285F4",
442
533
  manualSetup: {
534
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
443
535
  description: "Enable the Workspace MCP service plus Gmail, Drive, Calendar, and Chat APIs, then configure OAuth consent and readonly search scopes.",
444
536
  links: [
445
537
  {
@@ -461,6 +553,44 @@ const MANUAL_MCP_SERVER_CARDS = [
461
553
  ]
462
554
  }
463
555
  },
556
+ {
557
+ id: "posthog",
558
+ name: "PostHog",
559
+ url: "https://mcp.posthog.com/mcp",
560
+ description: "Analyze product analytics and feature flags",
561
+ category: MANUAL_CATEGORY,
562
+ icon: "https://cdn.simpleicons.org/posthog/000000",
563
+ manualSetup: {
564
+ auth: MCP_SERVER_SETUP_AUTH.bearer,
565
+ description: "Create a PostHog personal API key with the MCP Server preset, then connect with that key as a bearer token.",
566
+ links: [{
567
+ label: "MCP docs",
568
+ url: "https://posthog.com/docs/model-context-protocol"
569
+ }, {
570
+ label: "API keys",
571
+ url: "https://app.posthog.com/settings/user-api-keys"
572
+ }]
573
+ }
574
+ },
575
+ {
576
+ id: "firecrawl",
577
+ name: "Firecrawl",
578
+ url: "https://mcp.firecrawl.dev/v2/mcp",
579
+ description: "Search, crawl, scrape, and extract web data",
580
+ category: MANUAL_CATEGORY,
581
+ icon: "https://www.firecrawl.dev/favicon.ico",
582
+ manualSetup: {
583
+ auth: MCP_SERVER_SETUP_AUTH.bearer,
584
+ description: "Create a Firecrawl API key, then connect the hosted MCP endpoint with Authorization: Bearer.",
585
+ links: [{
586
+ label: "MCP server",
587
+ url: "https://github.com/firecrawl/firecrawl-mcp-server"
588
+ }, {
589
+ label: "API auth",
590
+ url: "https://docs.firecrawl.dev/api-reference/introduction"
591
+ }]
592
+ }
593
+ },
464
594
  {
465
595
  id: "hubspot",
466
596
  name: "HubSpot",
@@ -469,6 +599,7 @@ const MANUAL_MCP_SERVER_CARDS = [
469
599
  category: MANUAL_CATEGORY,
470
600
  icon: "https://cdn.simpleicons.org/hubspot/FF7A59",
471
601
  manualSetup: {
602
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClientSecret,
472
603
  description: "Create a HubSpot MCP Auth App, configure the redirect URL, and connect with OAuth credentials from a PKCE-capable client.",
473
604
  links: [{
474
605
  label: "Setup guide",
@@ -487,6 +618,7 @@ const MANUAL_MCP_SERVER_CARDS = [
487
618
  category: MANUAL_CATEGORY,
488
619
  icon: "https://www.microsoft.com/favicon.ico",
489
620
  manualSetup: {
621
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
490
622
  description: "Provision the preview tenant resource, register the client, grant delegated MCP permissions, and connect with Microsoft Entra OAuth.",
491
623
  links: [{
492
624
  label: "Overview",
@@ -505,6 +637,7 @@ const MANUAL_MCP_SERVER_CARDS = [
505
637
  category: MANUAL_CATEGORY,
506
638
  icon: "https://www.microsoft.com/favicon.ico",
507
639
  manualSetup: {
640
+ auth: MCP_SERVER_SETUP_AUTH.none,
508
641
  description: "No OAuth is required; add the Streamable HTTP endpoint directly to the MCP client.",
509
642
  links: [{
510
643
  label: "Setup guide",
@@ -520,6 +653,7 @@ const MANUAL_MCP_SERVER_CARDS = [
520
653
  category: MANUAL_CATEGORY,
521
654
  icon: "https://www.salesforce.com/favicon.ico",
522
655
  manualSetup: {
656
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClient,
523
657
  description: "Create a Salesforce External Client App with mcp_api and refresh_token scopes, require PKCE, activate the hosted server, and connect with the consumer key.",
524
658
  links: [
525
659
  {
@@ -545,6 +679,7 @@ const MANUAL_MCP_SERVER_CARDS = [
545
679
  category: MANUAL_CATEGORY,
546
680
  icon: "https://slack.com/favicon.ico",
547
681
  manualSetup: {
682
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClientSecret,
548
683
  description: "Create or reuse a Slack app, enable MCP access, add user scopes and redirect URLs, then connect with the app client ID and secret.",
549
684
  links: [
550
685
  {
@@ -570,6 +705,7 @@ const MANUAL_MCP_SERVER_CARDS = [
570
705
  category: MANUAL_CATEGORY,
571
706
  icon: "https://cdn.simpleicons.org/zoom/0B5CFF",
572
707
  manualSetup: {
708
+ auth: MCP_SERVER_SETUP_AUTH.manualOAuthClientSecret,
573
709
  description: "Create a Zoom Marketplace General app, add the MCP product scopes, configure the client redirect URL, and connect with OAuth credentials.",
574
710
  links: [
575
711
  {
@@ -589,4 +725,4 @@ const MANUAL_MCP_SERVER_CARDS = [
589
725
  }
590
726
  ];
591
727
  //#endregion
592
- export { DCR_MCP_SERVER_CARDS, MANUAL_MCP_SERVER_CARDS };
728
+ export { DCR_MCP_SERVER_CARDS, MANUAL_MCP_SERVER_CARDS, MCP_SERVER_SETUP_AUTH, getMcpServerIconSrc, inferMcpServerFaviconUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
5
5
  "homepage": "https://design-system.sigvelo.com",
6
6
  "bugs": {
@@ -42,6 +42,7 @@
42
42
  "@base-ui/react": "~1.6.0",
43
43
  "@cloudflare/codemode": "^0.4.2",
44
44
  "@rrweb/replay": "^2.1.0",
45
+ "@shadcn/react": "^0.2.0",
45
46
  "@streamdown/cjk": "^1.0.3",
46
47
  "@streamdown/code": "^1.1.1",
47
48
  "@streamdown/math": "^1.0.2",
@@ -49,7 +50,7 @@
49
50
  "anser": "^2.3.5",
50
51
  "shiki": "^3.23.0",
51
52
  "streamdown": "^2.5.0",
52
- "@mcp-b/design-tokens": "0.6.4"
53
+ "@mcp-b/design-tokens": "0.7.0"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@ai-sdk/react": "^3.0.194",