Skip to content

fix: Change memory server default filename from memory.json to memory.jsonl #2567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olaservo
Copy link
Member

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

Generated with Claude Code

….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 <olaservo@users.noreply.github.com>
@olaservo olaservo added the server-memory Reference implementation for the Memory MCP server - src/memory label Aug 17, 2025
@@ -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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might this cause some weird backwards compatibility problems, e.g. if people have npx -y @modelcontextprotocol/server-memory in config, suddenly it'll seem to them like all their memories have disappeared.

Maybe we could also check before this: if no custom path is set AND memory.json exists AND memory.jsonl does not exist, move memory.json to memory.jsonl.

Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, although maybe want to address the backwards compatibility comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server-memory Reference implementation for the Memory MCP server - src/memory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory MCP uses JSONL for 'memory.json' as each line is a json format but not the entire file
2 participants