servers icon indicating copy to clipboard operation
servers copied to clipboard

mcp-server-memory: use working directory for default path

Open solatis opened this issue 6 months ago • 1 comments

Changes the default behavior from using the installation path (which is not guaranteed to remain stable, e.g., when using npx) to the current working directory.

Description

Server Details

  • Server: memory
  • Changes to: default values

Motivation and Context

It's still difficult to properly pass-through environment variables using mcp.json files, even more so when they're based on the current working directory (non-static).

With this PR applied, the default location will be in whatever location I launch the tool that invokes it, which seems more reasonable a default.

How Has This Been Tested?

I am using it with aider.

Breaking Changes

The previous default was non-stable to begin with (every upgrade would cause the entire memory to be lost), so impact is minimal.

Checklist

  • [x] I have read the MCP Protocol Documentation
  • [x] My changes follows MCP security best practices
  • [x] I have updated the server's README accordingly
  • [x] I have tested this with an LLM client
  • [x] My code follows the repository's style guidelines
  • [x] New and existing tests pass locally
  • [x] I have added appropriate error handling
  • [x] I have documented all environment variables and configuration options

solatis avatar Jun 19 '25 04:06 solatis

Yes, please. "MEMORY_FILE_PATH": "./memory.json" writes to /home/user/.npm/_npx/15b07286cbcc3329/node_modules/@modelcontextprotocol/server-memory/dist/memory.json... which is not really git friendly :joy:

Extarys avatar Jul 04 '25 23:07 Extarys