Skip to content

Commit 397a0f6

Browse files
committed
feat: Fetch version from package.json in useConnection hook
1 parent 0281e5f commit 397a0f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/src/lib/hooks/useConnection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { SESSION_KEYS } from "../constants";
2626
import { Notification, StdErrNotificationSchema } from "../notificationTypes";
2727
import { auth } from "@modelcontextprotocol/sdk/client/auth.js";
2828
import { authProvider } from "../auth";
29+
import packageJson from "../../../package.json";
2930

3031
const params = new URLSearchParams(window.location.search);
3132
const DEFAULT_REQUEST_TIMEOUT_MSEC =
@@ -205,7 +206,7 @@ export function useConnection({
205206
const client = new Client<Request, Notification, Result>(
206207
{
207208
name: "mcp-inspector",
208-
version: "0.0.1",
209+
version: packageJson.version,
209210
},
210211
{
211212
capabilities: {

0 commit comments

Comments
 (0)