diff --git a/src/memory/index.ts b/src/memory/index.ts index 9865c5318e..7521ff8702 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -8,6 +8,12 @@ import { promises as fs } from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; + + +import { createRequire } from 'node:module'; +const require = createRequire(import.meta.url); +const PACKAGE_VERSION: string = require('../package.json').version; + // Define memory file path using environment variable with fallback export const defaultMemoryPath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'memory.jsonl'); @@ -256,7 +262,7 @@ const RelationSchema = z.object({ // The server instance and tools exposed to Claude const server = new McpServer({ name: "memory-server", - version: "0.6.3", + version: PACKAGE_VERSION, }); const RESOURCE_URI = "memory://knowledge-graph"; diff --git a/src/memory/package.json b/src/memory/package.json index e32d25a3e2..55e2f1d5fa 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -25,7 +25,8 @@ "test": "vitest run --coverage" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.29.0" + "@modelcontextprotocol/sdk": "^1.29.0", + "zod": "^3" }, "devDependencies": { "@types/node": "^22", @@ -34,4 +35,4 @@ "typescript": "^5.6.2", "vitest": "^4.1.8" } -} \ No newline at end of file +} diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index a88de803b5..d782f346c9 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -27,7 +27,8 @@ "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", "chalk": "^5.3.0", - "yargs": "^17.7.2" + "yargs": "^17.7.2", + "zod": "^3" }, "devDependencies": { "@types/node": "^22", @@ -37,4 +38,4 @@ "typescript": "^5.3.3", "vitest": "^4.1.8" } -} \ No newline at end of file +}