memory: the README's Docker upgrade advice leaves the container with no index.js

Open Beginner friendly
#5,457 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, typescript

Research direction

Start with src/memory/README.md and inspect the Docker build and volume setup described there. Choose an upgrade path that preserves memory.jsonl while ensuring the container runs the new image's code, and explain any migration steps for existing data. Done when the documented upgrade works with a populated claude-memory volume.

Written by the indexing model from the issue text.

Description

documentation server-memory v2

Problem

src/memory/README.md ("Building") says:

For Awareness: a prior mcp/memory volume contains an index.js file that could be overwritten by the new container. If you are using a docker volume for storage, delete the old docker volume's index.js file before starting the new container.

Following it breaks the container instead of upgrading it. The documented setup mounts the named volume claude-memory over /app/dist, the image's code directory. Docker seeds a named volume from the image only while the volume is empty, so once the volume holds memory.jsonl the image's new dist/ is never copied in: deleting index.js leaves /app/dist with no entry point.

The reverse holds too: as long as index.js stays in the volume, every newer image keeps running the code from the first image that populated it. #5346 (closed, not planned) noted that shadowing while deciding to keep the default graph location.

Reproduce

Found while verifying #5345, with both the v2/main image and the #5345 image:

docker build -f src/memory/Dockerfile -t mcp/memory .
# create a graph so the volume is non-empty, then follow the README:
docker run --rm -v claude-memory:/v alpine rm /v/index.js /v/version.js
docker run -i --rm -v claude-memory:/app/dist mcp/memory
# node:internal/modules/cjs/loader ... Cannot find module '/app/dist/index.js'

Expected

The README gives upgrade advice that works. Delete the volume's *.js files and copy the new image's dist/*.js into the volume, keeping memory.jsonl. Or point Docker users at a volume on its own directory with MEMORY_FILE_PATH, and explain how to move an existing memory.jsonl there. The second option does not change the server's default, which #5346 kept.

Dominant language
TypeScript
Stars
91.7k
Forks
11.9k
Avg merge
3h 48m
Merged PRs (30d)
180

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/servers

All issues in modelcontextprotocol/servers

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.