From 9d8c2dfcaf17d0fd22f8a25e10f8b1f59eee457b Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:28:38 +0000 Subject: [PATCH] fix: Change memory server default filename from memory.json to memory.jsonl The Memory MCP server uses JSONL format (JSON Lines) where each line contains a separate JSON object, but was using a .json file extension. This caused IDE lint errors and confusion since the file is not valid JSON. Changes: - Update default filename in index.ts from memory.json to memory.jsonl - Update documentation references in README.md - Maintain backward compatibility for existing MEMORY_FILE_PATH configs Fixes #2361 Co-authored-by: Ola Hungerford --- src/memory/README.md | 4 ++-- src/memory/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/memory/README.md b/src/memory/README.md index 3fd59bbd79..f6e0bb89e6 100644 --- a/src/memory/README.md +++ b/src/memory/README.md @@ -173,14 +173,14 @@ The server can be configured using the following environment variables: "@modelcontextprotocol/server-memory" ], "env": { - "MEMORY_FILE_PATH": "/path/to/custom/memory.json" + "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl" } } } } ``` -- `MEMORY_FILE_PATH`: Path to the memory storage JSON file (default: `memory.json` in the server directory) +- `MEMORY_FILE_PATH`: Path to the memory storage JSONL file (default: `memory.jsonl` in the server directory) # VS Code Installation Instructions diff --git a/src/memory/index.ts b/src/memory/index.ts index 4590a1db6f..3c69bd3faa 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -11,7 +11,7 @@ import path from 'path'; import { fileURLToPath } from 'url'; // Define memory file path using environment variable with fallback -const defaultMemoryPath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'memory.json'); +const defaultMemoryPath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'memory.jsonl'); // If MEMORY_FILE_PATH is just a filename, put it in the same directory as the script const MEMORY_FILE_PATH = process.env.MEMORY_FILE_PATH