// src/version.ts
import { readFileSync } from "fs";
function readMcpPackageVersion() {
  const packageJsonUrl = new URL("../package.json", import.meta.url);
  const parsed = JSON.parse(readFileSync(packageJsonUrl, "utf-8"));
  if (typeof parsed.version !== "string" || parsed.version.length === 0) {
    throw new Error("packages/mcp/package.json must define a version string");
  }
  return parsed.version;
}
export {
  readMcpPackageVersion
};
