@trops/dash-core 0.1.176 → 0.1.178

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
@@ -1243,8 +1243,9 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
1243
1243
  credentials = providerData.credentials,
1244
1244
  providerClass = providerData.providerClass,
1245
1245
  mcpConfig = providerData.mcpConfig,
1246
- allowedTools = providerData.allowedTools;
1247
- this.api.providers.saveProvider(appId, providerName, providerType, credentials, providerClass, mcpConfig, allowedTools).then(function (result) {
1246
+ allowedTools = providerData.allowedTools,
1247
+ wsConfig = providerData.wsConfig;
1248
+ this.api.providers.saveProvider(appId, providerName, providerType, credentials, providerClass, mcpConfig, allowedTools, wsConfig).then(function (result) {
1248
1249
  onSuccess(_this14.events.PROVIDER_SAVE_COMPLETE, result);
1249
1250
  })["catch"](function (error) {
1250
1251
  onError(_this14.events.PROVIDER_SAVE_ERROR, error);
@@ -28085,6 +28086,233 @@ var useWebSocketProvider = function useWebSocketProvider(providerType) {
28085
28086
  };
28086
28087
  };
28087
28088
 
28089
+ /**
28090
+ * useMcpDashServer
28091
+ *
28092
+ * React hook for controlling and monitoring the hosted MCP Dash server.
28093
+ * Accesses window.mainApi.mcpDashServer for IPC calls to the main process.
28094
+ *
28095
+ * Returns server status, control functions (start/stop/restart), token, and port.
28096
+ * Polls status every 3 seconds while mounted.
28097
+ */
28098
+ function useMcpDashServer() {
28099
+ var _window$mainApi;
28100
+ var _useState = React.useState({
28101
+ running: false,
28102
+ enabled: false,
28103
+ port: 3141,
28104
+ connectionCount: 0,
28105
+ uptime: 0,
28106
+ toolCount: 0,
28107
+ resourceCount: 0
28108
+ }),
28109
+ _useState2 = _slicedToArray(_useState, 2),
28110
+ status = _useState2[0],
28111
+ setStatus = _useState2[1];
28112
+ var _useState3 = React.useState(null),
28113
+ _useState4 = _slicedToArray(_useState3, 2),
28114
+ token = _useState4[0],
28115
+ setToken = _useState4[1];
28116
+ var _useState5 = React.useState(true),
28117
+ _useState6 = _slicedToArray(_useState5, 2),
28118
+ loading = _useState6[0],
28119
+ setLoading = _useState6[1];
28120
+ var _useState7 = React.useState(null),
28121
+ _useState8 = _slicedToArray(_useState7, 2),
28122
+ error = _useState8[0],
28123
+ setError = _useState8[1];
28124
+ var pollRef = React.useRef(null);
28125
+ var api = (_window$mainApi = window.mainApi) === null || _window$mainApi === void 0 ? void 0 : _window$mainApi.mcpDashServer;
28126
+ var fetchStatus = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
28127
+ var result, _t;
28128
+ return _regeneratorRuntime.wrap(function (_context) {
28129
+ while (1) switch (_context.prev = _context.next) {
28130
+ case 0:
28131
+ if (api) {
28132
+ _context.next = 1;
28133
+ break;
28134
+ }
28135
+ return _context.abrupt("return");
28136
+ case 1:
28137
+ _context.prev = 1;
28138
+ _context.next = 2;
28139
+ return api.getStatus();
28140
+ case 2:
28141
+ result = _context.sent;
28142
+ setStatus(result);
28143
+ setError(null);
28144
+ _context.next = 4;
28145
+ break;
28146
+ case 3:
28147
+ _context.prev = 3;
28148
+ _t = _context["catch"](1);
28149
+ setError(_t.message || "Failed to get server status");
28150
+ case 4:
28151
+ case "end":
28152
+ return _context.stop();
28153
+ }
28154
+ }, _callee, null, [[1, 3]]);
28155
+ })), [api]);
28156
+ var fetchToken = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
28157
+ var t;
28158
+ return _regeneratorRuntime.wrap(function (_context2) {
28159
+ while (1) switch (_context2.prev = _context2.next) {
28160
+ case 0:
28161
+ if (api) {
28162
+ _context2.next = 1;
28163
+ break;
28164
+ }
28165
+ return _context2.abrupt("return");
28166
+ case 1:
28167
+ _context2.prev = 1;
28168
+ _context2.next = 2;
28169
+ return api.getToken();
28170
+ case 2:
28171
+ t = _context2.sent;
28172
+ setToken(t);
28173
+ _context2.next = 4;
28174
+ break;
28175
+ case 3:
28176
+ _context2.prev = 3;
28177
+ _context2["catch"](1);
28178
+ case 4:
28179
+ case "end":
28180
+ return _context2.stop();
28181
+ }
28182
+ }, _callee2, null, [[1, 3]]);
28183
+ })), [api]);
28184
+
28185
+ // Initial load
28186
+ React.useEffect(function () {
28187
+ if (!api) {
28188
+ setLoading(false);
28189
+ return;
28190
+ }
28191
+ Promise.all([fetchStatus(), fetchToken()]).then(function () {
28192
+ return setLoading(false);
28193
+ });
28194
+ }, [api, fetchStatus, fetchToken]);
28195
+
28196
+ // Poll status every 3 seconds
28197
+ React.useEffect(function () {
28198
+ if (!api) return;
28199
+ pollRef.current = setInterval(fetchStatus, 3000);
28200
+ return function () {
28201
+ return clearInterval(pollRef.current);
28202
+ };
28203
+ }, [api, fetchStatus]);
28204
+ var startServer = React.useCallback(/*#__PURE__*/function () {
28205
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(port) {
28206
+ var result, _t3;
28207
+ return _regeneratorRuntime.wrap(function (_context3) {
28208
+ while (1) switch (_context3.prev = _context3.next) {
28209
+ case 0:
28210
+ if (api) {
28211
+ _context3.next = 1;
28212
+ break;
28213
+ }
28214
+ return _context3.abrupt("return");
28215
+ case 1:
28216
+ setError(null);
28217
+ _context3.prev = 2;
28218
+ _context3.next = 3;
28219
+ return api.startServer(port);
28220
+ case 3:
28221
+ result = _context3.sent;
28222
+ if (!result.success) {
28223
+ setError(result.error || "Failed to start server");
28224
+ }
28225
+ _context3.next = 4;
28226
+ return fetchStatus();
28227
+ case 4:
28228
+ return _context3.abrupt("return", result);
28229
+ case 5:
28230
+ _context3.prev = 5;
28231
+ _t3 = _context3["catch"](2);
28232
+ setError(_t3.message || "Failed to start server");
28233
+ case 6:
28234
+ case "end":
28235
+ return _context3.stop();
28236
+ }
28237
+ }, _callee3, null, [[2, 5]]);
28238
+ }));
28239
+ return function (_x) {
28240
+ return _ref3.apply(this, arguments);
28241
+ };
28242
+ }(), [api, fetchStatus]);
28243
+ var stopServer = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
28244
+ var result, _t4;
28245
+ return _regeneratorRuntime.wrap(function (_context4) {
28246
+ while (1) switch (_context4.prev = _context4.next) {
28247
+ case 0:
28248
+ if (api) {
28249
+ _context4.next = 1;
28250
+ break;
28251
+ }
28252
+ return _context4.abrupt("return");
28253
+ case 1:
28254
+ setError(null);
28255
+ _context4.prev = 2;
28256
+ _context4.next = 3;
28257
+ return api.stopServer();
28258
+ case 3:
28259
+ result = _context4.sent;
28260
+ if (!result.success) {
28261
+ setError(result.error || "Failed to stop server");
28262
+ }
28263
+ _context4.next = 4;
28264
+ return fetchStatus();
28265
+ case 4:
28266
+ return _context4.abrupt("return", result);
28267
+ case 5:
28268
+ _context4.prev = 5;
28269
+ _t4 = _context4["catch"](2);
28270
+ setError(_t4.message || "Failed to stop server");
28271
+ case 6:
28272
+ case "end":
28273
+ return _context4.stop();
28274
+ }
28275
+ }, _callee4, null, [[2, 5]]);
28276
+ })), [api, fetchStatus]);
28277
+ var restartServer = React.useCallback(/*#__PURE__*/function () {
28278
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(port) {
28279
+ return _regeneratorRuntime.wrap(function (_context5) {
28280
+ while (1) switch (_context5.prev = _context5.next) {
28281
+ case 0:
28282
+ _context5.next = 1;
28283
+ return stopServer();
28284
+ case 1:
28285
+ return _context5.abrupt("return", startServer(port));
28286
+ case 2:
28287
+ case "end":
28288
+ return _context5.stop();
28289
+ }
28290
+ }, _callee5);
28291
+ }));
28292
+ return function (_x2) {
28293
+ return _ref5.apply(this, arguments);
28294
+ };
28295
+ }(), [stopServer, startServer]);
28296
+ return {
28297
+ // Status
28298
+ running: status.running,
28299
+ enabled: status.enabled,
28300
+ port: status.port,
28301
+ connectionCount: status.connectionCount,
28302
+ uptime: status.uptime,
28303
+ toolCount: status.toolCount,
28304
+ resourceCount: status.resourceCount,
28305
+ token: token,
28306
+ loading: loading,
28307
+ error: error,
28308
+ // Actions
28309
+ startServer: startServer,
28310
+ stopServer: stopServer,
28311
+ restartServer: restartServer,
28312
+ refreshStatus: fetchStatus
28313
+ };
28314
+ }
28315
+
28088
28316
  function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28089
28317
  function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28090
28318
  var PreviewComponentsPane = function PreviewComponentsPane(_ref) {
@@ -43264,6 +43492,276 @@ function flattenLayout(layout) {
43264
43492
  return items;
43265
43493
  }
43266
43494
 
43495
+ var McpServerSection = function McpServerSection() {
43496
+ var _useMcpDashServer = useMcpDashServer(),
43497
+ running = _useMcpDashServer.running,
43498
+ port = _useMcpDashServer.port,
43499
+ connectionCount = _useMcpDashServer.connectionCount,
43500
+ uptime = _useMcpDashServer.uptime,
43501
+ toolCount = _useMcpDashServer.toolCount,
43502
+ resourceCount = _useMcpDashServer.resourceCount,
43503
+ token = _useMcpDashServer.token,
43504
+ loading = _useMcpDashServer.loading,
43505
+ error = _useMcpDashServer.error,
43506
+ startServer = _useMcpDashServer.startServer,
43507
+ stopServer = _useMcpDashServer.stopServer,
43508
+ restartServer = _useMcpDashServer.restartServer;
43509
+ var _useState = React.useState(null),
43510
+ _useState2 = _slicedToArray(_useState, 2),
43511
+ portInput = _useState2[0],
43512
+ setPortInput = _useState2[1];
43513
+ var _useState3 = React.useState(false),
43514
+ _useState4 = _slicedToArray(_useState3, 2),
43515
+ tokenCopied = _useState4[0],
43516
+ setTokenCopied = _useState4[1];
43517
+
43518
+ // Use live port from server, but allow local override while editing
43519
+ var displayPort = portInput !== null ? portInput : port || 3141;
43520
+ var handleToggle = React.useCallback(/*#__PURE__*/function () {
43521
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(enabled) {
43522
+ return _regeneratorRuntime.wrap(function (_context) {
43523
+ while (1) switch (_context.prev = _context.next) {
43524
+ case 0:
43525
+ if (!enabled) {
43526
+ _context.next = 2;
43527
+ break;
43528
+ }
43529
+ _context.next = 1;
43530
+ return startServer(displayPort);
43531
+ case 1:
43532
+ _context.next = 3;
43533
+ break;
43534
+ case 2:
43535
+ _context.next = 3;
43536
+ return stopServer();
43537
+ case 3:
43538
+ case "end":
43539
+ return _context.stop();
43540
+ }
43541
+ }, _callee);
43542
+ }));
43543
+ return function (_x) {
43544
+ return _ref.apply(this, arguments);
43545
+ };
43546
+ }(), [startServer, stopServer, displayPort]);
43547
+ var handlePortChange = React.useCallback(function (e) {
43548
+ var val = e.target.value.replace(/\D/g, "");
43549
+ setPortInput(val ? parseInt(val, 10) : "");
43550
+ }, []);
43551
+ var handlePortBlur = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
43552
+ return _regeneratorRuntime.wrap(function (_context2) {
43553
+ while (1) switch (_context2.prev = _context2.next) {
43554
+ case 0:
43555
+ if (!(portInput !== null && portInput !== "" && portInput !== port && running)) {
43556
+ _context2.next = 1;
43557
+ break;
43558
+ }
43559
+ _context2.next = 1;
43560
+ return restartServer(portInput);
43561
+ case 1:
43562
+ setPortInput(null);
43563
+ case 2:
43564
+ case "end":
43565
+ return _context2.stop();
43566
+ }
43567
+ }, _callee2);
43568
+ })), [portInput, port, running, restartServer]);
43569
+ var handlePortKeyDown = React.useCallback(function (e) {
43570
+ if (e.key === "Enter") {
43571
+ e.target.blur();
43572
+ }
43573
+ }, []);
43574
+ var handleCopyToken = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
43575
+ return _regeneratorRuntime.wrap(function (_context3) {
43576
+ while (1) switch (_context3.prev = _context3.next) {
43577
+ case 0:
43578
+ if (token) {
43579
+ _context3.next = 1;
43580
+ break;
43581
+ }
43582
+ return _context3.abrupt("return");
43583
+ case 1:
43584
+ _context3.prev = 1;
43585
+ _context3.next = 2;
43586
+ return navigator.clipboard.writeText(token);
43587
+ case 2:
43588
+ setTokenCopied(true);
43589
+ setTimeout(function () {
43590
+ return setTokenCopied(false);
43591
+ }, 2000);
43592
+ _context3.next = 4;
43593
+ break;
43594
+ case 3:
43595
+ _context3.prev = 3;
43596
+ _context3["catch"](1);
43597
+ case 4:
43598
+ case "end":
43599
+ return _context3.stop();
43600
+ }
43601
+ }, _callee3, null, [[1, 3]]);
43602
+ })), [token]);
43603
+ var formatUptime = function formatUptime(seconds) {
43604
+ if (!seconds || seconds < 1) return "—";
43605
+ var h = Math.floor(seconds / 3600);
43606
+ var m = Math.floor(seconds % 3600 / 60);
43607
+ var s = Math.floor(seconds % 60);
43608
+ if (h > 0) return "".concat(h, "h ").concat(m, "m");
43609
+ if (m > 0) return "".concat(m, "m ").concat(s, "s");
43610
+ return "".concat(s, "s");
43611
+ };
43612
+ var statusColor = running ? "bg-green-500" : error ? "bg-red-500" : "bg-gray-500";
43613
+ var statusLabel = running ? "Running" : error ? "Error" : "Stopped";
43614
+ if (loading) {
43615
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
43616
+ className: "flex items-center justify-center py-12 opacity-50",
43617
+ children: /*#__PURE__*/jsxRuntime.jsx("span", {
43618
+ className: "text-sm",
43619
+ children: "Loading MCP Server settings\u2026"
43620
+ })
43621
+ });
43622
+ }
43623
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
43624
+ className: "flex flex-col space-y-6",
43625
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
43626
+ className: "flex flex-col space-y-3",
43627
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43628
+ title: "MCP Server",
43629
+ padding: false
43630
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43631
+ className: "flex flex-row items-center justify-between py-3",
43632
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
43633
+ className: "flex flex-col",
43634
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
43635
+ className: "text-sm font-medium",
43636
+ children: "Enable MCP Server"
43637
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
43638
+ className: "text-xs opacity-50",
43639
+ children: "Expose dashboards, widgets, and themes to external LLM clients via MCP protocol"
43640
+ })]
43641
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Switch, {
43642
+ checked: running,
43643
+ onChange: handleToggle
43644
+ })]
43645
+ })]
43646
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43647
+ className: "flex flex-col space-y-3",
43648
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43649
+ title: "Status",
43650
+ padding: false
43651
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43652
+ className: "flex flex-row items-center space-x-3 py-2",
43653
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
43654
+ className: "inline-block h-2.5 w-2.5 rounded-full ".concat(statusColor)
43655
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
43656
+ className: "text-sm font-medium",
43657
+ children: statusLabel
43658
+ }), running && /*#__PURE__*/jsxRuntime.jsxs("span", {
43659
+ className: "text-xs opacity-50",
43660
+ children: ["on port ", port]
43661
+ })]
43662
+ }), error && /*#__PURE__*/jsxRuntime.jsx("div", {
43663
+ className: "text-xs text-red-400 bg-red-500/10 rounded px-3 py-2",
43664
+ children: error
43665
+ })]
43666
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43667
+ className: "flex flex-col space-y-3",
43668
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43669
+ title: "Configuration",
43670
+ padding: false
43671
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43672
+ className: "flex flex-row items-center justify-between py-3",
43673
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
43674
+ className: "flex flex-col",
43675
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
43676
+ className: "text-sm font-medium",
43677
+ children: "Port"
43678
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
43679
+ className: "text-xs opacity-50",
43680
+ children: running ? "Changes take effect on restart" : "Port the server listens on"
43681
+ })]
43682
+ }), /*#__PURE__*/jsxRuntime.jsx("input", {
43683
+ type: "text",
43684
+ inputMode: "numeric",
43685
+ value: displayPort,
43686
+ onChange: handlePortChange,
43687
+ onBlur: handlePortBlur,
43688
+ onKeyDown: handlePortKeyDown,
43689
+ className: "w-24 text-right text-sm bg-white/5 border border-white/10 rounded px-3 py-1.5 focus:outline-none focus:ring-1 focus:ring-white/30"
43690
+ })]
43691
+ })]
43692
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43693
+ className: "flex flex-col space-y-3",
43694
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43695
+ title: "Authentication",
43696
+ padding: false
43697
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
43698
+ className: "flex flex-col space-y-2 py-3",
43699
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
43700
+ className: "flex flex-row items-center justify-between",
43701
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
43702
+ className: "flex flex-col",
43703
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
43704
+ className: "text-sm font-medium",
43705
+ children: "Bearer Token"
43706
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
43707
+ className: "text-xs opacity-50",
43708
+ children: "Required for client authentication"
43709
+ })]
43710
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
43711
+ title: tokenCopied ? "Copied!" : "Copy",
43712
+ onClick: handleCopyToken
43713
+ })]
43714
+ }), token && /*#__PURE__*/jsxRuntime.jsx("div", {
43715
+ className: "font-mono text-xs bg-black/20 rounded px-3 py-2 break-all select-all opacity-70",
43716
+ children: token
43717
+ })]
43718
+ })]
43719
+ }), running && /*#__PURE__*/jsxRuntime.jsxs("div", {
43720
+ className: "flex flex-col space-y-3",
43721
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43722
+ title: "Server Info",
43723
+ padding: false
43724
+ }), /*#__PURE__*/jsxRuntime.jsxs(DashReact.DataList, {
43725
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.DataList.Item, {
43726
+ label: "Connections",
43727
+ value: String(connectionCount)
43728
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.DataList.Item, {
43729
+ label: "Tools",
43730
+ value: String(toolCount)
43731
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.DataList.Item, {
43732
+ label: "Resources",
43733
+ value: String(resourceCount)
43734
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.DataList.Item, {
43735
+ label: "Uptime",
43736
+ value: formatUptime(uptime),
43737
+ divider: false
43738
+ })]
43739
+ })]
43740
+ }), running && token && /*#__PURE__*/jsxRuntime.jsxs("div", {
43741
+ className: "flex flex-col space-y-3",
43742
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
43743
+ title: "Client Configuration",
43744
+ padding: false
43745
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
43746
+ className: "text-xs opacity-50",
43747
+ children: "Add to your MCP client config (e.g. Claude Desktop):"
43748
+ }), /*#__PURE__*/jsxRuntime.jsx("pre", {
43749
+ className: "text-xs bg-black/20 rounded p-3 overflow-auto max-h-40 select-all",
43750
+ children: JSON.stringify({
43751
+ mcpServers: {
43752
+ dash: {
43753
+ url: "http://127.0.0.1:".concat(port, "/mcp"),
43754
+ headers: {
43755
+ Authorization: "Bearer ".concat(token)
43756
+ }
43757
+ }
43758
+ }
43759
+ }, null, 2)
43760
+ })]
43761
+ })]
43762
+ });
43763
+ };
43764
+
43267
43765
  var SECTIONS = [{
43268
43766
  key: "general",
43269
43767
  label: "General",
@@ -43296,6 +43794,10 @@ var SECTIONS = [{
43296
43794
  key: "notifications",
43297
43795
  label: "Notifications",
43298
43796
  icon: "bell"
43797
+ }, {
43798
+ key: "mcp-server",
43799
+ label: "MCP Server",
43800
+ icon: "server"
43299
43801
  }];
43300
43802
  var AppSettingsModal = function AppSettingsModal(_ref) {
43301
43803
  var isOpen = _ref.isOpen,
@@ -43465,6 +43967,9 @@ var AppSettingsModal = function AppSettingsModal(_ref) {
43465
43967
  children: /*#__PURE__*/jsxRuntime.jsx(GeneralSection, {})
43466
43968
  }), activeSection === "notifications" && /*#__PURE__*/jsxRuntime.jsx(NotificationsSection, {
43467
43969
  workspaces: workspaces
43970
+ }), activeSection === "mcp-server" && /*#__PURE__*/jsxRuntime.jsx("div", {
43971
+ className: "flex-1 overflow-y-auto p-6 ".concat(panelStyles.textColor || "text-gray-200"),
43972
+ children: /*#__PURE__*/jsxRuntime.jsx(McpServerSection, {})
43468
43973
  })]
43469
43974
  }), /*#__PURE__*/jsxRuntime.jsx(DashReact.SettingsModal.Footer, {
43470
43975
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -47736,6 +48241,7 @@ exports.traverseParentTree = traverseParentTree;
47736
48241
  exports.updateLayoutItem = updateLayoutItem;
47737
48242
  exports.updateParentForItem = updateParentForItem;
47738
48243
  exports.useDashboard = useDashboard;
48244
+ exports.useMcpDashServer = useMcpDashServer;
47739
48245
  exports.useMcpProvider = useMcpProvider;
47740
48246
  exports.useNotifications = useNotifications;
47741
48247
  exports.useProvider = useProvider;