@modelcontextprotocol/inspector-client 0.14.0 → 0.14.1
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/bin/start.js +3 -1
- package/dist/assets/{OAuthCallback-CJlw2xLt.js → OAuthCallback-D7GXYYW8.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-0U3Rpr19.js → OAuthDebugCallback-25cy6Vcm.js} +1 -1
- package/dist/assets/{index-1IEtev7A.css → index-C1MLjTGf.css} +0 -3
- package/dist/assets/{index-CfNcvwpX.js → index-TghXC4TH.js} +234 -64
- package/dist/index.html +2 -2
- package/package.json +1 -1
package/bin/start.js
CHANGED
|
@@ -100,7 +100,9 @@ async function main() {
|
|
|
100
100
|
|
|
101
101
|
if (serverOk) {
|
|
102
102
|
try {
|
|
103
|
-
|
|
103
|
+
// Only auto-open when auth is disabled
|
|
104
|
+
const authDisabled = !!process.env.DANGEROUSLY_OMIT_AUTH;
|
|
105
|
+
if (process.env.MCP_AUTO_OPEN_ENABLED !== "false" && authDisabled) {
|
|
104
106
|
open(`http://127.0.0.1:${CLIENT_PORT}`);
|
|
105
107
|
}
|
|
106
108
|
await spawnPromise("node", [inspectorClientPath], {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-
|
|
1
|
+
import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-TghXC4TH.js";
|
|
2
2
|
import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
|
|
3
3
|
const OAuthCallback = ({ onConnect }) => {
|
|
4
4
|
const { toast } = useToast();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-
|
|
1
|
+
import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-TghXC4TH.js";
|
|
2
2
|
import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
|
|
3
3
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
4
4
|
reactExports.useEffect(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-D7GXYYW8.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-25cy6Vcm.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n, m2) {
|
|
3
3
|
for (var i = 0; i < m2.length; i++) {
|
|
4
4
|
const e = m2[i];
|
|
@@ -16039,22 +16039,32 @@ const DEFAULT_INSPECTOR_CONFIG = {
|
|
|
16039
16039
|
MCP_SERVER_REQUEST_TIMEOUT: {
|
|
16040
16040
|
label: "Request Timeout",
|
|
16041
16041
|
description: "Timeout for requests to the MCP server (ms)",
|
|
16042
|
-
value: 1e4
|
|
16042
|
+
value: 1e4,
|
|
16043
|
+
is_session_item: false
|
|
16043
16044
|
},
|
|
16044
16045
|
MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS: {
|
|
16045
16046
|
label: "Reset Timeout on Progress",
|
|
16046
16047
|
description: "Reset timeout on progress notifications",
|
|
16047
|
-
value: true
|
|
16048
|
+
value: true,
|
|
16049
|
+
is_session_item: false
|
|
16048
16050
|
},
|
|
16049
16051
|
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
|
|
16050
16052
|
label: "Maximum Total Timeout",
|
|
16051
16053
|
description: "Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",
|
|
16052
|
-
value: 6e4
|
|
16054
|
+
value: 6e4,
|
|
16055
|
+
is_session_item: false
|
|
16053
16056
|
},
|
|
16054
16057
|
MCP_PROXY_FULL_ADDRESS: {
|
|
16055
16058
|
label: "Inspector Proxy Address",
|
|
16056
16059
|
description: "Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
|
|
16057
|
-
value: ""
|
|
16060
|
+
value: "",
|
|
16061
|
+
is_session_item: false
|
|
16062
|
+
},
|
|
16063
|
+
MCP_PROXY_AUTH_TOKEN: {
|
|
16064
|
+
label: "Proxy Session Token",
|
|
16065
|
+
description: "Session token for authenticating with the MCP Proxy Server (displayed in proxy console on startup)",
|
|
16066
|
+
value: "",
|
|
16067
|
+
is_session_item: true
|
|
16058
16068
|
}
|
|
16059
16069
|
};
|
|
16060
16070
|
const EMPTY_DEBUGGER_STATE = {
|
|
@@ -24146,7 +24156,7 @@ const StdErrNotificationSchema = NotificationSchema.extend({
|
|
|
24146
24156
|
ClientNotificationSchema.or(
|
|
24147
24157
|
StdErrNotificationSchema
|
|
24148
24158
|
).or(ServerNotificationSchema).or(NotificationSchema);
|
|
24149
|
-
const version$1 = "0.14.
|
|
24159
|
+
const version$1 = "0.14.1";
|
|
24150
24160
|
const packageJson = {
|
|
24151
24161
|
version: version$1
|
|
24152
24162
|
};
|
|
@@ -24166,6 +24176,9 @@ const resetRequestTimeoutOnProgress = (config) => {
|
|
|
24166
24176
|
const getMCPServerRequestMaxTotalTimeout = (config) => {
|
|
24167
24177
|
return config.MCP_REQUEST_MAX_TOTAL_TIMEOUT.value;
|
|
24168
24178
|
};
|
|
24179
|
+
const getMCPProxyAuthToken = (config) => {
|
|
24180
|
+
return config.MCP_PROXY_AUTH_TOKEN.value;
|
|
24181
|
+
};
|
|
24169
24182
|
const getSearchParam = (key) => {
|
|
24170
24183
|
try {
|
|
24171
24184
|
const url = new URL(window.location.href);
|
|
@@ -24218,26 +24231,46 @@ const getConfigOverridesFromQueryParams = (defaultConfig) => {
|
|
|
24218
24231
|
return overrides;
|
|
24219
24232
|
};
|
|
24220
24233
|
const initializeInspectorConfig = (localStorageKey) => {
|
|
24221
|
-
const
|
|
24222
|
-
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
|
|
24226
|
-
|
|
24234
|
+
const savedPersistentConfig = localStorage.getItem(localStorageKey);
|
|
24235
|
+
const savedEphemeralConfig = sessionStorage.getItem(
|
|
24236
|
+
`${localStorageKey}_ephemeral`
|
|
24237
|
+
);
|
|
24238
|
+
let baseConfig = { ...DEFAULT_INSPECTOR_CONFIG };
|
|
24239
|
+
if (savedPersistentConfig) {
|
|
24240
|
+
const parsedPersistentConfig = JSON.parse(savedPersistentConfig);
|
|
24241
|
+
baseConfig = { ...baseConfig, ...parsedPersistentConfig };
|
|
24242
|
+
}
|
|
24243
|
+
if (savedEphemeralConfig) {
|
|
24244
|
+
const parsedEphemeralConfig = JSON.parse(savedEphemeralConfig);
|
|
24245
|
+
baseConfig = { ...baseConfig, ...parsedEphemeralConfig };
|
|
24246
|
+
}
|
|
24247
|
+
for (const [key, value] of Object.entries(baseConfig)) {
|
|
24248
|
+
baseConfig[key] = {
|
|
24249
|
+
...value,
|
|
24250
|
+
label: DEFAULT_INSPECTOR_CONFIG[key].label,
|
|
24251
|
+
description: DEFAULT_INSPECTOR_CONFIG[key].description,
|
|
24252
|
+
is_session_item: DEFAULT_INSPECTOR_CONFIG[key].is_session_item
|
|
24227
24253
|
};
|
|
24228
|
-
for (const [key, value] of Object.entries(mergedConfig)) {
|
|
24229
|
-
mergedConfig[key] = {
|
|
24230
|
-
...value,
|
|
24231
|
-
label: DEFAULT_INSPECTOR_CONFIG[key].label
|
|
24232
|
-
};
|
|
24233
|
-
}
|
|
24234
|
-
baseConfig = mergedConfig;
|
|
24235
|
-
} else {
|
|
24236
|
-
baseConfig = DEFAULT_INSPECTOR_CONFIG;
|
|
24237
24254
|
}
|
|
24238
24255
|
const overrides = getConfigOverridesFromQueryParams(DEFAULT_INSPECTOR_CONFIG);
|
|
24239
24256
|
return { ...baseConfig, ...overrides };
|
|
24240
24257
|
};
|
|
24258
|
+
const saveInspectorConfig = (localStorageKey, config) => {
|
|
24259
|
+
const persistentConfig = {};
|
|
24260
|
+
const ephemeralConfig = {};
|
|
24261
|
+
for (const [key, value] of Object.entries(config)) {
|
|
24262
|
+
if (value.is_session_item) {
|
|
24263
|
+
ephemeralConfig[key] = value;
|
|
24264
|
+
} else {
|
|
24265
|
+
persistentConfig[key] = value;
|
|
24266
|
+
}
|
|
24267
|
+
}
|
|
24268
|
+
localStorage.setItem(localStorageKey, JSON.stringify(persistentConfig));
|
|
24269
|
+
sessionStorage.setItem(
|
|
24270
|
+
`${localStorageKey}_ephemeral`,
|
|
24271
|
+
JSON.stringify(ephemeralConfig)
|
|
24272
|
+
);
|
|
24273
|
+
};
|
|
24241
24274
|
function useConnection({
|
|
24242
24275
|
transportType,
|
|
24243
24276
|
command,
|
|
@@ -24375,7 +24408,12 @@ function useConnection({
|
|
|
24375
24408
|
const checkProxyHealth = async () => {
|
|
24376
24409
|
try {
|
|
24377
24410
|
const proxyHealthUrl = new URL(`${getMCPProxyAddress(config)}/health`);
|
|
24378
|
-
const
|
|
24411
|
+
const proxyAuthToken = getMCPProxyAuthToken(config);
|
|
24412
|
+
const headers = {};
|
|
24413
|
+
if (proxyAuthToken) {
|
|
24414
|
+
headers["Authorization"] = `Bearer ${proxyAuthToken}`;
|
|
24415
|
+
}
|
|
24416
|
+
const proxyHealthResponse = await fetch(proxyHealthUrl, { headers });
|
|
24379
24417
|
const proxyHealth = await proxyHealthResponse.json();
|
|
24380
24418
|
if ((proxyHealth == null ? void 0 : proxyHealth.status) !== "ok") {
|
|
24381
24419
|
throw new Error("MCP Proxy Server is not healthy");
|
|
@@ -24388,6 +24426,9 @@ function useConnection({
|
|
|
24388
24426
|
const is401Error = (error) => {
|
|
24389
24427
|
return error instanceof SseError && error.code === 401 || error instanceof Error && error.message.includes("401") || error instanceof Error && error.message.includes("Unauthorized");
|
|
24390
24428
|
};
|
|
24429
|
+
const isProxyAuthError = (error) => {
|
|
24430
|
+
return error instanceof Error && error.message.includes("Authentication required. Use the session token");
|
|
24431
|
+
};
|
|
24391
24432
|
const handleAuthError = async (error) => {
|
|
24392
24433
|
if (is401Error(error)) {
|
|
24393
24434
|
const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
|
|
@@ -24431,6 +24472,11 @@ function useConnection({
|
|
|
24431
24472
|
headers[authHeaderName] = `Bearer ${token}`;
|
|
24432
24473
|
}
|
|
24433
24474
|
}
|
|
24475
|
+
const proxyAuthToken = getMCPProxyAuthToken(config);
|
|
24476
|
+
const proxyHeaders = {};
|
|
24477
|
+
if (proxyAuthToken) {
|
|
24478
|
+
proxyHeaders["Authorization"] = `Bearer ${proxyAuthToken}`;
|
|
24479
|
+
}
|
|
24434
24480
|
let transportOptions;
|
|
24435
24481
|
let mcpProxyServerUrl;
|
|
24436
24482
|
switch (transportType) {
|
|
@@ -24442,10 +24488,13 @@ function useConnection({
|
|
|
24442
24488
|
transportOptions = {
|
|
24443
24489
|
authProvider: serverAuthProvider,
|
|
24444
24490
|
eventSourceInit: {
|
|
24445
|
-
fetch: (url, init) => fetch(url, {
|
|
24491
|
+
fetch: (url, init) => fetch(url, {
|
|
24492
|
+
...init,
|
|
24493
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24494
|
+
})
|
|
24446
24495
|
},
|
|
24447
24496
|
requestInit: {
|
|
24448
|
-
headers
|
|
24497
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24449
24498
|
}
|
|
24450
24499
|
};
|
|
24451
24500
|
break;
|
|
@@ -24454,10 +24503,13 @@ function useConnection({
|
|
|
24454
24503
|
mcpProxyServerUrl.searchParams.append("url", sseUrl);
|
|
24455
24504
|
transportOptions = {
|
|
24456
24505
|
eventSourceInit: {
|
|
24457
|
-
fetch: (url, init) => fetch(url, {
|
|
24506
|
+
fetch: (url, init) => fetch(url, {
|
|
24507
|
+
...init,
|
|
24508
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24509
|
+
})
|
|
24458
24510
|
},
|
|
24459
24511
|
requestInit: {
|
|
24460
|
-
headers
|
|
24512
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24461
24513
|
}
|
|
24462
24514
|
};
|
|
24463
24515
|
break;
|
|
@@ -24466,10 +24518,13 @@ function useConnection({
|
|
|
24466
24518
|
mcpProxyServerUrl.searchParams.append("url", sseUrl);
|
|
24467
24519
|
transportOptions = {
|
|
24468
24520
|
eventSourceInit: {
|
|
24469
|
-
fetch: (url, init) => fetch(url, {
|
|
24521
|
+
fetch: (url, init) => fetch(url, {
|
|
24522
|
+
...init,
|
|
24523
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24524
|
+
})
|
|
24470
24525
|
},
|
|
24471
24526
|
requestInit: {
|
|
24472
|
-
headers
|
|
24527
|
+
headers: { ...headers, ...proxyHeaders }
|
|
24473
24528
|
},
|
|
24474
24529
|
// TODO these should be configurable...
|
|
24475
24530
|
reconnectionOptions: {
|
|
@@ -24532,6 +24587,15 @@ function useConnection({
|
|
|
24532
24587
|
`Failed to connect to MCP Server via the MCP Inspector Proxy: ${mcpProxyServerUrl}:`,
|
|
24533
24588
|
error
|
|
24534
24589
|
);
|
|
24590
|
+
if (isProxyAuthError(error)) {
|
|
24591
|
+
toast2({
|
|
24592
|
+
title: "Proxy Authentication Required",
|
|
24593
|
+
description: "Please enter the session token from the proxy server console in the Configuration settings.",
|
|
24594
|
+
variant: "destructive"
|
|
24595
|
+
});
|
|
24596
|
+
setConnectionStatus("error");
|
|
24597
|
+
return;
|
|
24598
|
+
}
|
|
24535
24599
|
const shouldRetry = await handleAuthError(error);
|
|
24536
24600
|
if (shouldRetry) {
|
|
24537
24601
|
return connect(void 0, retryCount + 1);
|
|
@@ -24633,6 +24697,52 @@ function useDraggablePane(initialHeight) {
|
|
|
24633
24697
|
handleDragStart
|
|
24634
24698
|
};
|
|
24635
24699
|
}
|
|
24700
|
+
function useDraggableSidebar(initialWidth) {
|
|
24701
|
+
const [width, setWidth] = reactExports.useState(initialWidth);
|
|
24702
|
+
const [isDragging, setIsDragging] = reactExports.useState(false);
|
|
24703
|
+
const dragStartX = reactExports.useRef(0);
|
|
24704
|
+
const dragStartWidth = reactExports.useRef(0);
|
|
24705
|
+
const handleDragStart = reactExports.useCallback(
|
|
24706
|
+
(e) => {
|
|
24707
|
+
setIsDragging(true);
|
|
24708
|
+
dragStartX.current = e.clientX;
|
|
24709
|
+
dragStartWidth.current = width;
|
|
24710
|
+
document.body.style.userSelect = "none";
|
|
24711
|
+
},
|
|
24712
|
+
[width]
|
|
24713
|
+
);
|
|
24714
|
+
const handleDragMove = reactExports.useCallback(
|
|
24715
|
+
(e) => {
|
|
24716
|
+
if (!isDragging) return;
|
|
24717
|
+
const deltaX = e.clientX - dragStartX.current;
|
|
24718
|
+
const newWidth = Math.max(
|
|
24719
|
+
200,
|
|
24720
|
+
Math.min(600, dragStartWidth.current + deltaX)
|
|
24721
|
+
);
|
|
24722
|
+
setWidth(newWidth);
|
|
24723
|
+
},
|
|
24724
|
+
[isDragging]
|
|
24725
|
+
);
|
|
24726
|
+
const handleDragEnd = reactExports.useCallback(() => {
|
|
24727
|
+
setIsDragging(false);
|
|
24728
|
+
document.body.style.userSelect = "";
|
|
24729
|
+
}, []);
|
|
24730
|
+
reactExports.useEffect(() => {
|
|
24731
|
+
if (isDragging) {
|
|
24732
|
+
window.addEventListener("mousemove", handleDragMove);
|
|
24733
|
+
window.addEventListener("mouseup", handleDragEnd);
|
|
24734
|
+
return () => {
|
|
24735
|
+
window.removeEventListener("mousemove", handleDragMove);
|
|
24736
|
+
window.removeEventListener("mouseup", handleDragEnd);
|
|
24737
|
+
};
|
|
24738
|
+
}
|
|
24739
|
+
}, [isDragging, handleDragMove, handleDragEnd]);
|
|
24740
|
+
return {
|
|
24741
|
+
width,
|
|
24742
|
+
isDragging,
|
|
24743
|
+
handleDragStart
|
|
24744
|
+
};
|
|
24745
|
+
}
|
|
24636
24746
|
var useReactId = React$1[" useId ".trim().toString()] || (() => void 0);
|
|
24637
24747
|
var count$1 = 0;
|
|
24638
24748
|
function useId(deterministicId) {
|
|
@@ -35185,7 +35295,7 @@ const useTheme = () => {
|
|
|
35185
35295
|
[theme, setThemeWithSideEffect]
|
|
35186
35296
|
);
|
|
35187
35297
|
};
|
|
35188
|
-
const version = "0.14.
|
|
35298
|
+
const version = "0.14.1";
|
|
35189
35299
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
35190
35300
|
createPopperScope
|
|
35191
35301
|
]);
|
|
@@ -35788,7 +35898,7 @@ const Sidebar = ({
|
|
|
35788
35898
|
reportError2(error);
|
|
35789
35899
|
}
|
|
35790
35900
|
}, [generateMCPServerFile, toast2, reportError2]);
|
|
35791
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
|
35901
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-card border-r border-border flex flex-col h-full", children: [
|
|
35792
35902
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 dark:border-border", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h1", { className: "ml-2 text-lg font-semibold", children: [
|
|
35793
35903
|
"MCP Inspector v",
|
|
35794
35904
|
version
|
|
@@ -35856,7 +35966,19 @@ const Sidebar = ({
|
|
|
35856
35966
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35857
35967
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
35858
35968
|
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", htmlFor: "sse-url-input", children: "URL" }),
|
|
35859
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
35969
|
+
sseUrl ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
35970
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35971
|
+
Input,
|
|
35972
|
+
{
|
|
35973
|
+
id: "sse-url-input",
|
|
35974
|
+
placeholder: "URL",
|
|
35975
|
+
value: sseUrl,
|
|
35976
|
+
onChange: (e) => setSseUrl(e.target.value),
|
|
35977
|
+
className: "font-mono"
|
|
35978
|
+
}
|
|
35979
|
+
) }),
|
|
35980
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: sseUrl })
|
|
35981
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35860
35982
|
Input,
|
|
35861
35983
|
{
|
|
35862
35984
|
id: "sse-url-input",
|
|
@@ -36207,11 +36329,17 @@ const Sidebar = ({
|
|
|
36207
36329
|
}
|
|
36208
36330
|
),
|
|
36209
36331
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: (() => {
|
|
36332
|
+
var _a;
|
|
36210
36333
|
switch (connectionStatus) {
|
|
36211
36334
|
case "connected":
|
|
36212
36335
|
return "Connected";
|
|
36213
|
-
case "error":
|
|
36214
|
-
|
|
36336
|
+
case "error": {
|
|
36337
|
+
const hasProxyToken = (_a = config.MCP_PROXY_AUTH_TOKEN) == null ? void 0 : _a.value;
|
|
36338
|
+
if (!hasProxyToken) {
|
|
36339
|
+
return "Connection Error - Did you add the proxy session token in Configuration?";
|
|
36340
|
+
}
|
|
36341
|
+
return "Connection Error - Check if your MCP server is running and proxy token is correct";
|
|
36342
|
+
}
|
|
36215
36343
|
case "error-connecting-to-proxy":
|
|
36216
36344
|
return "Error Connecting to MCP Inspector Proxy - Check Console logs";
|
|
36217
36345
|
default:
|
|
@@ -37015,6 +37143,11 @@ const App = () => {
|
|
|
37015
37143
|
const [nextToolCursor, setNextToolCursor] = reactExports.useState();
|
|
37016
37144
|
const progressTokenRef = reactExports.useRef(0);
|
|
37017
37145
|
const { height: historyPaneHeight, handleDragStart } = useDraggablePane(300);
|
|
37146
|
+
const {
|
|
37147
|
+
width: sidebarWidth,
|
|
37148
|
+
isDragging: isSidebarDragging,
|
|
37149
|
+
handleDragStart: handleSidebarDragStart
|
|
37150
|
+
} = useDraggableSidebar(320);
|
|
37018
37151
|
const {
|
|
37019
37152
|
connectionStatus,
|
|
37020
37153
|
serverCapabilities,
|
|
@@ -37071,7 +37204,7 @@ const App = () => {
|
|
|
37071
37204
|
localStorage.setItem("lastHeaderName", headerName);
|
|
37072
37205
|
}, [headerName]);
|
|
37073
37206
|
reactExports.useEffect(() => {
|
|
37074
|
-
|
|
37207
|
+
saveInspectorConfig(CONFIG_LOCAL_STORAGE_KEY, config);
|
|
37075
37208
|
}, [config]);
|
|
37076
37209
|
const onOAuthConnect = reactExports.useCallback(
|
|
37077
37210
|
(serverUrl) => {
|
|
@@ -37163,7 +37296,12 @@ const App = () => {
|
|
|
37163
37296
|
loadOAuthTokens();
|
|
37164
37297
|
}, [sseUrl]);
|
|
37165
37298
|
reactExports.useEffect(() => {
|
|
37166
|
-
|
|
37299
|
+
const headers = {};
|
|
37300
|
+
const proxyAuthToken = getMCPProxyAuthToken(config);
|
|
37301
|
+
if (proxyAuthToken) {
|
|
37302
|
+
headers["Authorization"] = `Bearer ${proxyAuthToken}`;
|
|
37303
|
+
}
|
|
37304
|
+
fetch(`${getMCPProxyAddress(config)}/config`, { headers }).then((response) => response.json()).then((data2) => {
|
|
37167
37305
|
setEnv(data2.defaultEnvironment);
|
|
37168
37306
|
if (data2.defaultCommand) {
|
|
37169
37307
|
setCommand(data2.defaultCommand);
|
|
@@ -37174,7 +37312,7 @@ const App = () => {
|
|
|
37174
37312
|
}).catch(
|
|
37175
37313
|
(error) => console.error("Error fetching default environment:", error)
|
|
37176
37314
|
);
|
|
37177
|
-
}, []);
|
|
37315
|
+
}, [config]);
|
|
37178
37316
|
reactExports.useEffect(() => {
|
|
37179
37317
|
rootsRef.current = roots;
|
|
37180
37318
|
}, [roots]);
|
|
@@ -37378,44 +37516,76 @@ const App = () => {
|
|
|
37378
37516
|
) });
|
|
37379
37517
|
if (window.location.pathname === "/oauth/callback") {
|
|
37380
37518
|
const OAuthCallback = React.lazy(
|
|
37381
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
37519
|
+
() => __vitePreload(() => import("./OAuthCallback-D7GXYYW8.js"), true ? __vite__mapDeps([0,1]) : void 0)
|
|
37382
37520
|
);
|
|
37383
37521
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
37384
37522
|
}
|
|
37385
37523
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
37386
37524
|
const OAuthDebugCallback = React.lazy(
|
|
37387
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
37525
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-25cy6Vcm.js"), true ? __vite__mapDeps([2,1]) : void 0)
|
|
37388
37526
|
);
|
|
37389
37527
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
37390
37528
|
}
|
|
37391
37529
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-screen bg-background", children: [
|
|
37392
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
37393
|
-
|
|
37530
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37531
|
+
"div",
|
|
37394
37532
|
{
|
|
37395
|
-
|
|
37396
|
-
|
|
37397
|
-
|
|
37398
|
-
|
|
37399
|
-
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
37403
|
-
|
|
37404
|
-
|
|
37405
|
-
|
|
37406
|
-
|
|
37407
|
-
|
|
37408
|
-
|
|
37409
|
-
|
|
37410
|
-
|
|
37411
|
-
|
|
37412
|
-
|
|
37413
|
-
|
|
37414
|
-
|
|
37415
|
-
|
|
37416
|
-
|
|
37417
|
-
|
|
37418
|
-
|
|
37533
|
+
style: {
|
|
37534
|
+
width: sidebarWidth,
|
|
37535
|
+
minWidth: 200,
|
|
37536
|
+
maxWidth: 600,
|
|
37537
|
+
transition: isSidebarDragging ? "none" : "width 0.15s"
|
|
37538
|
+
},
|
|
37539
|
+
className: "bg-card border-r border-border flex flex-col h-full relative",
|
|
37540
|
+
children: [
|
|
37541
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37542
|
+
Sidebar,
|
|
37543
|
+
{
|
|
37544
|
+
connectionStatus,
|
|
37545
|
+
transportType,
|
|
37546
|
+
setTransportType,
|
|
37547
|
+
command,
|
|
37548
|
+
setCommand,
|
|
37549
|
+
args,
|
|
37550
|
+
setArgs,
|
|
37551
|
+
sseUrl,
|
|
37552
|
+
setSseUrl,
|
|
37553
|
+
env,
|
|
37554
|
+
setEnv,
|
|
37555
|
+
config,
|
|
37556
|
+
setConfig,
|
|
37557
|
+
bearerToken,
|
|
37558
|
+
setBearerToken,
|
|
37559
|
+
headerName,
|
|
37560
|
+
setHeaderName,
|
|
37561
|
+
onConnect: connectMcpServer,
|
|
37562
|
+
onDisconnect: disconnectMcpServer,
|
|
37563
|
+
stdErrNotifications,
|
|
37564
|
+
logLevel,
|
|
37565
|
+
sendLogLevelRequest,
|
|
37566
|
+
loggingSupported: !!(serverCapabilities == null ? void 0 : serverCapabilities.logging) || false,
|
|
37567
|
+
clearStdErrNotifications
|
|
37568
|
+
}
|
|
37569
|
+
),
|
|
37570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37571
|
+
"div",
|
|
37572
|
+
{
|
|
37573
|
+
onMouseDown: handleSidebarDragStart,
|
|
37574
|
+
style: {
|
|
37575
|
+
cursor: "col-resize",
|
|
37576
|
+
position: "absolute",
|
|
37577
|
+
top: 0,
|
|
37578
|
+
right: 0,
|
|
37579
|
+
width: 6,
|
|
37580
|
+
height: "100%",
|
|
37581
|
+
zIndex: 10,
|
|
37582
|
+
background: isSidebarDragging ? "rgba(0,0,0,0.08)" : "transparent"
|
|
37583
|
+
},
|
|
37584
|
+
"aria-label": "Resize sidebar",
|
|
37585
|
+
"data-testid": "sidebar-drag-handle"
|
|
37586
|
+
}
|
|
37587
|
+
)
|
|
37588
|
+
]
|
|
37419
37589
|
}
|
|
37420
37590
|
),
|
|
37421
37591
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/mcp.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MCP Inspector</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-TghXC4TH.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C1MLjTGf.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED