@mcpjam/inspector 0.3.0 → 0.3.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/README.md CHANGED
@@ -33,6 +33,21 @@ npx @mcpjam/inspector@latest
33
33
 
34
34
  That's it! The inspector will launch automatically in your browser at `http://localhost:6274`.
35
35
 
36
+ ### Running with Docker
37
+ You can also run the inspector using Docker. First, make sure you have Docker installed and running.
38
+
39
+ Pull the latest image from Docker Hub:
40
+ ```bash
41
+ docker pull mcpjam/mcp-inspector:main
42
+ ```
43
+
44
+ Then, run the container:
45
+ ```bash
46
+ docker run --rm -p 6274:6274 -p 6277:6277 mcpjam/mcp-inspector:main
47
+ ```
48
+
49
+ The inspector will be available in your browser at `http://127.0.0.1:6274`.
50
+
36
51
  ---
37
52
 
38
53
  ## 📸 Screenshots
@@ -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-CdlQwnmd.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-kMl05fui.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-CdlQwnmd.js";
1
+ import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-kMl05fui.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-CdxuZKBm.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-BJaIMNT8.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-mxRvi54D.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-CjHmkokp.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -18267,7 +18267,11 @@ const JsonNode = reactExports.memo(
18267
18267
  }
18268
18268
  );
18269
18269
  JsonNode.displayName = "JsonNode";
18270
- const RequestHistoryItem = ({ request, index: index2, totalRequests }) => {
18270
+ const RequestHistoryItem = ({
18271
+ request,
18272
+ index: index2,
18273
+ totalRequests
18274
+ }) => {
18271
18275
  const [isExpanded, setIsExpanded] = reactExports.useState(false);
18272
18276
  const toggleExpansion = () => {
18273
18277
  setIsExpanded(!isExpanded);
@@ -18309,7 +18313,15 @@ const RequestHistoryItem = ({ request, index: index2, totalRequests }) => {
18309
18313
  )
18310
18314
  ] });
18311
18315
  };
18312
- const RequestHeader = ({ requestNumber, method, server, timestamp, latency, isExpanded, onToggle }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
18316
+ const RequestHeader = ({
18317
+ requestNumber,
18318
+ method,
18319
+ server,
18320
+ timestamp,
18321
+ latency,
18322
+ isExpanded,
18323
+ onToggle
18324
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
18313
18325
  "header",
18314
18326
  {
18315
18327
  className: "flex justify-between items-center cursor-pointer group",
@@ -18325,12 +18337,27 @@ const RequestHeader = ({ requestNumber, method, server, timestamp, latency, isEx
18325
18337
  "aria-expanded": isExpanded,
18326
18338
  "aria-label": `Request ${requestNumber}: ${method}`,
18327
18339
  children: [
18328
- /* @__PURE__ */ jsxRuntimeExports.jsx(RequestInfo, { requestNumber, method, server, timestamp, latency }),
18340
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18341
+ RequestInfo,
18342
+ {
18343
+ requestNumber,
18344
+ method,
18345
+ server,
18346
+ timestamp,
18347
+ latency
18348
+ }
18349
+ ),
18329
18350
  /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandIcon, { isExpanded })
18330
18351
  ]
18331
18352
  }
18332
18353
  );
18333
- const RequestInfo = ({ requestNumber, method, server, timestamp, latency }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-3", children: [
18354
+ const RequestInfo = ({
18355
+ requestNumber,
18356
+ method,
18357
+ server,
18358
+ timestamp,
18359
+ latency
18360
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-3", children: [
18334
18361
  /* @__PURE__ */ jsxRuntimeExports.jsx(RequestBadge, { number: requestNumber }),
18335
18362
  /* @__PURE__ */ jsxRuntimeExports.jsx(TimeStamp, { timestamp }),
18336
18363
  /* @__PURE__ */ jsxRuntimeExports.jsx(MethodLabel, { method, server }),
@@ -18518,7 +18545,11 @@ const ToolResult = ({ toolResult }) => {
18518
18545
  }
18519
18546
  return null;
18520
18547
  };
18521
- const ResultsTab = ({ toolResult, onToggleCollapse, showHeader = true }) => {
18548
+ const ResultsTab = ({
18549
+ toolResult,
18550
+ onToggleCollapse,
18551
+ showHeader = true
18552
+ }) => {
18522
18553
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex-1 overflow-y-auto ${showHeader ? "p-6" : ""}`, children: [
18523
18554
  showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-6", children: [
18524
18555
  /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-lg font-bold text-foreground flex items-center space-x-2", children: [
@@ -29119,7 +29150,7 @@ const useTheme = () => {
29119
29150
  [theme, setThemeWithSideEffect]
29120
29151
  );
29121
29152
  };
29122
- const version$1 = "0.3.0";
29153
+ const version$1 = "0.3.1";
29123
29154
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
29124
29155
  createPopperScope
29125
29156
  ]);
@@ -30045,7 +30076,7 @@ const SettingsTab = ({
30045
30076
  } catch (error) {
30046
30077
  console.warn("Failed to load API key from localStorage:", error);
30047
30078
  }
30048
- }, [onApiKeyChange]);
30079
+ }, []);
30049
30080
  const validateApiKey = (key) => {
30050
30081
  const claudeApiKeyPattern = /^sk-ant-api03-[A-Za-z0-9_-]+$/;
30051
30082
  return claudeApiKeyPattern.test(key) && key.length > 20;
@@ -30180,7 +30211,9 @@ function validateMCPConfigStructure(config) {
30180
30211
  const mcpServers = config.mcpServers;
30181
30212
  const serverNames = Object.keys(mcpServers);
30182
30213
  if (serverNames.length === 0) {
30183
- errors.push('"mcpServers" object is empty. Please add at least one server configuration');
30214
+ errors.push(
30215
+ '"mcpServers" object is empty. Please add at least one server configuration'
30216
+ );
30184
30217
  }
30185
30218
  return { isGlobal: true, isSingleNamed: false, errors };
30186
30219
  }
@@ -30277,17 +30310,25 @@ function parseConfigFile(jsonString) {
30277
30310
  errors: []
30278
30311
  };
30279
30312
  if (!isValidJSON(jsonString)) {
30280
- result.errors.push("Invalid JSON format. Please check for missing quotes, commas, or brackets");
30313
+ result.errors.push(
30314
+ "Invalid JSON format. Please check for missing quotes, commas, or brackets"
30315
+ );
30281
30316
  return result;
30282
30317
  }
30283
30318
  let parsedConfig;
30284
30319
  try {
30285
30320
  parsedConfig = JSON.parse(jsonString);
30286
30321
  } catch (error) {
30287
- result.errors.push(`JSON parsing error: ${error instanceof Error ? error.message : String(error)}`);
30322
+ result.errors.push(
30323
+ `JSON parsing error: ${error instanceof Error ? error.message : String(error)}`
30324
+ );
30288
30325
  return result;
30289
30326
  }
30290
- const { isGlobal, isSingleNamed, errors: structureErrors } = validateMCPConfigStructure(parsedConfig);
30327
+ const {
30328
+ isGlobal,
30329
+ isSingleNamed,
30330
+ errors: structureErrors
30331
+ } = validateMCPConfigStructure(parsedConfig);
30291
30332
  if (structureErrors.length > 0) {
30292
30333
  result.errors.push(...structureErrors);
30293
30334
  return result;
@@ -30296,7 +30337,9 @@ function parseConfigFile(jsonString) {
30296
30337
  const allErrors = [];
30297
30338
  if (isGlobal) {
30298
30339
  const validConfig = parsedConfig;
30299
- for (const [serverName, serverConfig] of Object.entries(validConfig.mcpServers)) {
30340
+ for (const [serverName, serverConfig] of Object.entries(
30341
+ validConfig.mcpServers
30342
+ )) {
30300
30343
  if (typeof serverName !== "string" || serverName.trim() === "") {
30301
30344
  allErrors.push("Server names must be non-empty strings");
30302
30345
  continue;
@@ -30321,7 +30364,10 @@ function parseConfigFile(jsonString) {
30321
30364
  } else if (isSingleNamed) {
30322
30365
  const serverConfig = parsedConfig;
30323
30366
  const serverName = Object.keys(serverConfig)[0];
30324
- const validationErrors = validateServerConfig(serverName, serverConfig[serverName]);
30367
+ const validationErrors = validateServerConfig(
30368
+ serverName,
30369
+ serverConfig[serverName]
30370
+ );
30325
30371
  if (validationErrors.length > 0) {
30326
30372
  allErrors.push(...validationErrors);
30327
30373
  } else {
@@ -30372,7 +30418,9 @@ const ConfigImportDialog = ({
30372
30418
  onImportServers
30373
30419
  }) => {
30374
30420
  const [configText, setConfigText] = reactExports.useState("");
30375
- const [parseResult, setParseResult] = reactExports.useState(null);
30421
+ const [parseResult, setParseResult] = reactExports.useState(
30422
+ null
30423
+ );
30376
30424
  const [isValidating, setIsValidating] = reactExports.useState(false);
30377
30425
  const { toast: toast2 } = useToast();
30378
30426
  const handleConfigChange = reactExports.useCallback((value) => {
@@ -30396,7 +30444,9 @@ const ConfigImportDialog = ({
30396
30444
  setParseResult({
30397
30445
  success: false,
30398
30446
  servers: [],
30399
- errors: [`Unexpected error: ${error instanceof Error ? error.message : String(error)}`]
30447
+ errors: [
30448
+ `Unexpected error: ${error instanceof Error ? error.message : String(error)}`
30449
+ ]
30400
30450
  });
30401
30451
  } finally {
30402
30452
  setIsValidating(false);
@@ -30578,18 +30628,10 @@ or
30578
30628
  ] }) })
30579
30629
  ] }),
30580
30630
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 pt-4 border-t", children: [
30581
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
30582
- Button,
30583
- {
30584
- variant: "outline",
30585
- onClick: handleClose,
30586
- className: "flex-1",
30587
- children: [
30588
- /* @__PURE__ */ jsxRuntimeExports.jsx(X$1, { className: "h-4 w-4 mr-2" }),
30589
- "Cancel"
30590
- ]
30591
- }
30592
- ),
30631
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", onClick: handleClose, className: "flex-1", children: [
30632
+ /* @__PURE__ */ jsxRuntimeExports.jsx(X$1, { className: "h-4 w-4 mr-2" }),
30633
+ "Cancel"
30634
+ ] }),
30593
30635
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
30594
30636
  Button,
30595
30637
  {
@@ -42394,7 +42436,7 @@ Anthropic.Models = Models2;
42394
42436
  Anthropic.Beta = Beta;
42395
42437
  const { HUMAN_PROMPT, AI_PROMPT } = Anthropic;
42396
42438
  const readline = {};
42397
- const version = "0.3.0";
42439
+ const version = "0.3.1";
42398
42440
  const packageJson = {
42399
42441
  version
42400
42442
  };
@@ -45826,7 +45868,7 @@ const App = () => {
45826
45868
  }, []);
45827
45869
  if (window.location.pathname === "/oauth/callback") {
45828
45870
  const OAuthCallback = React.lazy(
45829
- () => __vitePreload(() => import("./OAuthCallback-CdxuZKBm.js"), true ? __vite__mapDeps([0,1]) : void 0)
45871
+ () => __vitePreload(() => import("./OAuthCallback-mxRvi54D.js"), true ? __vite__mapDeps([0,1]) : void 0)
45830
45872
  );
45831
45873
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
45832
45874
  reactExports.Suspense,
@@ -45841,7 +45883,7 @@ const App = () => {
45841
45883
  }
45842
45884
  if (window.location.pathname === "/oauth/callback/debug") {
45843
45885
  const OAuthDebugCallback = React.lazy(
45844
- () => __vitePreload(() => import("./OAuthDebugCallback-BJaIMNT8.js"), true ? __vite__mapDeps([2,1]) : void 0)
45886
+ () => __vitePreload(() => import("./OAuthDebugCallback-CjHmkokp.js"), true ? __vite__mapDeps([2,1]) : void 0)
45845
45887
  );
45846
45888
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
45847
45889
  reactExports.Suspense,
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/mcp_jam.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>MCPJam Inspector</title>
8
- <script type="module" crossorigin src="/assets/index-CdlQwnmd.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-kMl05fui.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-De3JSks9.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpjam/inspector",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MCPJam inspector",
5
5
  "license": "Apache-2.0",
6
6
  "author": "MCPJam (https://mcpjam.com)",
@@ -59,7 +59,7 @@
59
59
  "@types/node": "^22.15.21",
60
60
  "@types/shell-quote": "^1.7.5",
61
61
  "jest-fixed-jsdom": "^0.0.9",
62
- "prettier": "3.3.3",
62
+ "prettier": "^3.3.3",
63
63
  "rimraf": "^6.0.1",
64
64
  "typescript": "^5.8.3"
65
65
  }