feat: Fetch version from package.json in useConnection hook

This commit is contained in:
Abdelkader Boudih
2025-03-11 13:33:45 +00:00
parent 0281e5f821
commit 397a0f651f

View File

@@ -26,6 +26,7 @@ import { SESSION_KEYS } from "../constants";
import { Notification, StdErrNotificationSchema } from "../notificationTypes";
import { auth } from "@modelcontextprotocol/sdk/client/auth.js";
import { authProvider } from "../auth";
import packageJson from "../../../package.json";
const params = new URLSearchParams(window.location.search);
const DEFAULT_REQUEST_TIMEOUT_MSEC =
@@ -205,7 +206,7 @@ export function useConnection({
const client = new Client<Request, Notification, Result>(
{
name: "mcp-inspector",
version: "0.0.1",
version: packageJson.version,
},
{
capabilities: {