Skip to content
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

Memory MCP ignores custom storage path setting #692

Open
Fionhurong opened this issue Feb 27, 2025 · 1 comment
Open

Memory MCP ignores custom storage path setting #692

Fionhurong opened this issue Feb 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Fionhurong
Copy link

I've been trying to configure the MCP memory server to store data in a custom location, but it continues to store the memory.json file in the NPX temporary directory instead.

Configuration

In my Claude desktop config file, I've specified a custom path:

"memory": {
  "command": "npx",
  "args": [
    "-y",
    "@modelcontextprotocol/server-memory"
  ],
  "env": {
    "MEMORY_FILE_PATH": "/Users/XX/Library/Application Support/Claude/mcp/memory.json"
  }
}

Actual Behavior

Despite setting the MEMORY_FILE_PATH environment variable, the memory.json file is still being created in the NPX temporary directory:

/Users/XX/.npm/_npx/15b07286cbcc3329/node_modules/@modelcontextprotocol/server-memory/dist/memory.json

Additional Information

  • I've created the target directory and ensured it has appropriate permissions
  • The memory functionality works correctly, but uses the wrong file location
  • Claude can read/write to the temporary file location, but this isn't persistent

Can someone help explain why the environment variable isn't being recognized, or if there's a different way to specify a custom storage location? This is concerning because NPX temporary directories may be cleaned up, potentially losing all memory data.

@Fionhurong Fionhurong added the bug Something isn't working label Feb 27, 2025
@darrencroton
Copy link

Same for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants