From 59504ac336608f18570008e571977c9f245514d1 Mon Sep 17 00:00:00 2001 From: Alejandro Borbolla Date: Thu, 31 Jul 2025 00:31:34 +0200 Subject: [PATCH 1/7] refactor: Add `useCopy()` The `useCopy()` hook is pretty simple, as it handle a state variable (`copied`) and put it back to false after a `timeout` --- client/src/lib/hooks/useCopy.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 client/src/lib/hooks/useCopy.ts diff --git a/client/src/lib/hooks/useCopy.ts b/client/src/lib/hooks/useCopy.ts new file mode 100644 index 00000000..8dd7e401 --- /dev/null +++ b/client/src/lib/hooks/useCopy.ts @@ -0,0 +1,29 @@ +"use client"; + +import { useEffect, useState } from "react"; + +type UseCopyProps = { + timeout?: number; +}; + +function useCopy({ timeout = 500 }: UseCopyProps = {}) { + const [copied, setCopied] = useState(false); + + useEffect(() => { + let timeoutId: NodeJS.Timeout; + if (copied) { + timeoutId = setTimeout(() => { + setCopied(false); + }, timeout); + } + return () => { + if (timeoutId) { + clearTimeout(timeoutId); + } + }; + }, [copied]); + + return { copied, setCopied }; +} + +export default useCopy; From 8589faa4c4b6c201c6ece7bcc563f9cccee49a5f Mon Sep 17 00:00:00 2001 From: Alejandro Borbolla Date: Thu, 31 Jul 2025 00:32:39 +0200 Subject: [PATCH 2/7] refactor: Use `useCopy()` in `JsonView` --- client/src/components/JsonView.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/client/src/components/JsonView.tsx b/client/src/components/JsonView.tsx index e9ef0d2d..7cb38667 100644 --- a/client/src/components/JsonView.tsx +++ b/client/src/components/JsonView.tsx @@ -5,6 +5,7 @@ import { Copy, CheckCheck } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useToast } from "@/lib/hooks/useToast"; import { getDataType, tryParseJson } from "@/utils/jsonUtils"; +import useCopy from "@/lib/hooks/useCopy"; interface JsonViewProps { data: unknown; @@ -25,21 +26,7 @@ const JsonView = memo( isError = false, }: JsonViewProps) => { const { toast } = useToast(); - const [copied, setCopied] = useState(false); - - useEffect(() => { - let timeoutId: NodeJS.Timeout; - if (copied) { - timeoutId = setTimeout(() => { - setCopied(false); - }, 500); - } - return () => { - if (timeoutId) { - clearTimeout(timeoutId); - } - }; - }, [copied]); + const { copied, setCopied } = useCopy(); const normalizedData = useMemo(() => { return typeof data === "string" From 5bbd9f736dd38916f812e7eac96e92f720e93561 Mon Sep 17 00:00:00 2001 From: Alejandro Borbolla Date: Thu, 31 Jul 2025 00:32:56 +0200 Subject: [PATCH 3/7] feat: Copy the input parameters of tools --- client/src/components/ToolsTab.tsx | 84 +++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 2eb682e5..04bd0465 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -13,11 +13,20 @@ import { ListToolsResult, Tool, } from "@modelcontextprotocol/sdk/types.js"; -import { Loader2, Send, ChevronDown, ChevronUp } from "lucide-react"; +import { + Loader2, + Send, + ChevronDown, + ChevronUp, + Copy, + CheckCheck, +} from "lucide-react"; import { useEffect, useState } from "react"; import ListPane from "./ListPane"; import JsonView from "./JsonView"; import ToolResults from "./ToolResults"; +import { useToast } from "@/lib/hooks/useToast"; +import useCopy from "@/lib/hooks/useCopy"; // Type guard to safely detect the optional _meta field without using `any` const hasMeta = (tool: Tool): tool is Tool & { _meta: unknown } => @@ -51,6 +60,8 @@ const ToolsTab = ({ const [isToolRunning, setIsToolRunning] = useState(false); const [isOutputSchemaExpanded, setIsOutputSchemaExpanded] = useState(false); const [isMetaExpanded, setIsMetaExpanded] = useState(false); + const { toast } = useToast(); + const { copied, setCopied } = useCopy(); useEffect(() => { const params = Object.entries( @@ -284,29 +295,54 @@ const ToolsTab = ({ )} - +
+ + +
Date: Mon, 1 Sep 2025 18:31:52 +0200 Subject: [PATCH 4/7] fix: Assess PR comments (typo) --- client/src/components/ToolsTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index acabd733..377521ae 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -336,7 +336,7 @@ const ToolsTab = ({ } catch (error) { toast({ title: "Error", - description: `There was an error coping result into the clipboard: ${error instanceof Error ? error.message : String(error)}`, + description: `There was an error copying input to the clipboard: ${error instanceof Error ? error.message : String(error)}`, variant: "destructive", }); } From 2fd781ab8187fe36a16c36639860b5dd7ad26735 Mon Sep 17 00:00:00 2001 From: Alejandro Borbolla Date: Mon, 1 Sep 2025 18:32:16 +0200 Subject: [PATCH 5/7] fix: CI by removing unused `useEffect` --- client/src/components/JsonView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/JsonView.tsx b/client/src/components/JsonView.tsx index 7cb38667..1febff6a 100644 --- a/client/src/components/JsonView.tsx +++ b/client/src/components/JsonView.tsx @@ -1,4 +1,4 @@ -import { useState, memo, useMemo, useCallback, useEffect } from "react"; +import { useState, memo, useMemo, useCallback } from "react"; import type { JsonValue } from "@/utils/jsonUtils"; import clsx from "clsx"; import { Copy, CheckCheck } from "lucide-react"; From ca26a4f7a9024e4ae69273076b3ae9be7023a89b Mon Sep 17 00:00:00 2001 From: cliffhall Date: Thu, 11 Sep 2025 16:41:03 -0400 Subject: [PATCH 6/7] Bumped TS SDK in all the packages to ^1.18.0 --- cli/package.json | 2 +- client/package.json | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- server/package.json | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cli/package.json b/cli/package.json index 506b1856..cd88a46a 100644 --- a/cli/package.json +++ b/cli/package.json @@ -24,7 +24,7 @@ }, "devDependencies": {}, "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "commander": "^13.1.0", "spawn-rx": "^5.1.2" } diff --git a/client/package.json b/client/package.json index 61f65b62..09f853d7 100644 --- a/client/package.json +++ b/client/package.json @@ -25,7 +25,7 @@ "cleanup:e2e": "node e2e/global-teardown.js" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "@radix-ui/react-checkbox": "^1.1.4", "@radix-ui/react-dialog": "^1.1.3", "@radix-ui/react-icons": "^1.3.0", diff --git a/package-lock.json b/package-lock.json index 91385dd4..242f0ce5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@modelcontextprotocol/inspector-cli": "^0.16.6", "@modelcontextprotocol/inspector-client": "^0.16.6", "@modelcontextprotocol/inspector-server": "^0.16.6", - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "concurrently": "^9.2.0", "open": "^10.2.0", "shell-quote": "^1.8.3", @@ -49,7 +49,7 @@ "version": "0.16.6", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "commander": "^13.1.0", "spawn-rx": "^5.1.2" }, @@ -72,7 +72,7 @@ "version": "0.16.6", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "@radix-ui/react-checkbox": "^1.1.4", "@radix-ui/react-dialog": "^1.1.3", "@radix-ui/react-icons": "^1.3.0", @@ -2011,9 +2011,9 @@ "link": true }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.5.tgz", - "integrity": "sha512-QakrKIGniGuRVfWBdMsDea/dx1PNE739QJ7gCM41s9q+qaCYTHCdsIBXQVVXry3mfWAiaM9kT22Hyz53Uw8mfg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.18.0.tgz", + "integrity": "sha512-JvKyB6YwS3quM+88JPR0axeRgvdDu3Pv6mdZUy+w4qVkCzGgumb9bXG/TmtDRQv+671yaofVfXSQmFLlWU5qPQ==", "license": "MIT", "dependencies": { "ajv": "^6.12.6", @@ -11749,7 +11749,7 @@ "version": "0.16.6", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "cors": "^2.8.5", "express": "^5.1.0", "ws": "^8.18.0", diff --git a/package.json b/package.json index 860a4bf3..25df40c8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@modelcontextprotocol/inspector-cli": "^0.16.6", "@modelcontextprotocol/inspector-client": "^0.16.6", "@modelcontextprotocol/inspector-server": "^0.16.6", - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "concurrently": "^9.2.0", "open": "^10.2.0", "shell-quote": "^1.8.3", diff --git a/server/package.json b/server/package.json index 39cc08f1..0f7426a5 100644 --- a/server/package.json +++ b/server/package.json @@ -27,7 +27,7 @@ "typescript": "^5.6.2" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.17.5", + "@modelcontextprotocol/sdk": "^1.18.0", "cors": "^2.8.5", "express": "^5.1.0", "ws": "^8.18.0", From 1c5f5e4839b9963e8933936f1acd8e557bdbfae7 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:30:54 +0000 Subject: [PATCH 7/7] chore: bump version to 0.16.7 Co-authored-by: Ola Hungerford --- cli/package.json | 2 +- client/package.json | 2 +- package-lock.json | 16 ++++++++-------- package.json | 8 ++++---- server/package.json | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cli/package.json b/cli/package.json index cd88a46a..caf21a3e 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-cli", - "version": "0.16.6", + "version": "0.16.7", "description": "CLI for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/client/package.json b/client/package.json index 09f853d7..fd6fc698 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-client", - "version": "0.16.6", + "version": "0.16.7", "description": "Client-side application for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/package-lock.json b/package-lock.json index 242f0ce5..e2070a9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@modelcontextprotocol/inspector", - "version": "0.16.6", + "version": "0.16.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@modelcontextprotocol/inspector", - "version": "0.16.6", + "version": "0.16.7", "license": "MIT", "workspaces": [ "client", @@ -14,9 +14,9 @@ "cli" ], "dependencies": { - "@modelcontextprotocol/inspector-cli": "^0.16.6", - "@modelcontextprotocol/inspector-client": "^0.16.6", - "@modelcontextprotocol/inspector-server": "^0.16.6", + "@modelcontextprotocol/inspector-cli": "^0.16.7", + "@modelcontextprotocol/inspector-client": "^0.16.7", + "@modelcontextprotocol/inspector-server": "^0.16.7", "@modelcontextprotocol/sdk": "^1.18.0", "concurrently": "^9.2.0", "open": "^10.2.0", @@ -46,7 +46,7 @@ }, "cli": { "name": "@modelcontextprotocol/inspector-cli", - "version": "0.16.6", + "version": "0.16.7", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.18.0", @@ -69,7 +69,7 @@ }, "client": { "name": "@modelcontextprotocol/inspector-client", - "version": "0.16.6", + "version": "0.16.7", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.18.0", @@ -11746,7 +11746,7 @@ }, "server": { "name": "@modelcontextprotocol/inspector-server", - "version": "0.16.6", + "version": "0.16.7", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.18.0", diff --git a/package.json b/package.json index 25df40c8..48609a20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector", - "version": "0.16.6", + "version": "0.16.7", "description": "Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -47,9 +47,9 @@ "check-version": "node scripts/check-version-consistency.js" }, "dependencies": { - "@modelcontextprotocol/inspector-cli": "^0.16.6", - "@modelcontextprotocol/inspector-client": "^0.16.6", - "@modelcontextprotocol/inspector-server": "^0.16.6", + "@modelcontextprotocol/inspector-cli": "^0.16.7", + "@modelcontextprotocol/inspector-client": "^0.16.7", + "@modelcontextprotocol/inspector-server": "^0.16.7", "@modelcontextprotocol/sdk": "^1.18.0", "concurrently": "^9.2.0", "open": "^10.2.0", diff --git a/server/package.json b/server/package.json index 0f7426a5..b46f94fb 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-server", - "version": "0.16.6", + "version": "0.16.7", "description": "Server-side application for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)",