@modelcontextprotocol/inspector 0.14.1 → 0.14.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,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-TghXC4TH.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-DYfnI33L.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-TghXC4TH.js";
1
+ import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-DYfnI33L.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-D7GXYYW8.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-25cy6Vcm.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-BrCtrNqU.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-CnQiL6bh.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];
@@ -24156,7 +24156,7 @@ const StdErrNotificationSchema = NotificationSchema.extend({
24156
24156
  ClientNotificationSchema.or(
24157
24157
  StdErrNotificationSchema
24158
24158
  ).or(ServerNotificationSchema).or(NotificationSchema);
24159
- const version$1 = "0.14.1";
24159
+ const version$1 = "0.14.3";
24160
24160
  const packageJson = {
24161
24161
  version: version$1
24162
24162
  };
@@ -24177,7 +24177,10 @@ const getMCPServerRequestMaxTotalTimeout = (config) => {
24177
24177
  return config.MCP_REQUEST_MAX_TOTAL_TIMEOUT.value;
24178
24178
  };
24179
24179
  const getMCPProxyAuthToken = (config) => {
24180
- return config.MCP_PROXY_AUTH_TOKEN.value;
24180
+ return {
24181
+ token: config.MCP_PROXY_AUTH_TOKEN.value,
24182
+ header: "X-MCP-Proxy-Auth"
24183
+ };
24181
24184
  };
24182
24185
  const getSearchParam = (key) => {
24183
24186
  try {
@@ -24408,10 +24411,10 @@ function useConnection({
24408
24411
  const checkProxyHealth = async () => {
24409
24412
  try {
24410
24413
  const proxyHealthUrl = new URL(`${getMCPProxyAddress(config)}/health`);
24411
- const proxyAuthToken = getMCPProxyAuthToken(config);
24414
+ const { token: proxyAuthToken, header: proxyAuthTokenHeader } = getMCPProxyAuthToken(config);
24412
24415
  const headers = {};
24413
24416
  if (proxyAuthToken) {
24414
- headers["Authorization"] = `Bearer ${proxyAuthToken}`;
24417
+ headers[proxyAuthTokenHeader] = `Bearer ${proxyAuthToken}`;
24415
24418
  }
24416
24419
  const proxyHealthResponse = await fetch(proxyHealthUrl, { headers });
24417
24420
  const proxyHealth = await proxyHealthResponse.json();
@@ -24472,10 +24475,10 @@ function useConnection({
24472
24475
  headers[authHeaderName] = `Bearer ${token}`;
24473
24476
  }
24474
24477
  }
24475
- const proxyAuthToken = getMCPProxyAuthToken(config);
24478
+ const { token: proxyAuthToken, header: proxyAuthTokenHeader } = getMCPProxyAuthToken(config);
24476
24479
  const proxyHeaders = {};
24477
24480
  if (proxyAuthToken) {
24478
- proxyHeaders["Authorization"] = `Bearer ${proxyAuthToken}`;
24481
+ proxyHeaders[proxyAuthTokenHeader] = `Bearer ${proxyAuthToken}`;
24479
24482
  }
24480
24483
  let transportOptions;
24481
24484
  let mcpProxyServerUrl;
@@ -35295,7 +35298,7 @@ const useTheme = () => {
35295
35298
  [theme, setThemeWithSideEffect]
35296
35299
  );
35297
35300
  };
35298
- const version = "0.14.1";
35301
+ const version = "0.14.3";
35299
35302
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
35300
35303
  createPopperScope
35301
35304
  ]);
@@ -37297,9 +37300,9 @@ const App = () => {
37297
37300
  }, [sseUrl]);
37298
37301
  reactExports.useEffect(() => {
37299
37302
  const headers = {};
37300
- const proxyAuthToken = getMCPProxyAuthToken(config);
37303
+ const { token: proxyAuthToken, header: proxyAuthTokenHeader } = getMCPProxyAuthToken(config);
37301
37304
  if (proxyAuthToken) {
37302
- headers["Authorization"] = `Bearer ${proxyAuthToken}`;
37305
+ headers[proxyAuthTokenHeader] = `Bearer ${proxyAuthToken}`;
37303
37306
  }
37304
37307
  fetch(`${getMCPProxyAddress(config)}/config`, { headers }).then((response) => response.json()).then((data2) => {
37305
37308
  setEnv(data2.defaultEnvironment);
@@ -37516,13 +37519,13 @@ const App = () => {
37516
37519
  ) });
37517
37520
  if (window.location.pathname === "/oauth/callback") {
37518
37521
  const OAuthCallback = React.lazy(
37519
- () => __vitePreload(() => import("./OAuthCallback-D7GXYYW8.js"), true ? __vite__mapDeps([0,1]) : void 0)
37522
+ () => __vitePreload(() => import("./OAuthCallback-BrCtrNqU.js"), true ? __vite__mapDeps([0,1]) : void 0)
37520
37523
  );
37521
37524
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
37522
37525
  }
37523
37526
  if (window.location.pathname === "/oauth/callback/debug") {
37524
37527
  const OAuthDebugCallback = React.lazy(
37525
- () => __vitePreload(() => import("./OAuthDebugCallback-25cy6Vcm.js"), true ? __vite__mapDeps([2,1]) : void 0)
37528
+ () => __vitePreload(() => import("./OAuthDebugCallback-CnQiL6bh.js"), true ? __vite__mapDeps([2,1]) : void 0)
37526
37529
  );
37527
37530
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
37528
37531
  }
@@ -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-TghXC4TH.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DYfnI33L.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-C1MLjTGf.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/inspector",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "Model Context Protocol inspector",
5
5
  "license": "MIT",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
@@ -38,12 +38,14 @@
38
38
  "prettier-check": "prettier --check .",
39
39
  "lint": "prettier --check . && cd client && npm run lint",
40
40
  "prepare": "npm run build",
41
- "publish-all": "npm publish --workspaces --access public && npm publish --access public"
41
+ "publish-all": "npm publish --workspaces --access public && npm publish --access public",
42
+ "update-version": "node scripts/update-version.js",
43
+ "check-version": "node scripts/check-version-consistency.js"
42
44
  },
43
45
  "dependencies": {
44
- "@modelcontextprotocol/inspector-cli": "^0.14.1",
45
- "@modelcontextprotocol/inspector-client": "^0.14.1",
46
- "@modelcontextprotocol/inspector-server": "^0.14.1",
46
+ "@modelcontextprotocol/inspector-cli": "^0.14.3",
47
+ "@modelcontextprotocol/inspector-client": "^0.14.3",
48
+ "@modelcontextprotocol/inspector-server": "^0.14.3",
47
49
  "@modelcontextprotocol/sdk": "^1.12.1",
48
50
  "concurrently": "^9.0.1",
49
51
  "open": "^10.1.0",
@@ -97,12 +97,15 @@ const authMiddleware = (req, res, next) => {
97
97
  message: "Authentication required. Use the session token shown in the console when starting the server.",
98
98
  });
99
99
  };
100
- const authHeader = req.headers.authorization;
101
- if (!authHeader || !authHeader.startsWith("Bearer ")) {
100
+ const authHeader = req.headers["x-mcp-proxy-auth"];
101
+ const authHeaderValue = Array.isArray(authHeader)
102
+ ? authHeader[0]
103
+ : authHeader;
104
+ if (!authHeaderValue || !authHeaderValue.startsWith("Bearer ")) {
102
105
  sendUnauthorized();
103
106
  return;
104
107
  }
105
- const providedToken = authHeader.substring(7); // Remove 'Bearer ' prefix
108
+ const providedToken = authHeaderValue.substring(7); // Remove 'Bearer ' prefix
106
109
  const expectedToken = sessionToken;
107
110
  // Convert to buffers for timing-safe comparison
108
111
  const providedBuffer = Buffer.from(providedToken);
@@ -142,7 +145,7 @@ const createTransport = async (req) => {
142
145
  else if (transportType === "sse") {
143
146
  const url = query.url;
144
147
  const headers = getHttpHeaders(req, transportType);
145
- console.log(`SSE transport: url=${url}, headers=${Object.keys(headers)}`);
148
+ console.log(`SSE transport: url=${url}, headers=${JSON.stringify(headers)}`);
146
149
  const transport = new SSEClientTransport(new URL(url), {
147
150
  eventSourceInit: {
148
151
  fetch: (url, init) => fetch(url, { ...init, headers }),