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

MCP memory server NO persistent memory.json location! Complete Failure #220

Open
shaneholloman opened this issue Dec 4, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@shaneholloman
Copy link

shaneholloman commented Dec 4, 2024

Persistent Data Location

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:

    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
      "env": {
        "MCP_MEMORY_DATA_FILE": "c:\\super\\safe\\persistent\\location\\memory.jsonl"
    },

Describe alternatives you've considered

n/a

Additional context

you're doing incredible work! Love the protocol so much ...

@shaneholloman shaneholloman added the enhancement New feature or request label Dec 4, 2024
@shaneholloman shaneholloman changed the title MCP memory server has a poor persistent memory.json location! MCP memory server NO persistent memory.json location! Complete Failure Dec 6, 2024
@shaneholloman
Copy link
Author

shaneholloman commented Dec 6, 2024

The memory does not persist - therefore, is not in fact, is not memory at all. I know that may sound snarky. I don't mean it that way. Just being direct. Maybe, I spend to much time talking to Ai ...

@greenforestpath
Copy link

greenforestpath commented Dec 7, 2024

im also having trouble figuring out how to save to memory.json

create_entities seems to do nothing to actually save the file.

so close :) - but currrently not functional

@shaneholloman
Copy link
Author

shaneholloman commented 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
Copy link
Author

I updated the server name, as I intend to develop my own version from here;

    "mcp-knowledge-graph": {
      "command": "npx",
      "args": ["-y", "mcp-knowledge-graph", "--memory-path", "C:/Users/shane/Desktop/memory/memory.jsonl"]
    },

these are now separate servers - DONT run them together yet as I will need to use unique function name before you can do that.

image

so remove the original if you want to use mine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants