Skip to content

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

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 3 commits into
base: main
Choose a base branch
from

Conversation

solatis
Copy link

@solatis solatis commented Jun 19, 2025

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

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

@Extarys
Copy link

Extarys commented Jul 4, 2025

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 😂

@olaservo olaservo added enhancement New feature or request server-memory Reference implementation for the Memory MCP server - src/memory labels Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server-memory Reference implementation for the Memory MCP server - src/memory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants