You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP memory server NO persistent memory.json location! #220
Is your feature request related to a problem? Please describe.
It's in the title:
Caution
Code version updates will destroy that json file!
I am very relieved I had anticipated that happening and add backup my json yesterday before a restart. Incidentally that will super hard to find that jsonfile ! lol!
current location example: C:\Users\shane\AppData\Local\npm-cache\_npx\15b07286cbcc3329\node_modules\@modelcontextprotocol\server-memory\dist\memory.json
Describe the solution you'd like
For persistent data we need to have server code that will respect a location constant:
you're doing incredible work! Love the protocol so much ...
Reacted by Lars Götte, Evangelos Stavropoulos, Enrico Ballardini, greenforestpath, Fabio Scarsi, s2005, Edoardo Bezzeccheri, Evan Villemez, Matt Greenfield, Soham Dasgupta and 2 more
changed the title [-]MCP `memory` server has a poor persistent memory.json location![/-][+]MCP `memory` server NO persistent memory.json location! Complete Failure[/+]on Dec 6, 2024
Hi,
In the end, after debugging it intensively with cline and a Claude Sonet-3.5 key, I ended up with Claude confirming that while there was an environment variable, the MCP server was indeed not actually storing data in the specified file.
I don't mean to say that this is the truth my any means, but since I needed some kind of local data storage and I was talking about it with Claude, it ended up locally rewriting the mcp with sqlite for storage. Since I'm doing this for a corporate need, I can't share the implementation though :/
So while it's very possible that you're right, that it can save to a file given the right version, I no longer have this mcp installed and I've moved on to other tasks.
Thanks for the answer anyway, I hope it can help others if they find themselves in the same situation :)
Glad that you have found way to workaround the issue!
Based on my experience, if you clone the repository directly and use version 0.6.3, you can successfully utilize MEMORY_FILE_PATH environment variable to store memory.json permanently in a secure location. However, the standard approach using the npm package (as per documentation) won't work since npm still on version 0.6.2. Not sure who should push new version to npm. I do not have such permissions. Hence, my workaround to build directly from the repository.
changed the title [-]MCP `memory` server NO persistent memory.json location! Complete Failure[/-][+]MCP `memory` server NO persistent memory.json location![/+]on Feb 13, 2025
Hi @jspahrsummers any idea when the new version of memory server will be published? Seems like every new adopter of the memory server is facing this issue because of the lack of being able to pass the MEMORY_FILE_PATH.
Activity
[-]MCP `memory` server has a poor persistent memory.json location![/-][+]MCP `memory` server NO persistent memory.json location! Complete Failure[/+]greenforestpath commentedon Dec 7, 2024
im also having trouble figuring out how to save to
memory.jsoncreate_entitiesseems to do nothing to actually save the file.so close :) - but currrently not functional
shaneholloman commentedon Dec 9, 2024
I'm not a JS dev, so I'm shy to PR this code. But nonetheless, it works for me.
here you go: https://github.com/shaneholloman/mcp-knowledge-graph
published here: https://www.npmjs.com/package/mcp-knowledge-graph
shaneholloman commentedon Dec 10, 2024
I updated the server name, as I intend to develop my own version from here;
these are now separate servers - DONT run them together yet as I will need to use unique function name before you can do that.
so remove the original if you want to use mine
JBHarvey commentedon Feb 7, 2025
Hi!
Is 'memory persistence' something planned in the pipeline?
I would really love to have the memory graph persisted!
s2005 commentedon Feb 10, 2025
Hi
kind of persistance should be working, if you specify env variable - take a look - NPX with custom setting
https://github.com/modelcontextprotocol/servers/tree/main/src/memory#npx-with-custom-setting
but seems there is a glitch between version publish in npm and repo version.
tested by running these commands -
"""
❯ npm view @modelcontextprotocol/server-memory version
0.6.2
"""
while version in repo is newer -
https://github.com/modelcontextprotocol/servers/blob/main/src/memory/package.json
"""
"version": "0.6.3",
"""
Please check version your are using and let me know about your config.
JBHarvey commentedon Feb 11, 2025
Hi,
In the end, after debugging it intensively with
clineand a Claude Sonet-3.5 key, I ended up with Claude confirming that while there was an environment variable, the MCP server was indeed not actually storing data in the specified file.I don't mean to say that this is the truth my any means, but since I needed some kind of local data storage and I was talking about it with Claude, it ended up locally rewriting the mcp with sqlite for storage. Since I'm doing this for a corporate need, I can't share the implementation though :/
So while it's very possible that you're right, that it can save to a file given the right version, I no longer have this mcp installed and I've moved on to other tasks.
Thanks for the answer anyway, I hope it can help others if they find themselves in the same situation :)
s2005 commentedon Feb 12, 2025
Hi!
Glad that you have found way to workaround the issue!
Based on my experience, if you clone the repository directly and use version 0.6.3, you can successfully utilize MEMORY_FILE_PATH environment variable to store memory.json permanently in a secure location. However, the standard approach using the npm package (as per documentation) won't work since npm still on version 0.6.2. Not sure who should push new version to npm. I do not have such permissions. Hence, my workaround to build directly from the repository.
s2005 commentedon Feb 12, 2025
here is my steps:
not sure if I provided all steps. maybe some additional are still needed ...
edobez commentedon Feb 13, 2025
I've also fell on the version trap... v0.6.3 does provide the memory location argument, but that specific version is not yet published.
Part as an exercise, part of the need to have a published package available, I created a Python port of such MCP server that behaves in the same way as the original and provides the
MEMORY_FILE_PATHenv variable.Here is the repo: https://github.com/edobez/mcp-memory-py
It doesn't need to be cloned, as the solution above, since the package is published on PyPI.
It can be simply used as:
I might add other functionalities in the future, if you are interested.
[-]MCP `memory` server NO persistent memory.json location! Complete Failure[/-][+]MCP `memory` server NO persistent memory.json location![/+]thesobercoder commentedon Feb 14, 2025
Hi @jspahrsummers any idea when the new version of memory server will be published? Seems like every new adopter of the memory server is facing this issue because of the lack of being able to pass the
MEMORY_FILE_PATH.morrelljd commentedon Mar 10, 2025
Is there a place on my computer where this is stored? I'd really like to back up my knowledge graph
BRO3886 commentedon Mar 14, 2025
https://github.com/BRO3886/mcp-memory-custom/
Went ahead and modified the code a bit to power the following use-cases:
the example prompt I am using is attached in the README
@jerome3o-anthropic please let me know if these changes can be pushed to the official repo, been working well for me across 3 different projects