@mcp-use/inspector 0.7.1-canary.2 → 0.7.1-canary.3

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.
@@ -1,11 +1,11 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/display-YIYC6WJE-kuKRtVk0.js","assets/index-jGfWX_CN.js","assets/index-C2qHJtN-.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/display-YIYC6WJE-Cn63UiXa.js","assets/index-Dxg-Tx_J.js","assets/index-CwF__a_n.css"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
6
- import { _ as __name, c as ZodIssueCode, u as unionType, a as anyType, d as booleanType, n as numberType, s as stringType, e as arrayType, o as objectType, f as nullType, Z as ZodFirstPartyTypeKind, h as custom, i as ZodType$1, l as literalType, j as undefinedType, k as functionType, p as promiseType, m as enumType, r as recordType, q as instanceOfType, t as logger, w as __vitePreload, v as v4$1 } from "./index-jGfWX_CN.js";
7
- import { B, x, H, L, y, M, W, z } from "./index-jGfWX_CN.js";
8
- import { u as rng, w as unsafeStringify, x as parse$1, y as $constructor, z as $ZodError, A as flattenError, B as formatError, C as _parse, D as _safeParse, E as _parseAsync, F as _safeParseAsync, G as _any, H as $ZodAny, I as $ZodType, d as clone, J as _overwrite, g as globalRegistry, K as _refine, L as normalizeParams, M as _array, N as $ZodCheck, O as issue, h as $ZodOptional, Q as $ZodNullable, R as $ZodNonOptional, S as $ZodUnion, U as $ZodIntersection, W as $ZodPipe, X as $ZodTransform, Y as $ZodDefault, Z as $ZodPrefault, a0 as $ZodCatch, a1 as $ZodReadonly, a2 as $ZodArray, a3 as _minLength, a4 as _maxLength, a5 as _length, a6 as $ZodCustom, a7 as camelCase, s as snakeCase, v as v4, P as PQueueMod, p as pRetry, a as v5, b as styles, c as parseAsync$1, i as parse$2, j as extend, f as partial, _ as _never, $ as $ZodNever, e as _unknown, k as $ZodUnknown, t as toJSONSchema, l as deepCompareStrict, V as Validator, m as dereference, n as validate$1, o as getEncodingNameForModel, T as Tiktoken, q as prettifyError, r as validate$2, a8 as $ZodRegistry } from "./chunk-VL2OQCWN-DVIxKKkz.js";
6
+ import { _ as __name, c as ZodIssueCode, u as unionType, a as anyType, d as booleanType, n as numberType, s as stringType, e as arrayType, o as objectType, f as nullType, Z as ZodFirstPartyTypeKind, h as custom, i as ZodType$1, l as literalType, j as undefinedType, k as functionType, p as promiseType, m as enumType, r as recordType, q as instanceOfType, t as logger, w as __vitePreload, v as v4$1 } from "./index-Dxg-Tx_J.js";
7
+ import { B, x, H, L, y, M, W, z } from "./index-Dxg-Tx_J.js";
8
+ import { u as rng, w as unsafeStringify, x as parse$1, y as $constructor, z as $ZodError, A as flattenError, B as formatError, C as _parse, D as _safeParse, E as _parseAsync, F as _safeParseAsync, G as _any, H as $ZodAny, I as $ZodType, d as clone, J as _overwrite, g as globalRegistry, K as _refine, L as normalizeParams, M as _array, N as $ZodCheck, O as issue, h as $ZodOptional, Q as $ZodNullable, R as $ZodNonOptional, S as $ZodUnion, U as $ZodIntersection, W as $ZodPipe, X as $ZodTransform, Y as $ZodDefault, Z as $ZodPrefault, a0 as $ZodCatch, a1 as $ZodReadonly, a2 as $ZodArray, a3 as _minLength, a4 as _maxLength, a5 as _length, a6 as $ZodCustom, a7 as camelCase, s as snakeCase, v as v4, P as PQueueMod, p as pRetry, a as v5, b as styles, c as parseAsync$1, i as parse$2, j as extend, f as partial, _ as _never, $ as $ZodNever, e as _unknown, k as $ZodUnknown, t as toJSONSchema, l as deepCompareStrict, V as Validator, m as dereference, n as validate$1, o as getEncodingNameForModel, T as Tiktoken, q as prettifyError, r as validate$2, a8 as $ZodRegistry } from "./chunk-VL2OQCWN-B3ULnk6R.js";
9
9
  import { o as os } from "./__vite-browser-external-CHS79mP1.js";
10
10
  import { j as join, d as dirname, i as isAbsolute } from "./path-QsnVvLoj.js";
11
11
  import "./index-DX0TIfSM.js";
@@ -37536,7 +37536,7 @@ var MCPAgent = (_p = class {
37536
37536
  */
37537
37537
  async *prettyStreamEvents(query, maxSteps, manageConnector = true, externalHistory, outputSchema) {
37538
37538
  const { prettyStreamEvents: prettyStream } = await __vitePreload(async () => {
37539
- const { prettyStreamEvents: prettyStream2 } = await import("./display-YIYC6WJE-kuKRtVk0.js");
37539
+ const { prettyStreamEvents: prettyStream2 } = await import("./display-YIYC6WJE-Cn63UiXa.js");
37540
37540
  return { prettyStreamEvents: prettyStream2 };
37541
37541
  }, true ? __vite__mapDeps([0,1,2]) : void 0);
37542
37542
  const finalResponse = "";
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./index-jGfWX_CN.js";
1
+ import { g as getDefaultExportFromCjs } from "./index-Dxg-Tx_J.js";
2
2
  import { r as requireBase64Js } from "./index-DX0TIfSM.js";
3
3
  var decamelize;
4
4
  var hasRequiredDecamelize;
@@ -1,4 +1,4 @@
1
- import { _ as __name } from "./index-jGfWX_CN.js";
1
+ import { _ as __name } from "./index-Dxg-Tx_J.js";
2
2
  var core;
3
3
  var hasRequiredCore;
4
4
  function requireCore() {
@@ -1,4 +1,4 @@
1
- import { _ as __export, A as AsyncCaller } from "./index-BQYvi9ex.js";
1
+ import { _ as __export, A as AsyncCaller } from "./index-XlJUZuAw.js";
2
2
  var chunk_array_exports = {};
3
3
  __export(chunk_array_exports, { chunkArray: () => chunkArray });
4
4
  const chunkArray = (arr, chunkSize) => arr.reduce((chunks, elem, index) => {
@@ -1,6 +1,6 @@
1
- import { B as BaseLLMOutputParser, O as OutputParserException, l as interopSafeParseAsync, p as parseBase64DataUrl, f as isAIMessage, H as HumanMessage, j as isDataContentBlock, k as convertToProviderContentBlock, c as AIMessageChunk, b as AIMessage, m as BaseChatModel, n as getEnvironmentVariable, h as isOpenAITool, g as isLangChainTool, t as toJsonSchema, i as isInteropZodSchema, C as ChatGenerationChunk, R as RunnablePassthrough, o as RunnableSequence } from "./index-BQYvi9ex.js";
2
- import "./chunk-VL2OQCWN-DVIxKKkz.js";
3
- import "./index-jGfWX_CN.js";
1
+ import { B as BaseLLMOutputParser, O as OutputParserException, l as interopSafeParseAsync, p as parseBase64DataUrl, f as isAIMessage, H as HumanMessage, j as isDataContentBlock, k as convertToProviderContentBlock, c as AIMessageChunk, b as AIMessage, m as BaseChatModel, n as getEnvironmentVariable, h as isOpenAITool, g as isLangChainTool, t as toJsonSchema, i as isInteropZodSchema, C as ChatGenerationChunk, R as RunnablePassthrough, o as RunnableSequence } from "./index-XlJUZuAw.js";
2
+ import "./chunk-VL2OQCWN-B3ULnk6R.js";
3
+ import "./index-Dxg-Tx_J.js";
4
4
  import "./index-DX0TIfSM.js";
5
5
  var AnthropicToolsOutputParser = class extends BaseLLMOutputParser {
6
6
  static lc_name() {
@@ -1,7 +1,7 @@
1
- import { i as isInteropZodSchema, t as toJsonSchema, a as isBaseMessage, b as AIMessage, C as ChatGenerationChunk, c as AIMessageChunk, d as ChatMessage, e as isToolMessage, f as isAIMessage, g as isLangChainTool, h as isOpenAITool, j as isDataContentBlock, k as convertToProviderContentBlock, p as parseBase64DataUrl, B as BaseLLMOutputParser, l as interopSafeParseAsync, O as OutputParserException, m as BaseChatModel, n as getEnvironmentVariable, J as JsonOutputParser, R as RunnablePassthrough, o as RunnableSequence } from "./index-BQYvi9ex.js";
2
- import { v as v4 } from "./index-jGfWX_CN.js";
3
- import "./embeddings-BAyPT62O.js";
4
- import "./chunk-VL2OQCWN-DVIxKKkz.js";
1
+ import { i as isInteropZodSchema, t as toJsonSchema, a as isBaseMessage, b as AIMessage, C as ChatGenerationChunk, c as AIMessageChunk, d as ChatMessage, e as isToolMessage, f as isAIMessage, g as isLangChainTool, h as isOpenAITool, j as isDataContentBlock, k as convertToProviderContentBlock, p as parseBase64DataUrl, B as BaseLLMOutputParser, l as interopSafeParseAsync, O as OutputParserException, m as BaseChatModel, n as getEnvironmentVariable, J as JsonOutputParser, R as RunnablePassthrough, o as RunnableSequence } from "./index-XlJUZuAw.js";
2
+ import { v as v4 } from "./index-Dxg-Tx_J.js";
3
+ import "./embeddings-CJvY7vou.js";
4
+ import "./chunk-VL2OQCWN-B3ULnk6R.js";
5
5
  import "./index-DX0TIfSM.js";
6
6
  function removeAdditionalProperties(obj) {
7
7
  if (typeof obj === "object" && obj !== null) {
@@ -4292,6 +4292,10 @@
4292
4292
  padding: calc(var(--spacing) * 4);
4293
4293
  }
4294
4294
 
4295
+ .sm\:p-5 {
4296
+ padding: calc(var(--spacing) * 5);
4297
+ }
4298
+
4295
4299
  .sm\:p-6 {
4296
4300
  padding: calc(var(--spacing) * 6);
4297
4301
  }
@@ -4320,6 +4324,10 @@
4320
4324
  padding-top: calc(var(--spacing) * 3);
4321
4325
  }
4322
4326
 
4327
+ .sm\:pt-4 {
4328
+ padding-top: calc(var(--spacing) * 4);
4329
+ }
4330
+
4323
4331
  .sm\:pt-\[100px\] {
4324
4332
  padding-top: 100px;
4325
4333
  }
@@ -4332,6 +4340,10 @@
4332
4340
  padding-right: calc(var(--spacing) * 3);
4333
4341
  }
4334
4342
 
4343
+ .sm\:pr-4 {
4344
+ padding-right: calc(var(--spacing) * 4);
4345
+ }
4346
+
4335
4347
  .sm\:pl-3 {
4336
4348
  padding-left: calc(var(--spacing) * 3);
4337
4349
  }
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-CHOg9Woa.js","assets/__vite-browser-external-CHS79mP1.js","assets/index-DX0TIfSM.js","assets/path-QsnVvLoj.js","assets/index-CPrsUZvp.js","assets/index-BQYvi9ex.js","assets/chunk-VL2OQCWN-DVIxKKkz.js","assets/embeddings-BAyPT62O.js","assets/index-CL4rnBUJ.js","assets/index-DwBL9-ha.js","assets/browser-DizuWstJ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-Cc6cNATZ.js","assets/__vite-browser-external-CHS79mP1.js","assets/index-DX0TIfSM.js","assets/path-QsnVvLoj.js","assets/index-rDDSqQpx.js","assets/index-XlJUZuAw.js","assets/chunk-VL2OQCWN-B3ULnk6R.js","assets/embeddings-CJvY7vou.js","assets/index-B1eWsGek.js","assets/index-Ct8e-Us0.js","assets/browser-0QciJv93.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -211,7 +211,7 @@ function loadWinstonSync() {
211
211
  __name(loadWinstonSync, "loadWinstonSync");
212
212
  async function getWinston() {
213
213
  if (!winston) {
214
- winston = await __vitePreload(() => import("./winston-CHOg9Woa.js").then((n2) => n2.w), true ? __vite__mapDeps([0,1,2,3]) : void 0);
214
+ winston = await __vitePreload(() => import("./winston-Cc6cNATZ.js").then((n2) => n2.w), true ? __vite__mapDeps([0,1,2,3]) : void 0);
215
215
  }
216
216
  return winston;
217
217
  }
@@ -18223,7 +18223,7 @@ function useMcp(options) {
18223
18223
  sseReadTimeout
18224
18224
  ]);
18225
18225
  const callTool = reactExports.useCallback(
18226
- async (name, args) => {
18226
+ async (name, args, options2) => {
18227
18227
  if (stateRef.current !== "ready" || !clientRef.current) {
18228
18228
  throw new Error(
18229
18229
  `MCP client is not ready (current state: ${state}). Cannot call tool "${name}".`
@@ -18236,7 +18236,11 @@ function useMcp(options) {
18236
18236
  if (!session) {
18237
18237
  throw new Error("No active session found");
18238
18238
  }
18239
- const result = await session.connector.callTool(name, args || {});
18239
+ const result = await session.connector.callTool(
18240
+ name,
18241
+ args || {},
18242
+ options2
18243
+ );
18240
18244
  addLog("info", `Tool "${name}" call successful:`, result);
18241
18245
  return result;
18242
18246
  } catch (err) {
@@ -40669,7 +40673,7 @@ class MCPToolSavedEvent {
40669
40673
  function getPackageVersion() {
40670
40674
  try {
40671
40675
  if (true) {
40672
- return "0.7.1-canary.2";
40676
+ return "0.7.1-canary.3";
40673
40677
  }
40674
40678
  return "0.0.0";
40675
40679
  } catch {
@@ -40915,6 +40919,7 @@ function McpConnectionWrapper({
40915
40919
  name,
40916
40920
  proxyConfig,
40917
40921
  transportType,
40922
+ connectionId,
40918
40923
  onUpdate,
40919
40924
  onRemove: _onRemove
40920
40925
  }) {
@@ -40950,7 +40955,7 @@ function McpConnectionWrapper({
40950
40955
  return void 0;
40951
40956
  }
40952
40957
  return (transport, serverIdFromConnector) => {
40953
- const actualServerId = url;
40958
+ const actualServerId = connectionId;
40954
40959
  console.log(
40955
40960
  "[McpContext] Applying transport wrapper, serverId:",
40956
40961
  actualServerId,
@@ -40959,8 +40964,8 @@ function McpConnectionWrapper({
40959
40964
  );
40960
40965
  return wrapTransportRef.current(transport, actualServerId);
40961
40966
  };
40962
- }, [wrapTransportReady, url]);
40963
- const NOTIFICATIONS_STORAGE_KEY = `mcp-inspector-notifications-${url}`;
40967
+ }, [wrapTransportReady, connectionId]);
40968
+ const NOTIFICATIONS_STORAGE_KEY = `mcp-inspector-notifications-${connectionId}`;
40964
40969
  const MAX_NOTIFICATIONS = 500;
40965
40970
  const [notifications, setNotifications] = reactExports.useState([]);
40966
40971
  reactExports.useEffect(() => {
@@ -41044,7 +41049,7 @@ function McpConnectionWrapper({
41044
41049
  }
41045
41050
  const unreadCount = notifications.filter((n2) => !n2.read).length;
41046
41051
  const connection = {
41047
- id: url,
41052
+ id: connectionId,
41048
41053
  url,
41049
41054
  name: mcpHook.serverInfo?.name || name,
41050
41055
  // Use server-provided name if available
@@ -41082,7 +41087,7 @@ function McpConnectionWrapper({
41082
41087
  } else {
41083
41088
  const unreadCount = notifications.filter((n2) => !n2.read).length;
41084
41089
  const connection = {
41085
- id: url,
41090
+ id: connectionId,
41086
41091
  url,
41087
41092
  name: mcpHook.serverInfo?.name || name,
41088
41093
  // Use server-provided name if available
@@ -41124,6 +41129,7 @@ function McpConnectionWrapper({
41124
41129
  proxyConfig,
41125
41130
  customHeaders,
41126
41131
  // Added to dependency array
41132
+ connectionId,
41127
41133
  mcpHook.state,
41128
41134
  mcpHook.tools,
41129
41135
  mcpHook.resources,
@@ -41226,7 +41232,52 @@ function McpProvider({ children }) {
41226
41232
  }, [autoConnect, configLoaded]);
41227
41233
  const addConnection = reactExports.useCallback(
41228
41234
  (url, name, proxyConfig, transportType) => {
41229
- if (connectionConfigs.some((c2) => c2.url === url)) {
41235
+ const existingConfig = connectionConfigs.find((c2) => c2.url === url);
41236
+ const existingConnection = connections.find((c2) => c2.url === url);
41237
+ if (existingConfig && existingConnection) {
41238
+ return;
41239
+ }
41240
+ if (existingConfig && !existingConnection) {
41241
+ setConnections((prev) => [
41242
+ ...prev,
41243
+ {
41244
+ id: existingConfig.id || url,
41245
+ url,
41246
+ name: existingConfig.name || name || "MCP Server",
41247
+ state: "connecting",
41248
+ tools: [],
41249
+ resources: [],
41250
+ prompts: [],
41251
+ error: null,
41252
+ authUrl: null,
41253
+ customHeaders: existingConfig.proxyConfig?.customHeaders || proxyConfig?.customHeaders,
41254
+ transportType: existingConfig.transportType || transportType,
41255
+ proxyConfig: existingConfig.proxyConfig || proxyConfig,
41256
+ notifications: [],
41257
+ unreadNotificationCount: 0,
41258
+ markNotificationRead: () => {
41259
+ },
41260
+ markAllNotificationsRead: () => {
41261
+ },
41262
+ clearNotifications: () => {
41263
+ },
41264
+ callTool: async () => {
41265
+ },
41266
+ readResource: async () => {
41267
+ },
41268
+ listPrompts: async () => {
41269
+ },
41270
+ getPrompt: async () => {
41271
+ },
41272
+ authenticate: () => {
41273
+ },
41274
+ retry: () => {
41275
+ },
41276
+ clearStorage: () => {
41277
+ },
41278
+ client: null
41279
+ }
41280
+ ]);
41230
41281
  return;
41231
41282
  }
41232
41283
  const newConfig = {
@@ -41278,7 +41329,7 @@ function McpProvider({ children }) {
41278
41329
  }
41279
41330
  ]);
41280
41331
  },
41281
- [connectionConfigs]
41332
+ [connectionConfigs, connections]
41282
41333
  );
41283
41334
  const removeConnection = reactExports.useCallback((id2) => {
41284
41335
  setConnectionConfigs((prev) => prev.filter((c2) => c2.id !== id2));
@@ -41355,7 +41406,8 @@ function McpProvider({ children }) {
41355
41406
  autoConnect,
41356
41407
  setAutoConnect,
41357
41408
  connectServer,
41358
- disconnectServer
41409
+ disconnectServer,
41410
+ configLoaded
41359
41411
  }),
41360
41412
  [
41361
41413
  connections,
@@ -41364,7 +41416,8 @@ function McpProvider({ children }) {
41364
41416
  updateConnectionConfig,
41365
41417
  autoConnect,
41366
41418
  connectServer,
41367
- disconnectServer
41419
+ disconnectServer,
41420
+ configLoaded
41368
41421
  ]
41369
41422
  );
41370
41423
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(McpContext.Provider, { value: contextValue, children: [
@@ -41376,6 +41429,7 @@ function McpProvider({ children }) {
41376
41429
  name: config.name,
41377
41430
  proxyConfig: config.proxyConfig,
41378
41431
  transportType: config.transportType,
41432
+ connectionId: config.id || config.url,
41379
41433
  onUpdate: handleConnectionUpdate,
41380
41434
  onRemove: () => removeConnection(config.id || config.url)
41381
41435
  },
@@ -53846,7 +53900,8 @@ function parseAutoConnectParam(param) {
53846
53900
  function useAutoConnect({
53847
53901
  connections,
53848
53902
  addConnection,
53849
- removeConnection
53903
+ removeConnection,
53904
+ configLoaded: contextConfigLoaded
53850
53905
  }) {
53851
53906
  const navigate = useNavigate();
53852
53907
  const [isAutoConnecting, setIsAutoConnecting] = reactExports.useState(false);
@@ -53876,20 +53931,42 @@ function useAutoConnect({
53876
53931
  },
53877
53932
  [addConnection]
53878
53933
  );
53934
+ const handleAutoConnectConfig = reactExports.useCallback(
53935
+ (config) => {
53936
+ const existing = connections.find((c2) => c2.url === config.url);
53937
+ if (existing) {
53938
+ if (existing.state === "ready") {
53939
+ console.warn(
53940
+ "[useAutoConnect] Connection already ready, navigating to server"
53941
+ );
53942
+ const urlParams2 = new URLSearchParams(window.location.search);
53943
+ const tunnelUrl = urlParams2.get("tunnelUrl");
53944
+ const newUrl = tunnelUrl ? `/?server=${encodeURIComponent(existing.id)}&tunnelUrl=${encodeURIComponent(tunnelUrl)}` : `/?server=${encodeURIComponent(existing.id)}`;
53945
+ navigate(newUrl);
53946
+ } else {
53947
+ console.warn(
53948
+ "[useAutoConnect] Connection exists, waiting for ready state"
53949
+ );
53950
+ setAutoConnectConfig(config);
53951
+ setIsAutoConnecting(true);
53952
+ }
53953
+ } else {
53954
+ setAutoConnectConfig(config);
53955
+ setHasTriedBothModes(false);
53956
+ setIsAutoConnecting(true);
53957
+ attemptConnection(config);
53958
+ }
53959
+ },
53960
+ [connections, navigate, attemptConnection]
53961
+ );
53879
53962
  reactExports.useEffect(() => {
53880
- if (configLoaded) return;
53963
+ if (configLoaded || !contextConfigLoaded) return;
53881
53964
  const urlParams2 = new URLSearchParams(window.location.search);
53882
53965
  const queryAutoConnectParam = urlParams2.get("autoConnect");
53883
53966
  if (queryAutoConnectParam) {
53884
53967
  const config = parseAutoConnectParam(queryAutoConnectParam);
53885
53968
  if (config) {
53886
- const existing = connections.find((c2) => c2.url === config.url);
53887
- if (!existing) {
53888
- setAutoConnectConfig(config);
53889
- setHasTriedBothModes(false);
53890
- setIsAutoConnecting(true);
53891
- attemptConnection(config);
53892
- }
53969
+ handleAutoConnectConfig(config);
53893
53970
  }
53894
53971
  setConfigLoaded(true);
53895
53972
  return;
@@ -53899,17 +53976,11 @@ function useAutoConnect({
53899
53976
  if (configData.autoConnectUrl) {
53900
53977
  const config = parseAutoConnectParam(configData.autoConnectUrl);
53901
53978
  if (config) {
53902
- const existing = connections.find((c2) => c2.url === config.url);
53903
- if (!existing) {
53904
- setAutoConnectConfig(config);
53905
- setHasTriedBothModes(false);
53906
- setIsAutoConnecting(true);
53907
- attemptConnection(config);
53908
- }
53979
+ handleAutoConnectConfig(config);
53909
53980
  }
53910
53981
  }
53911
53982
  }).catch(() => setConfigLoaded(true));
53912
- }, [configLoaded, connections, attemptConnection]);
53983
+ }, [configLoaded, contextConfigLoaded, handleAutoConnectConfig]);
53913
53984
  reactExports.useEffect(() => {
53914
53985
  if (!autoConnectConfig || !autoSwitch || retryScheduledRef.current) {
53915
53986
  return;
@@ -53988,6 +54059,19 @@ function useAutoConnect({
53988
54059
  }
53989
54060
  }
53990
54061
  }, [isAutoConnecting, connections, autoConnectConfig]);
54062
+ reactExports.useEffect(() => {
54063
+ if (!isAutoConnecting) return;
54064
+ const timeoutId = setTimeout(() => {
54065
+ if (isAutoConnecting) {
54066
+ console.warn(
54067
+ "[useAutoConnect] Auto-connect timeout - clearing loading state"
54068
+ );
54069
+ setIsAutoConnecting(false);
54070
+ setAutoConnectConfig(null);
54071
+ }
54072
+ }, 3e4);
54073
+ return () => clearTimeout(timeoutId);
54074
+ }, [isAutoConnecting]);
53991
54075
  return { isAutoConnecting, autoConnectUrl: autoConnectConfig?.url || null };
53992
54076
  }
53993
54077
  function useKeyboardShortcuts(handlers) {
@@ -83084,7 +83168,11 @@ function OpenAIComponentRendererBase({
83084
83168
  throw new Error("Server connection not available");
83085
83169
  }
83086
83170
  const { toolName: toolName2, params, requestId } = event.data;
83087
- const result = await server.callTool(toolName2, params || {});
83171
+ const result = await server.callTool(toolName2, params || {}, {
83172
+ timeout: 6e5,
83173
+ // 10 minutes
83174
+ resetTimeoutOnProgress: true
83175
+ });
83088
83176
  let formattedResult;
83089
83177
  if (result && typeof result === "object") {
83090
83178
  if (Array.isArray(result.contents)) {
@@ -86833,7 +86921,7 @@ function useChatMessagesClientSide({
86833
86921
  let llm;
86834
86922
  if (llmConfig.provider === "openai") {
86835
86923
  const { ChatOpenAI } = await __vitePreload(async () => {
86836
- const { ChatOpenAI: ChatOpenAI2 } = await import("./index-CPrsUZvp.js");
86924
+ const { ChatOpenAI: ChatOpenAI2 } = await import("./index-rDDSqQpx.js");
86837
86925
  return { ChatOpenAI: ChatOpenAI2 };
86838
86926
  }, true ? __vite__mapDeps([4,5,6,2,7]) : void 0);
86839
86927
  llm = new ChatOpenAI({
@@ -86842,7 +86930,7 @@ function useChatMessagesClientSide({
86842
86930
  });
86843
86931
  } else if (llmConfig.provider === "anthropic") {
86844
86932
  const { ChatAnthropic } = await __vitePreload(async () => {
86845
- const { ChatAnthropic: ChatAnthropic2 } = await import("./index-CL4rnBUJ.js");
86933
+ const { ChatAnthropic: ChatAnthropic2 } = await import("./index-B1eWsGek.js");
86846
86934
  return { ChatAnthropic: ChatAnthropic2 };
86847
86935
  }, true ? __vite__mapDeps([8,5,6,2]) : void 0);
86848
86936
  llm = new ChatAnthropic({
@@ -86851,7 +86939,7 @@ function useChatMessagesClientSide({
86851
86939
  });
86852
86940
  } else if (llmConfig.provider === "google") {
86853
86941
  const { ChatGoogleGenerativeAI } = await __vitePreload(async () => {
86854
- const { ChatGoogleGenerativeAI: ChatGoogleGenerativeAI2 } = await import("./index-DwBL9-ha.js");
86942
+ const { ChatGoogleGenerativeAI: ChatGoogleGenerativeAI2 } = await import("./index-Ct8e-Us0.js");
86855
86943
  return { ChatGoogleGenerativeAI: ChatGoogleGenerativeAI2 };
86856
86944
  }, true ? __vite__mapDeps([9,5,6,2,7]) : void 0);
86857
86945
  llm = new ChatGoogleGenerativeAI({
@@ -86870,7 +86958,7 @@ function useChatMessagesClientSide({
86870
86958
  }
86871
86959
  if (!agentRef.current || agentRef.current.llm !== llmRef.current.instance) {
86872
86960
  const { MCPAgent } = await __vitePreload(async () => {
86873
- const { MCPAgent: MCPAgent2 } = await import("./browser-DizuWstJ.js");
86961
+ const { MCPAgent: MCPAgent2 } = await import("./browser-0QciJv93.js");
86874
86962
  return { MCPAgent: MCPAgent2 };
86875
86963
  }, true ? __vite__mapDeps([10,6,2,1,3]) : void 0);
86876
86964
  agentRef.current = new MCPAgent({
@@ -89599,7 +89687,7 @@ function NotificationsTabHeader({
89599
89687
  onClearAll,
89600
89688
  searchInputRef
89601
89689
  }) {
89602
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between p-4 py-3", children: [
89690
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-center justify-between p-4 sm:p-4 py-3 gap-2", children: [
89603
89691
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 flex-1", children: !isSearchExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
89604
89692
  /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-medium text-gray-900 dark:text-gray-100", children: "Notifications" }),
89605
89693
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -89704,10 +89792,7 @@ function NotificationsList({
89704
89792
  listRef
89705
89793
  }) {
89706
89794
  if (notifications.length === 0) {
89707
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-full p-4 text-center", children: [
89708
- /* @__PURE__ */ jsxRuntimeExports.jsx(Bell, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }),
89709
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: "No notifications yet" })
89710
- ] });
89795
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center justify-center h-full p-4 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotFound, { vertical: true, noBorder: true, message: "No notifications yet" }) });
89711
89796
  }
89712
89797
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: listRef, className: "overflow-y-auto flex-1 overscroll-contain", children: notifications.map((notification, index2) => {
89713
89798
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -91547,7 +91632,7 @@ function ResourcesTabHeader({
91547
91632
  onSearchBlur,
91548
91633
  searchInputRef
91549
91634
  }) {
91550
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between p-4 py-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 flex-1", children: !isSearchExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
91635
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-row items-center justify-between p-4 sm:p-4 py-3 gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 flex-1", children: !isSearchExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
91551
91636
  /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-medium text-gray-900 dark:text-gray-100", children: "Resources" }),
91552
91637
  /* @__PURE__ */ jsxRuntimeExports.jsx(
91553
91638
  Badge,
@@ -92254,7 +92339,7 @@ function ToolExecutionPanel({
92254
92339
  ] });
92255
92340
  }
92256
92341
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full", children: [
92257
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 p-3 sm:p-6 pt-3 pb-4 pr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
92342
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 p-3 sm:p-5 pt-3 sm:pt-4 pb-4 sm:pr-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
92258
92343
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-center justify-between mb-0 gap-2", children: [
92259
92344
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-base sm:text-lg font-semibold", children: selectedTool.name }),
92260
92345
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 flex-shrink-0", children: [
@@ -93111,7 +93196,12 @@ function ToolsTab({
93111
93196
  }
93112
93197
  );
93113
93198
  }
93114
- const result = await callTool(selectedTool.name, parsedArgs);
93199
+ const result = await callTool(selectedTool.name, parsedArgs, {
93200
+ timeout: 6e5,
93201
+ // 10 minutes
93202
+ resetTimeoutOnProgress: true
93203
+ // Reset timeout when progress is received
93204
+ });
93115
93205
  const duration = Date.now() - startTime;
93116
93206
  const telemetry = Telemetry.getInstance();
93117
93207
  telemetry.capture(
@@ -95099,7 +95189,8 @@ function Layout({ children }) {
95099
95189
  connections,
95100
95190
  addConnection,
95101
95191
  removeConnection,
95102
- updateConnectionConfig
95192
+ updateConnectionConfig,
95193
+ configLoaded
95103
95194
  } = useMcpContext();
95104
95195
  const {
95105
95196
  selectedServerId,
@@ -95125,7 +95216,8 @@ function Layout({ children }) {
95125
95216
  const { isAutoConnecting } = useAutoConnect({
95126
95217
  connections,
95127
95218
  addConnection,
95128
- removeConnection
95219
+ removeConnection,
95220
+ configLoaded
95129
95221
  });
95130
95222
  const handleCommandPaletteOpen = reactExports.useCallback(
95131
95223
  (trigger) => {
@@ -1,5 +1,5 @@
1
- import { s as snakeCase, v as v4, P as PQueueMod, p as pRetry, a as v5, b as styles, g as globalRegistry, c as parseAsync, d as clone, _ as _never, $ as $ZodNever, e as _unknown, f as partial, h as $ZodOptional, i as parse, j as extend, k as $ZodUnknown, t as toJSONSchema, l as deepCompareStrict, V as Validator, m as dereference, n as validate$1, o as getEncodingNameForModel, T as Tiktoken } from "./chunk-VL2OQCWN-DVIxKKkz.js";
2
- import { Z as ZodFirstPartyTypeKind, a as anyType, o as objectType, s as stringType } from "./index-jGfWX_CN.js";
1
+ import { s as snakeCase, v as v4, P as PQueueMod, p as pRetry, a as v5, b as styles, g as globalRegistry, c as parseAsync, d as clone, _ as _never, $ as $ZodNever, e as _unknown, f as partial, h as $ZodOptional, i as parse, j as extend, k as $ZodUnknown, t as toJSONSchema, l as deepCompareStrict, V as Validator, m as dereference, n as validate$1, o as getEncodingNameForModel, T as Tiktoken } from "./chunk-VL2OQCWN-B3ULnk6R.js";
2
+ import { Z as ZodFirstPartyTypeKind, a as anyType, o as objectType, s as stringType } from "./index-Dxg-Tx_J.js";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __export = (target, all) => {
5
5
  for (var name in all) __defProp(target, name, {
@@ -1,7 +1,7 @@
1
- import { d as ChatMessage, g as isLangChainTool, q as convertToOpenAITool, r as isZodSchemaV3, s as isZodSchemaV4, l as interopSafeParseAsync, O as OutputParserException, u as BaseCumulativeTransformOutputParser, f as isAIMessage, v as parsePartialJson, _ as __export, m as BaseChatModel, n as getEnvironmentVariable, i as isInteropZodSchema, h as isOpenAITool, S as StructuredOutputParser, J as JsonOutputParser, t as toJsonSchema, w as getSchemaDescription, x as RunnableLambda, R as RunnablePassthrough, o as RunnableSequence, j as isDataContentBlock, k as convertToProviderContentBlock, b as AIMessage, T as ToolMessage, y as HumanMessageChunk, c as AIMessageChunk, z as SystemMessageChunk, F as FunctionMessageChunk, D as ToolMessageChunk, E as ChatMessageChunk, p as parseBase64DataUrl, G as parseMimeType, I as iife, C as ChatGenerationChunk, K as BaseLanguageModel, L as CallbackManager, M as GenerationChunk, N as callbackHandlerPrefersStreaming, P as concat, Q as RUN_KEY, U as isStructuredToolParams, V as isStructuredTool, W as isRunnableToolLike, X as ToolInputParsingException, Y as BaseLangChain, Z as ensureConfig, $ as mergeConfigs, a0 as _isToolCall, a1 as interopParseAsync, a2 as parseCallbackConfigArg, a3 as _configHasToolCallId, a4 as isSimpleStringZodSchema, a5 as validatesOnlyStrings, a6 as patchConfig, a7 as AsyncLocalStorageProviderSingleton, a8 as pickRunnableConfigKeys, a9 as isDirectToolOutput, aa as getAbortSignalError } from "./index-BQYvi9ex.js";
2
- import { Z as ZodFirstPartyTypeKind, o as objectType, s as stringType } from "./index-jGfWX_CN.js";
3
- import { t as toJSONSchema, i as parse, q as prettifyError, r as validate } from "./chunk-VL2OQCWN-DVIxKKkz.js";
4
- import "./embeddings-BAyPT62O.js";
1
+ import { d as ChatMessage, g as isLangChainTool, q as convertToOpenAITool, r as isZodSchemaV3, s as isZodSchemaV4, l as interopSafeParseAsync, O as OutputParserException, u as BaseCumulativeTransformOutputParser, f as isAIMessage, v as parsePartialJson, _ as __export, m as BaseChatModel, n as getEnvironmentVariable, i as isInteropZodSchema, h as isOpenAITool, S as StructuredOutputParser, J as JsonOutputParser, t as toJsonSchema, w as getSchemaDescription, x as RunnableLambda, R as RunnablePassthrough, o as RunnableSequence, j as isDataContentBlock, k as convertToProviderContentBlock, b as AIMessage, T as ToolMessage, y as HumanMessageChunk, c as AIMessageChunk, z as SystemMessageChunk, F as FunctionMessageChunk, D as ToolMessageChunk, E as ChatMessageChunk, p as parseBase64DataUrl, G as parseMimeType, I as iife, C as ChatGenerationChunk, K as BaseLanguageModel, L as CallbackManager, M as GenerationChunk, N as callbackHandlerPrefersStreaming, P as concat, Q as RUN_KEY, U as isStructuredToolParams, V as isStructuredTool, W as isRunnableToolLike, X as ToolInputParsingException, Y as BaseLangChain, Z as ensureConfig, $ as mergeConfigs, a0 as _isToolCall, a1 as interopParseAsync, a2 as parseCallbackConfigArg, a3 as _configHasToolCallId, a4 as isSimpleStringZodSchema, a5 as validatesOnlyStrings, a6 as patchConfig, a7 as AsyncLocalStorageProviderSingleton, a8 as pickRunnableConfigKeys, a9 as isDirectToolOutput, aa as getAbortSignalError } from "./index-XlJUZuAw.js";
2
+ import { Z as ZodFirstPartyTypeKind, o as objectType, s as stringType } from "./index-Dxg-Tx_J.js";
3
+ import { t as toJSONSchema, i as parse, q as prettifyError, r as validate } from "./chunk-VL2OQCWN-B3ULnk6R.js";
4
+ import "./embeddings-CJvY7vou.js";
5
5
  import "./index-DX0TIfSM.js";
6
6
  const iife$1 = (fn) => fn();
7
7
  function isReasoningModel(model) {
@@ -1,4 +1,4 @@
1
- import { b as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./index-jGfWX_CN.js";
1
+ import { b as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./index-Dxg-Tx_J.js";
2
2
  import { o as os } from "./__vite-browser-external-CHS79mP1.js";
3
3
  import { r as requireBase64Js } from "./index-DX0TIfSM.js";
4
4
  import { p as path } from "./path-QsnVvLoj.js";
@@ -27,9 +27,9 @@
27
27
  rel="stylesheet"
28
28
  />
29
29
  <title>Inspector | mcp-use</title>
30
- <script type="module" crossorigin src="/inspector/assets/index-jGfWX_CN.js"></script>
31
- <link rel="stylesheet" crossorigin href="/inspector/assets/index-C2qHJtN-.css">
32
- <script>window.__INSPECTOR_VERSION__ = "0.7.1-canary.2";</script>
30
+ <script type="module" crossorigin src="/inspector/assets/index-Dxg-Tx_J.js"></script>
31
+ <link rel="stylesheet" crossorigin href="/inspector/assets/index-CwF__a_n.css">
32
+ <script>window.__INSPECTOR_VERSION__ = "0.7.1-canary.3";</script>
33
33
  </head>
34
34
  <body>
35
35
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-use/inspector",
3
3
  "type": "module",
4
- "version": "0.7.1-canary.2",
4
+ "version": "0.7.1-canary.3",
5
5
  "description": "MCP Inspector - A tool for inspecting and debugging MCP servers",
6
6
  "author": "",
7
7
  "license": "MIT",
@@ -82,7 +82,7 @@
82
82
  "sonner": "^2.0.7",
83
83
  "tailwind-merge": "^3.3.1",
84
84
  "vite-express": "^0.21.1",
85
- "mcp-use": "1.5.1-canary.2"
85
+ "mcp-use": "1.5.1-canary.3"
86
86
  },
87
87
  "publishConfig": {
88
88
  "access": "public"