# JamesANZ/memory-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/JamesANZ/memory-mcp  
**GitHub Stars:** 23  
**npm Downloads (last month):** 51  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jamesanz-memory-mcp

## Description
An MCP server that stores and retrieves memories from multiple LLMs using MongoDB. Provides tools for saving, retrieving, adding, and clearing conversation memories with timestamps and LLM identification.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "memory-mcp": {
    "command": "npx",
    "args": ["-y","@jamesanz/memory-mcp"],
    "env": {
      "MEMORY_DB_PATH": "",
      "MEMORY_MODEL_CACHE_DIR": ""
    }
  }
}
```

**Requires environment variables:** `MEMORY_DB_PATH`, `MEMORY_MODEL_CACHE_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What JamesANZ/memory-mcp does

JamesANZ/memory-mcp gives MCP-compatible AI clients a local memory layer built around two related storage patterns. Knowledge graph memory represents entities, observations, and directed relationships. Conversation memory stores logs and archived context that can be searched or summarized later.

The server is designed for coding environments such as Cursor and Claude Desktop. Its local storage model keeps the graph database and embedding model cache on the machine running the server, avoiding a separate MongoDB, Neo4j, or other database service.

## How it works

KuzuDB stores the graph in `~/.memory-mcp/graph_db` by default. When graph memories are stored, the server can upsert entities with names, types, and observations, along with typed relationships between entities. It also creates local 384-dimensional embeddings using `Xenova/all-MiniLM-L6-v2`.

A memory query combines vector similarity with Cypher graph traversal. Semantic matching identifies relevant entry nodes, then the server follows related edges for a configurable number of hops and returns the connected subgraph and memory chunks. This approach is useful when a fact is relevant both by meaning and by its relationship to other stored facts.

Archived conversation context can carry tags and embeddings. The server supports relevance scoring, tag searches, summaries, and graph links between summaries and the content they describe. Conversation memories can also be appended with automatic entity mention extraction.

## Setup and configuration

Install the published package globally with npm:

```bash
npm install -g @jamesanz/memory-mcp
```

Alternatively, clone the repository, install dependencies, and build it with `npm install` followed by `npm run build`.

For Claude Desktop, configure the server as a local Node.js process and point `args` to the absolute path of `build/index.js`:

```json
{
  "mcpServers": {
    "memory-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/memory-mcp/build/index.js"]
    }
  }
}
```

The Cursor installation can use the provided MCP install link, or the server can be configured manually. Set `MEMORY_DB_PATH` to move the graph database and `MEMORY_MODEL_CACHE_DIR` to choose where the local embedding model cache is stored.

## Tools and capabilities

- `store-graph-memory` upserts entities, observations, and typed relations.
- `query-memory` combines semantic matching with multi-hop graph traversal.
- `remove-graph-entities` deletes entities or selected relationships.
- `save-memories`, `get-memories`, `add-memories`, and `clear-memories` manage basic conversation memories.
- `archive-context`, `retrieve-context`, and `score-relevance` handle archived context and similarity scoring.
- `create-summary`, `get-conversation-summaries`, and `search-context-by-tags` support summaries and tag-based retrieval.

## Limitations and notes

The default data directory is local to the host running the MCP process, as is the embedding model cache. Changing either location requires setting the corresponding environment variable before starting the server. Clearing memories removes stored memory logs and graph entities, while graph removal tools are available for more targeted cleanup.

The server uses an embedded KuzuDB database and local HuggingFace embeddings rather than a separately managed database or remote embedding service. Graph queries can limit traversal depth and result count, allowing callers to constrain how much connected memory is returned.

_Full upstream README: https://allmcps.com/mcp/jamesanz-memory-mcp/readme_

