@modelcontextprotocol/inspector 0.17.5 → 0.19.0

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.
@@ -281,7 +281,7 @@ pre[class*="language-"] {
281
281
  --tw-contain-paint: ;
282
282
  --tw-contain-style: ;
283
283
  }/*
284
- ! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com
284
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
285
285
  *//*
286
286
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
287
287
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -863,10 +863,17 @@ video {
863
863
  .row-auto {
864
864
  grid-row: auto;
865
865
  }
866
+ .m-0 {
867
+ margin: 0px;
868
+ }
866
869
  .-mx-1 {
867
870
  margin-left: -0.25rem;
868
871
  margin-right: -0.25rem;
869
872
  }
873
+ .mx-auto {
874
+ margin-left: auto;
875
+ margin-right: auto;
876
+ }
870
877
  .my-1 {
871
878
  margin-top: 0.25rem;
872
879
  margin-bottom: 0.25rem;
@@ -953,6 +960,9 @@ video {
953
960
  .h-10 {
954
961
  height: 2.5rem;
955
962
  }
963
+ .h-12 {
964
+ height: 3rem;
965
+ }
956
966
  .h-2 {
957
967
  height: 0.5rem;
958
968
  }
@@ -1016,6 +1026,12 @@ video {
1016
1026
  .min-h-\[60px\] {
1017
1027
  min-height: 60px;
1018
1028
  }
1029
+ .w-1\/3 {
1030
+ width: 33.333333%;
1031
+ }
1032
+ .w-12 {
1033
+ width: 3rem;
1034
+ }
1019
1035
  .w-2 {
1020
1036
  width: 0.5rem;
1021
1037
  }
@@ -1100,6 +1116,15 @@ video {
1100
1116
  .transform {
1101
1117
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1102
1118
  }
1119
+ @keyframes pulse {
1120
+
1121
+ 50% {
1122
+ opacity: .5;
1123
+ }
1124
+ }
1125
+ .animate-pulse {
1126
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
1127
+ }
1103
1128
  @keyframes spin {
1104
1129
 
1105
1130
  to {
@@ -1534,6 +1559,9 @@ video {
1534
1559
  .font-semibold {
1535
1560
  font-weight: 600;
1536
1561
  }
1562
+ .capitalize {
1563
+ text-transform: capitalize;
1564
+ }
1537
1565
  .italic {
1538
1566
  font-style: italic;
1539
1567
  }
@@ -1667,6 +1695,14 @@ video {
1667
1695
  --tw-text-opacity: 1;
1668
1696
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
1669
1697
  }
1698
+ .text-yellow-500 {
1699
+ --tw-text-opacity: 1;
1700
+ color: rgb(234 179 8 / var(--tw-text-opacity, 1));
1701
+ }
1702
+ .text-yellow-600 {
1703
+ --tw-text-opacity: 1;
1704
+ color: rgb(202 138 4 / var(--tw-text-opacity, 1));
1705
+ }
1670
1706
  .text-yellow-800 {
1671
1707
  --tw-text-opacity: 1;
1672
1708
  color: rgb(133 77 14 / var(--tw-text-opacity, 1));
@@ -1680,6 +1716,9 @@ video {
1680
1716
  .opacity-100 {
1681
1717
  opacity: 1;
1682
1718
  }
1719
+ .opacity-20 {
1720
+ opacity: 0.2;
1721
+ }
1683
1722
  .opacity-50 {
1684
1723
  opacity: 0.5;
1685
1724
  }
@@ -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-CneFQkmB.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DH5T2nDo.css">
8
+ <script type="module" crossorigin src="/assets/index-3HVc23AL.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-6PUMPh30.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root" class="w-full"></div>
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/inspector",
3
- "version": "0.17.5",
3
+ "version": "0.19.0",
4
4
  "description": "Model Context Protocol inspector",
5
- "license": "MIT",
6
- "author": "Anthropic, PBC (https://anthropic.com)",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "author": "Model Context Protocol a Series of LF Projects, LLC.",
7
7
  "homepage": "https://modelcontextprotocol.io",
8
8
  "bugs": "https://github.com/modelcontextprotocol/inspector/issues",
9
9
  "type": "module",
@@ -47,10 +47,10 @@
47
47
  "check-version": "node scripts/check-version-consistency.js"
48
48
  },
49
49
  "dependencies": {
50
- "@modelcontextprotocol/inspector-cli": "^0.17.5",
51
- "@modelcontextprotocol/inspector-client": "^0.17.5",
52
- "@modelcontextprotocol/inspector-server": "^0.17.5",
53
- "@modelcontextprotocol/sdk": "^1.23.0",
50
+ "@modelcontextprotocol/inspector-cli": "^0.19.0",
51
+ "@modelcontextprotocol/inspector-client": "^0.19.0",
52
+ "@modelcontextprotocol/inspector-server": "^0.19.0",
53
+ "@modelcontextprotocol/sdk": "^1.25.2",
54
54
  "concurrently": "^9.2.0",
55
55
  "node-fetch": "^3.3.2",
56
56
  "open": "^10.2.0",
@@ -8,7 +8,7 @@ const fetch = nodeFetch;
8
8
  const Headers = NodeHeaders;
9
9
  import { SSEClientTransport, SseError, } from "@modelcontextprotocol/sdk/client/sse.js";
10
10
  import { StdioClientTransport, getDefaultEnvironment, } from "@modelcontextprotocol/sdk/client/stdio.js";
11
- import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
11
+ import { StreamableHTTPClientTransport, StreamableHTTPError, } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
12
12
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
13
13
  import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
14
14
  import express from "express";
@@ -30,6 +30,21 @@ const { values } = parseArgs({
30
30
  "server-url": { type: "string", default: "" },
31
31
  },
32
32
  });
33
+ /**
34
+ * Helper function to detect 401 Unauthorized errors from various transport types.
35
+ * StreamableHTTPClientTransport throws a generic Error with "HTTP 401" in the message
36
+ * when there's no authProvider configured, while SSEClientTransport throws SseError.
37
+ */
38
+ const is401Error = (error) => {
39
+ if (error instanceof SseError && error.code === 401)
40
+ return true;
41
+ if (error instanceof StreamableHTTPError && error.code === 401)
42
+ return true;
43
+ if (error instanceof Error &&
44
+ (error.message.includes("HTTP 401") || error.message.includes("(401)")))
45
+ return true;
46
+ return false;
47
+ };
33
48
  // Function to get HTTP headers.
34
49
  const getHttpHeaders = (req) => {
35
50
  const headers = {};
@@ -388,8 +403,8 @@ app.post("/mcp", originValidationMiddleware, authMiddleware, async (req, res) =>
388
403
  await webAppTransport.handleRequest(req, res, req.body);
389
404
  }
390
405
  catch (error) {
391
- if (error instanceof SseError && error.code === 401) {
392
- console.error("Received 401 Unauthorized from MCP server:", error.message);
406
+ if (is401Error(error)) {
407
+ console.error("Received 401 Unauthorized from MCP server:", error instanceof Error ? error.message : error);
393
408
  res.status(401).json(error);
394
409
  return;
395
410
  }
@@ -521,7 +536,7 @@ app.get("/stdio", originValidationMiddleware, authMiddleware, async (req, res) =
521
536
  });
522
537
  }
523
538
  catch (error) {
524
- if (error instanceof SseError && error.code === 401) {
539
+ if (is401Error(error)) {
525
540
  console.error("Received 401 Unauthorized from MCP server. Authentication failure.");
526
541
  res.status(401).json(error);
527
542
  return;
@@ -552,7 +567,7 @@ app.get("/sse", originValidationMiddleware, authMiddleware, async (req, res) =>
552
567
  });
553
568
  }
554
569
  catch (error) {
555
- if (error instanceof SseError && error.code === 401) {
570
+ if (is401Error(error)) {
556
571
  console.error("Received 401 Unauthorized from MCP server. Authentication failure.");
557
572
  res.status(401).json(error);
558
573
  return;
@@ -26,7 +26,9 @@ export default function mcpProxy({ transportToClient, transportToServer, }) {
26
26
  id: message.id,
27
27
  error: {
28
28
  code: -32001,
29
- message: error.message,
29
+ message: error.cause
30
+ ? `${error.message} (cause: ${error.cause})`
31
+ : error.message,
30
32
  data: error,
31
33
  },
32
34
  };