@modelcontextprotocol/inspector 0.2.7 → 0.3.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/README.md CHANGED
@@ -26,6 +26,8 @@ The inspector runs both a client UI (default port 5173) and an MCP proxy server
26
26
  CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector build/index.js
27
27
  ```
28
28
 
29
+ For more details on ways to use the inspector, see the [Inspector section of the MCP docs site](https://modelcontextprotocol.io/docs/tools/inspector).
30
+
29
31
  ### From this repository
30
32
 
31
33
  If you're working on the inspector itself:
@@ -12165,7 +12165,7 @@ class Protocol {
12165
12165
  this._progressHandlers.delete(messageId);
12166
12166
  (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send({
12167
12167
  jsonrpc: "2.0",
12168
- method: "cancelled",
12168
+ method: "notifications/cancelled",
12169
12169
  params: {
12170
12170
  requestId: messageId,
12171
12171
  reason: String(reason)
@@ -16523,6 +16523,7 @@ Textarea.displayName = "Textarea";
16523
16523
  const ListPane = ({
16524
16524
  items,
16525
16525
  listItems,
16526
+ clearItems,
16526
16527
  setSelectedItem,
16527
16528
  renderItem,
16528
16529
  title,
@@ -16541,6 +16542,16 @@ const ListPane = ({
16541
16542
  children: buttonText
16542
16543
  }
16543
16544
  ),
16545
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16546
+ Button,
16547
+ {
16548
+ variant: "outline",
16549
+ className: "w-full mb-4",
16550
+ onClick: clearItems,
16551
+ disabled: items.length === 0,
16552
+ children: "Clear"
16553
+ }
16554
+ ),
16544
16555
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 overflow-y-auto max-h-96", children: items.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
16545
16556
  "div",
16546
16557
  {
@@ -16555,6 +16566,7 @@ const ListPane = ({
16555
16566
  const PromptsTab = ({
16556
16567
  prompts,
16557
16568
  listPrompts,
16569
+ clearPrompts,
16558
16570
  getPrompt,
16559
16571
  selectedPrompt,
16560
16572
  setSelectedPrompt,
@@ -16578,6 +16590,7 @@ const PromptsTab = ({
16578
16590
  {
16579
16591
  items: prompts,
16580
16592
  listItems: listPrompts,
16593
+ clearItems: clearPrompts,
16581
16594
  setSelectedItem: (prompt) => {
16582
16595
  setSelectedPrompt(prompt);
16583
16596
  setPromptArgs({});
@@ -16632,7 +16645,9 @@ const ResourcesTab = ({
16632
16645
  resources,
16633
16646
  resourceTemplates,
16634
16647
  listResources,
16648
+ clearResources,
16635
16649
  listResourceTemplates,
16650
+ clearResourceTemplates,
16636
16651
  readResource,
16637
16652
  selectedResource,
16638
16653
  setSelectedResource,
@@ -16666,6 +16681,7 @@ const ResourcesTab = ({
16666
16681
  {
16667
16682
  items: resources,
16668
16683
  listItems: listResources,
16684
+ clearItems: clearResources,
16669
16685
  setSelectedItem: (resource) => {
16670
16686
  setSelectedResource(resource);
16671
16687
  readResource(resource.uri);
@@ -16686,6 +16702,7 @@ const ResourcesTab = ({
16686
16702
  {
16687
16703
  items: resourceTemplates,
16688
16704
  listItems: listResourceTemplates,
16705
+ clearItems: clearResourceTemplates,
16689
16706
  setSelectedItem: (template) => {
16690
16707
  setSelectedTemplate(template);
16691
16708
  setSelectedResource(null);
@@ -21680,7 +21697,7 @@ const useTheme = () => {
21680
21697
  }, [])
21681
21698
  ];
21682
21699
  };
21683
- const version = "0.2.7";
21700
+ const version = "0.3.0";
21684
21701
  const Sidebar = ({
21685
21702
  connectionStatus,
21686
21703
  transportType,
@@ -21870,6 +21887,7 @@ const Sidebar = ({
21870
21887
  const ToolsTab = ({
21871
21888
  tools,
21872
21889
  listTools,
21890
+ clearTools,
21873
21891
  callTool,
21874
21892
  selectedTool,
21875
21893
  setSelectedTool,
@@ -21930,6 +21948,7 @@ const ToolsTab = ({
21930
21948
  {
21931
21949
  items: tools,
21932
21950
  listItems: listTools,
21951
+ clearItems: clearTools,
21933
21952
  setSelectedItem: setSelectedTool,
21934
21953
  renderItem: (tool) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
21935
21954
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1", children: tool.name }),
@@ -22002,6 +22021,7 @@ const ToolsTab = ({
22002
22021
  const DEFAULT_REQUEST_TIMEOUT_MSEC = 1e4;
22003
22022
  const params = new URLSearchParams(window.location.search);
22004
22023
  const PROXY_PORT = params.get("proxyPort") ?? "3000";
22024
+ const REQUEST_TIMEOUT = parseInt(params.get("timeout") ?? "") || DEFAULT_REQUEST_TIMEOUT_MSEC;
22005
22025
  const PROXY_SERVER_URL = `http://localhost:${PROXY_PORT}`;
22006
22026
  const App = () => {
22007
22027
  const [connectionStatus, setConnectionStatus] = reactExports.useState("disconnected");
@@ -22139,7 +22159,7 @@ const App = () => {
22139
22159
  const abortController = new AbortController();
22140
22160
  const timeoutId = setTimeout(() => {
22141
22161
  abortController.abort("Request timed out");
22142
- }, DEFAULT_REQUEST_TIMEOUT_MSEC);
22162
+ }, REQUEST_TIMEOUT);
22143
22163
  let response;
22144
22164
  try {
22145
22165
  response = await mcpClient.request(request, schema, {
@@ -22392,10 +22412,18 @@ const App = () => {
22392
22412
  clearError("resources");
22393
22413
  listResources();
22394
22414
  },
22415
+ clearResources: () => {
22416
+ setResources([]);
22417
+ setNextResourceCursor(void 0);
22418
+ },
22395
22419
  listResourceTemplates: () => {
22396
22420
  clearError("resources");
22397
22421
  listResourceTemplates();
22398
22422
  },
22423
+ clearResourceTemplates: () => {
22424
+ setResourceTemplates([]);
22425
+ setNextResourceTemplateCursor(void 0);
22426
+ },
22399
22427
  readResource: (uri) => {
22400
22428
  clearError("resources");
22401
22429
  readResource(uri);
@@ -22419,6 +22447,10 @@ const App = () => {
22419
22447
  clearError("prompts");
22420
22448
  listPrompts();
22421
22449
  },
22450
+ clearPrompts: () => {
22451
+ setPrompts([]);
22452
+ setNextPromptCursor(void 0);
22453
+ },
22422
22454
  getPrompt: (name, args2) => {
22423
22455
  clearError("prompts");
22424
22456
  getPrompt(name, args2);
@@ -22441,6 +22473,10 @@ const App = () => {
22441
22473
  clearError("tools");
22442
22474
  listTools();
22443
22475
  },
22476
+ clearTools: () => {
22477
+ setTools([]);
22478
+ setNextToolCursor(void 0);
22479
+ },
22444
22480
  callTool: (name, params2) => {
22445
22481
  clearError("tools");
22446
22482
  callTool(name, params2);
@@ -835,7 +835,7 @@
835
835
  --tw-contain-paint: ;
836
836
  --tw-contain-style: ;
837
837
  }/*
838
- ! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com
838
+ ! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com
839
839
  *//*
840
840
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
841
841
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -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-YNuSiS5v.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DY7RF803.css">
8
+ <script type="module" crossorigin src="/assets/index-BKN3G2r3.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DxcZhiGz.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/inspector",
3
- "version": "0.2.7",
3
+ "version": "0.3.0",
4
4
  "description": "Model Context Protocol inspector",
5
5
  "license": "MIT",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
@@ -33,8 +33,8 @@
33
33
  "publish-all": "npm publish --workspaces --access public && npm publish --access public"
34
34
  },
35
35
  "dependencies": {
36
- "@modelcontextprotocol/inspector-client": "0.2.7",
37
- "@modelcontextprotocol/inspector-server": "0.2.7",
36
+ "@modelcontextprotocol/inspector-client": "0.3.0",
37
+ "@modelcontextprotocol/inspector-server": "0.3.0",
38
38
  "concurrently": "^9.0.1",
39
39
  "spawn-rx": "^5.1.0",
40
40
  "ts-node": "^10.9.2"