import { readFileSync } from "node:fs";
import { dirname as dirname$1, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { isESModule } from "@intlayer/config";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";

//#region src/client/client.ts
const dirname = isESModule ? dirname$1(fileURLToPath(import.meta.url)) : __dirname;
const packageJson = JSON.parse(readFileSync(resolve(dirname, "../../../package.json"), "utf8"));
const loadClient = () => new Client({
	name: `mcp-client-for-intlayer-mcp-server`,
	version: packageJson.version
});

//#endregion
export { dirname, loadClient };
//# sourceMappingURL=client.mjs.map