@modelcontextprotocol/inspector-client 0.16.4 → 0.16.5

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,4 +1,4 @@
1
- import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-MFoeZZBS.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-BIvDs4Sc.js";
2
2
  const OAuthCallback = ({ onConnect }) => {
3
3
  const { toast } = useToast();
4
4
  const hasProcessedRef = reactExports.useRef(false);
@@ -1,4 +1,4 @@
1
- import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-MFoeZZBS.js";
1
+ import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-BIvDs4Sc.js";
2
2
  const OAuthDebugCallback = ({ onConnect }) => {
3
3
  reactExports.useEffect(() => {
4
4
  let isProcessed = false;
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  function _mergeNamespaces(n, m2) {
2
5
  for (var i = 0; i < m2.length; i++) {
3
6
  const e = m2[i];
@@ -16935,8 +16938,10 @@ const clearClientInformationFromSessionStorage = ({
16935
16938
  sessionStorage.removeItem(key);
16936
16939
  };
16937
16940
  class InspectorOAuthClientProvider {
16938
- constructor(serverUrl) {
16941
+ constructor(serverUrl, scope) {
16942
+ __publicField(this, "scope");
16939
16943
  this.serverUrl = serverUrl;
16944
+ this.scope = scope;
16940
16945
  sessionStorage.setItem(SESSION_KEYS.SERVER_URL, serverUrl);
16941
16946
  }
16942
16947
  get redirectUrl() {
@@ -16949,7 +16954,8 @@ class InspectorOAuthClientProvider {
16949
16954
  grant_types: ["authorization_code", "refresh_token"],
16950
16955
  response_types: ["code"],
16951
16956
  client_name: "MCP Inspector",
16952
- client_uri: "https://github.com/modelcontextprotocol/inspector"
16957
+ client_uri: "https://github.com/modelcontextprotocol/inspector",
16958
+ scope: this.scope ?? ""
16953
16959
  };
16954
16960
  }
16955
16961
  state() {
@@ -17179,7 +17185,7 @@ const oauthTransitions = {
17179
17185
  authorizationCode: context.state.authorizationCode,
17180
17186
  codeVerifier,
17181
17187
  redirectUri: context.provider.redirectUrl,
17182
- resource: context.state.resource ?? void 0
17188
+ resource: context.state.resource ? context.state.resource instanceof URL ? context.state.resource : new URL(context.state.resource) : void 0
17183
17189
  });
17184
17190
  context.provider.saveTokens(tokens);
17185
17191
  context.updateState({
@@ -24844,7 +24850,7 @@ const StdErrNotificationSchema = NotificationSchema.extend({
24844
24850
  ClientNotificationSchema.or(
24845
24851
  StdErrNotificationSchema
24846
24852
  ).or(ServerNotificationSchema).or(NotificationSchema);
24847
- const version$1 = "0.16.4";
24853
+ const version$1 = "0.16.5";
24848
24854
  const packageJson = {
24849
24855
  version: version$1
24850
24856
  };
@@ -25147,7 +25153,6 @@ function useConnection({
25147
25153
  };
25148
25154
  const handleAuthError = async (error) => {
25149
25155
  if (is401Error(error)) {
25150
- const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
25151
25156
  let scope = oauthScope == null ? void 0 : oauthScope.trim();
25152
25157
  if (!scope) {
25153
25158
  let resourceMetadata;
@@ -25159,6 +25164,10 @@ function useConnection({
25159
25164
  }
25160
25165
  scope = await discoverScopes(sseUrl, resourceMetadata);
25161
25166
  }
25167
+ const serverAuthProvider = new InspectorOAuthClientProvider(
25168
+ sseUrl,
25169
+ scope
25170
+ );
25162
25171
  const result = await auth(serverAuthProvider, {
25163
25172
  serverUrl: sseUrl,
25164
25173
  scope
@@ -36382,7 +36391,7 @@ const useTheme = () => {
36382
36391
  [theme, setThemeWithSideEffect]
36383
36392
  );
36384
36393
  };
36385
- const version = "0.16.4";
36394
+ const version = "0.16.5";
36386
36395
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
36387
36396
  createPopperScope
36388
36397
  ]);
@@ -39048,13 +39057,13 @@ const App = () => {
39048
39057
  ) });
39049
39058
  if (window.location.pathname === "/oauth/callback") {
39050
39059
  const OAuthCallback = React.lazy(
39051
- () => __vitePreload(() => import("./OAuthCallback-DyaAiF-O.js"), true ? [] : void 0)
39060
+ () => __vitePreload(() => import("./OAuthCallback-BxZPCak0.js"), true ? [] : void 0)
39052
39061
  );
39053
39062
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
39054
39063
  }
39055
39064
  if (window.location.pathname === "/oauth/callback/debug") {
39056
39065
  const OAuthDebugCallback = React.lazy(
39057
- () => __vitePreload(() => import("./OAuthDebugCallback-BD-zJllm.js"), true ? [] : void 0)
39066
+ () => __vitePreload(() => import("./OAuthDebugCallback-CwfxQhTF.js"), true ? [] : void 0)
39058
39067
  );
39059
39068
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
39060
39069
  }
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
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-MFoeZZBS.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BIvDs4Sc.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BWZfLo5E.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/inspector-client",
3
- "version": "0.16.4",
3
+ "version": "0.16.5",
4
4
  "description": "Client-side application for the Model Context Protocol inspector",
5
5
  "license": "MIT",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
@@ -25,7 +25,7 @@
25
25
  "cleanup:e2e": "node e2e/global-teardown.js"
26
26
  },
27
27
  "dependencies": {
28
- "@modelcontextprotocol/sdk": "^1.17.2",
28
+ "@modelcontextprotocol/sdk": "^1.17.3",
29
29
  "@radix-ui/react-checkbox": "^1.1.4",
30
30
  "@radix-ui/react-dialog": "^1.1.3",
31
31
  "@radix-ui/react-icons": "^1.3.0",