@modelcontextprotocol/inspector-client 0.12.0 → 0.13.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.
package/bin/start.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import open from "open";
3
4
  import { resolve, dirname } from "path";
4
5
  import { spawnPromise } from "spawn-rx";
5
6
  import { fileURLToPath } from "url";
@@ -99,6 +100,9 @@ async function main() {
99
100
 
100
101
  if (serverOk) {
101
102
  try {
103
+ if (process.env.MCP_AUTO_OPEN_ENABLED !== "false") {
104
+ open(`http://127.0.0.1:${CLIENT_PORT}`);
105
+ }
102
106
  await spawnPromise("node", [inspectorClientPath], {
103
107
  env: { ...process.env, PORT: CLIENT_PORT },
104
108
  signal: abort.signal,
@@ -1,33 +1,5 @@
1
- import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-CHwMp9hp.js";
2
- const parseOAuthCallbackParams = (location) => {
3
- const params = new URLSearchParams(location);
4
- const code = params.get("code");
5
- if (code) {
6
- return { successful: true, code };
7
- }
8
- const error = params.get("error");
9
- const error_description = params.get("error_description");
10
- const error_uri = params.get("error_uri");
11
- if (error) {
12
- return { successful: false, error, error_description, error_uri };
13
- }
14
- return {
15
- successful: false,
16
- error: "invalid_request",
17
- error_description: "Missing code or error in response",
18
- error_uri: null
19
- };
20
- };
21
- const generateOAuthErrorDescription = (params) => {
22
- const error = params.error;
23
- const errorDescription = params.error_description;
24
- const errorUri = params.error_uri;
25
- return [
26
- `Error: ${error}.`,
27
- errorDescription ? `Details: ${errorDescription}.` : "",
28
- errorUri ? `More info: ${errorUri}.` : ""
29
- ].filter(Boolean).join("\n");
30
- };
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-Dhd4mhZ2.js";
2
+ import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
31
3
  const OAuthCallback = ({ onConnect }) => {
32
4
  const { toast } = useToast();
33
5
  const hasProcessedRef = reactExports.useRef(false);
@@ -0,0 +1,45 @@
1
+ import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-Dhd4mhZ2.js";
2
+ import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
3
+ const OAuthDebugCallback = ({ onConnect }) => {
4
+ reactExports.useEffect(() => {
5
+ let isProcessed = false;
6
+ const handleCallback = async () => {
7
+ if (isProcessed) {
8
+ return;
9
+ }
10
+ isProcessed = true;
11
+ const params = parseOAuthCallbackParams(window.location.search);
12
+ if (!params.successful) {
13
+ const errorMsg = generateOAuthErrorDescription(params);
14
+ onConnect({ errorMsg });
15
+ return;
16
+ }
17
+ const serverUrl = sessionStorage.getItem(SESSION_KEYS.SERVER_URL);
18
+ if (!serverUrl) {
19
+ return;
20
+ }
21
+ if (!params.code) {
22
+ onConnect({ errorMsg: "Missing authorization code" });
23
+ return;
24
+ }
25
+ onConnect({ authorizationCode: params.code });
26
+ };
27
+ handleCallback().finally(() => {
28
+ if (sessionStorage.getItem(SESSION_KEYS.SERVER_URL)) {
29
+ window.history.replaceState({}, document.title, "/");
30
+ }
31
+ });
32
+ return () => {
33
+ isProcessed = true;
34
+ };
35
+ }, [onConnect]);
36
+ const callbackParams = parseOAuthCallbackParams(window.location.search);
37
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-screen", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 p-4 bg-secondary rounded-md max-w-md", children: [
38
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mb-2 text-sm", children: "Please copy this authorization code and return to the Auth Debugger:" }),
39
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "block p-2 bg-muted rounded-sm overflow-x-auto text-xs", children: callbackParams.successful && "code" in callbackParams ? callbackParams.code : `No code found: ${callbackParams.error}, ${callbackParams.error_description}` }),
40
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-xs text-muted-foreground", children: "Close this tab and paste the code in the OAuth flow to complete authentication." })
41
+ ] }) });
42
+ };
43
+ export {
44
+ OAuthDebugCallback as default
45
+ };
@@ -838,6 +838,9 @@ video {
838
838
  .mb-4 {
839
839
  margin-bottom: 1rem;
840
840
  }
841
+ .mb-6 {
842
+ margin-bottom: 1.5rem;
843
+ }
841
844
  .ml-1 {
842
845
  margin-left: 0.25rem;
843
846
  }
@@ -847,6 +850,9 @@ video {
847
850
  .ml-4 {
848
851
  margin-left: 1rem;
849
852
  }
853
+ .ml-7 {
854
+ margin-left: 1.75rem;
855
+ }
850
856
  .ml-auto {
851
857
  margin-left: auto;
852
858
  }
@@ -862,12 +868,18 @@ video {
862
868
  .mt-2 {
863
869
  margin-top: 0.5rem;
864
870
  }
871
+ .mt-3 {
872
+ margin-top: 0.75rem;
873
+ }
865
874
  .mt-4 {
866
875
  margin-top: 1rem;
867
876
  }
868
877
  .block {
869
878
  display: block;
870
879
  }
880
+ .inline {
881
+ display: inline;
882
+ }
871
883
  .flex {
872
884
  display: flex;
873
885
  }
@@ -902,6 +914,9 @@ video {
902
914
  .h-4 {
903
915
  height: 1rem;
904
916
  }
917
+ .h-5 {
918
+ height: 1.25rem;
919
+ }
905
920
  .h-8 {
906
921
  height: 2rem;
907
922
  }
@@ -953,6 +968,9 @@ video {
953
968
  .w-4 {
954
969
  width: 1rem;
955
970
  }
971
+ .w-5 {
972
+ width: 1.25rem;
973
+ }
956
974
  .w-72 {
957
975
  width: 18rem;
958
976
  }
@@ -983,6 +1001,9 @@ video {
983
1001
  .max-w-lg {
984
1002
  max-width: 32rem;
985
1003
  }
1004
+ .max-w-md {
1005
+ max-width: 28rem;
1006
+ }
986
1007
  .flex-1 {
987
1008
  flex: 1 1 0%;
988
1009
  }
@@ -1038,6 +1059,9 @@ video {
1038
1059
  .flex-col-reverse {
1039
1060
  flex-direction: column-reverse;
1040
1061
  }
1062
+ .items-start {
1063
+ align-items: flex-start;
1064
+ }
1041
1065
  .items-center {
1042
1066
  align-items: center;
1043
1067
  }
@@ -1056,9 +1080,15 @@ video {
1056
1080
  .gap-2 {
1057
1081
  gap: 0.5rem;
1058
1082
  }
1083
+ .gap-3 {
1084
+ gap: 0.75rem;
1085
+ }
1059
1086
  .gap-4 {
1060
1087
  gap: 1rem;
1061
1088
  }
1089
+ .gap-6 {
1090
+ gap: 1.5rem;
1091
+ }
1062
1092
  .space-x-2 > :not([hidden]) ~ :not([hidden]) {
1063
1093
  --tw-space-x-reverse: 0;
1064
1094
  margin-right: calc(0.5rem * var(--tw-space-x-reverse));
@@ -1084,12 +1114,20 @@ video {
1084
1114
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
1085
1115
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
1086
1116
  }
1117
+ .space-y-6 > :not([hidden]) ~ :not([hidden]) {
1118
+ --tw-space-y-reverse: 0;
1119
+ margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
1120
+ margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
1121
+ }
1087
1122
  .overflow-auto {
1088
1123
  overflow: auto;
1089
1124
  }
1090
1125
  .overflow-hidden {
1091
1126
  overflow: hidden;
1092
1127
  }
1128
+ .overflow-x-auto {
1129
+ overflow-x: auto;
1130
+ }
1093
1131
  .overflow-y-auto {
1094
1132
  overflow-y: auto;
1095
1133
  }
@@ -1140,6 +1178,10 @@ video {
1140
1178
  .border-t {
1141
1179
  border-top-width: 1px;
1142
1180
  }
1181
+ .border-blue-200 {
1182
+ --tw-border-opacity: 1;
1183
+ border-color: rgb(191 219 254 / var(--tw-border-opacity, 1));
1184
+ }
1143
1185
  .border-border {
1144
1186
  border-color: hsl(var(--border));
1145
1187
  }
@@ -1153,22 +1195,41 @@ video {
1153
1195
  --tw-border-opacity: 1;
1154
1196
  border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
1155
1197
  }
1198
+ .border-green-200 {
1199
+ --tw-border-opacity: 1;
1200
+ border-color: rgb(187 247 208 / var(--tw-border-opacity, 1));
1201
+ }
1156
1202
  .border-input {
1157
1203
  border-color: hsl(var(--input));
1158
1204
  }
1159
1205
  .border-primary {
1160
1206
  border-color: hsl(var(--primary));
1161
1207
  }
1208
+ .border-red-200 {
1209
+ --tw-border-opacity: 1;
1210
+ border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));
1211
+ }
1212
+ .border-red-300 {
1213
+ --tw-border-opacity: 1;
1214
+ border-color: rgb(252 165 165 / var(--tw-border-opacity, 1));
1215
+ }
1162
1216
  .border-red-500 {
1163
1217
  --tw-border-opacity: 1;
1164
1218
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
1165
1219
  }
1220
+ .bg-accent {
1221
+ background-color: hsl(var(--accent));
1222
+ }
1166
1223
  .bg-background {
1167
1224
  background-color: hsl(var(--background));
1168
1225
  }
1169
1226
  .bg-black\/80 {
1170
1227
  background-color: rgb(0 0 0 / 0.8);
1171
1228
  }
1229
+ .bg-blue-50 {
1230
+ --tw-bg-opacity: 1;
1231
+ background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
1232
+ }
1172
1233
  .bg-border {
1173
1234
  background-color: hsl(var(--border));
1174
1235
  }
@@ -1190,6 +1251,10 @@ video {
1190
1251
  --tw-bg-opacity: 1;
1191
1252
  background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
1192
1253
  }
1254
+ .bg-green-50 {
1255
+ --tw-bg-opacity: 1;
1256
+ background-color: rgb(240 253 244 / var(--tw-bg-opacity, 1));
1257
+ }
1193
1258
  .bg-green-500 {
1194
1259
  --tw-bg-opacity: 1;
1195
1260
  background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1));
@@ -1203,6 +1268,10 @@ video {
1203
1268
  .bg-primary {
1204
1269
  background-color: hsl(var(--primary));
1205
1270
  }
1271
+ .bg-red-50 {
1272
+ --tw-bg-opacity: 1;
1273
+ background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));
1274
+ }
1206
1275
  .bg-red-500 {
1207
1276
  --tw-bg-opacity: 1;
1208
1277
  background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
@@ -1222,6 +1291,9 @@ video {
1222
1291
  .p-2 {
1223
1292
  padding: 0.5rem;
1224
1293
  }
1294
+ .p-3 {
1295
+ padding: 0.75rem;
1296
+ }
1225
1297
  .p-4 {
1226
1298
  padding: 1rem;
1227
1299
  }
@@ -1283,15 +1355,19 @@ video {
1283
1355
  .pt-4 {
1284
1356
  padding-top: 1rem;
1285
1357
  }
1358
+ .text-left {
1359
+ text-align: left;
1360
+ }
1286
1361
  .text-center {
1287
1362
  text-align: center;
1288
1363
  }
1289
- .text-right {
1290
- text-align: right;
1291
- }
1292
1364
  .font-mono {
1293
1365
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1294
1366
  }
1367
+ .text-2xl {
1368
+ font-size: 1.5rem;
1369
+ line-height: 2rem;
1370
+ }
1295
1371
  .text-lg {
1296
1372
  font-size: 1.125rem;
1297
1373
  line-height: 1.75rem;
@@ -1329,10 +1405,18 @@ video {
1329
1405
  --tw-text-opacity: 1;
1330
1406
  color: rgb(217 119 6 / var(--tw-text-opacity, 1));
1331
1407
  }
1408
+ .text-blue-500 {
1409
+ --tw-text-opacity: 1;
1410
+ color: rgb(59 130 246 / var(--tw-text-opacity, 1));
1411
+ }
1332
1412
  .text-blue-600 {
1333
1413
  --tw-text-opacity: 1;
1334
1414
  color: rgb(37 99 235 / var(--tw-text-opacity, 1));
1335
1415
  }
1416
+ .text-blue-700 {
1417
+ --tw-text-opacity: 1;
1418
+ color: rgb(29 78 216 / var(--tw-text-opacity, 1));
1419
+ }
1336
1420
  .text-current {
1337
1421
  color: currentColor;
1338
1422
  }
@@ -1372,10 +1456,18 @@ video {
1372
1456
  --tw-text-opacity: 1;
1373
1457
  color: rgb(17 24 39 / var(--tw-text-opacity, 1));
1374
1458
  }
1459
+ .text-green-500 {
1460
+ --tw-text-opacity: 1;
1461
+ color: rgb(34 197 94 / var(--tw-text-opacity, 1));
1462
+ }
1375
1463
  .text-green-600 {
1376
1464
  --tw-text-opacity: 1;
1377
1465
  color: rgb(22 163 74 / var(--tw-text-opacity, 1));
1378
1466
  }
1467
+ .text-green-700 {
1468
+ --tw-text-opacity: 1;
1469
+ color: rgb(21 128 61 / var(--tw-text-opacity, 1));
1470
+ }
1379
1471
  .text-muted-foreground {
1380
1472
  color: hsl(var(--muted-foreground));
1381
1473
  }
@@ -1400,6 +1492,10 @@ video {
1400
1492
  --tw-text-opacity: 1;
1401
1493
  color: rgb(220 38 38 / var(--tw-text-opacity, 1));
1402
1494
  }
1495
+ .text-red-700 {
1496
+ --tw-text-opacity: 1;
1497
+ color: rgb(185 28 28 / var(--tw-text-opacity, 1));
1498
+ }
1403
1499
  .text-secondary-foreground {
1404
1500
  color: hsl(var(--secondary-foreground));
1405
1501
  }
@@ -1458,6 +1554,13 @@ video {
1458
1554
  .filter {
1459
1555
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1460
1556
  }
1557
+ .transition {
1558
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
1559
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
1560
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
1561
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1562
+ transition-duration: 150ms;
1563
+ }
1461
1564
  .transition-all {
1462
1565
  transition-property: all;
1463
1566
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -1643,6 +1746,11 @@ h1 {
1643
1746
  color: hsl(var(--accent-foreground));
1644
1747
  }
1645
1748
 
1749
+ .hover\:text-blue-700:hover {
1750
+ --tw-text-opacity: 1;
1751
+ color: rgb(29 78 216 / var(--tw-text-opacity, 1));
1752
+ }
1753
+
1646
1754
  .hover\:text-foreground:hover {
1647
1755
  color: hsl(var(--foreground));
1648
1756
  }