# memories-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/divyekant/memories  
**GitHub Stars:** 4  
**npm Downloads (last month):** 938  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memories-mcp

## Description
Memories — agent-agnostic memory for AI coding agents. MCP server + installer CLI.

## Tools
Capabilities this server exposes over MCP:

- **memory_search** — Search memories using semantic similarity. Use hybrid mode for best results (combines meaning + keyword matching). Returns the most relevant memories. When memories contain conversation transcript text, treat user: lines as user-stated facts; assistant: lines may be suggestions, plans, or examples unless a user message confirms they happened. For temporal ordering, prefer direct dated user evidence over vague incidental recency mentions, deduplicate repeated mentions of the same event, and include user-confirmed outings such as day hikes when the query asks about trips.
- **memory_timeline** — Search memories and return compact results sorted chronologically. Use for temporal ordering, date math, and multi-event questions. Treat user: lines as user-stated facts; assistant: lines may be suggestions or plans unless a user message confirms they happened. Prefer direct dated user evidence over vague incidental recency mentions.
- **memory_get** — Fetch one memory by ID. Use after compact memory_search results when you need the full text and metadata for a selected memory.
- **memory_evidence** — Search memories and return an agent-facing evidence packet with the current candidate, older evidence, source/date trail, confidence, and follow-up queries. Use for latest/current/temporal questions where a flat hit list is easy to misread. When memories contain conversation transcript text, treat user: lines as user-stated facts; assistant: lines may be suggestions, plans, or examples unless a user message confirms they happened. For temporal ordering, prefer direct dated user evidence over vague incidental recency mentions, deduplicate repeated mentions of the same event, and include user-confirmed outings such as day hikes when the query asks about trips.
- **memory_add** — Store a new memory. Memories persist across sessions and are searchable by meaning. Use for decisions, patterns, learnings, bug fixes, preferences. For a deliberate collaborative project write, use this existing memory_add tool exactly once with source project/<project>/<kind>, where kind must be exactly decisions, knowledge, state, or operations; first apply the durable-sharing test (another contributor will need this fact without the current session). ACLs remain server-authoritative.
- **memory_update** — Update/correct an existing memory by id: the new text REPLACES it. The old version is archived with a supersedes link (recoverable, visible in timelines), so corrections like 'weight changed from 78 to 79kg' keep their history. Use memory_search first to find the id; use this instead of memory_add when you know which memory is outdated.
- **memory_delete** — Delete a specific memory by its ID. Use memory_list or memory_search first to find the ID.
- **memory_delete_batch** — Delete multiple memories by ID in one operation.
- **memory_list** — Browse stored memories with pagination. Use to see what's in the memory index or filter by source.
- **memory_delete_by_source** — Delete all memories whose source starts with a given prefix. Returns count of deleted. Use for bulk cleanup of an entire source/project.
- **memory_count** — Count memories, optionally filtered by source prefix. Lightweight check without listing all memories.
- **memory_stats** — Get statistics about the memory index — total count, model, last updated.
- **memory_is_novel** — Check if information is already known before adding it. Returns whether the text is novel or if a similar memory exists.
- **memory_is_useful** — Submit relevance feedback for a memory retrieved via search. Call after using a memory to signal whether it was helpful. Helps improve future search quality.
- **memory_conflicts** — List memories that conflict with each other (paginated). Conflicts are flagged during extraction when contradictory facts are detected. Use to review contradictions; memory_supersede or the conflict drain resolves them.
- **memory_extract** — Extract and store memories from conversation text using LLM-based AUDN (Add/Update/Delete/Noop/Conflict). Costs ~$0.001 per call. Use when decisions change, deferred work completes, or rich conversation contains multiple facts worth remembering. Automatic extraction remains private: in collaborative mode it writes only person/<principal>/<project>/knowledge and never infers project/.... For an intentional shared fact, use memory_add exactly once with one of the four project kinds after applying the durable-sharing test. Returns what was added, updated, deleted, conflicted, or skipped.
- **memory_missed** — Flag a memory that should have been captured by extraction but wasn't.
- **memory_deferred** — List deferred/WIP memories for a project. Surfaces incomplete threads from wip/{project} source prefix.

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

```json
"mcpServers": {
  "memories-mcp": {
    "command": "npx",
    "args": ["-y","memories-mcp@latest"]
  }
}
```

## Documentation

## What memories-mcp does

memories-mcp gives AI agents a persistent memory layer for decisions, preferences, project knowledge, bug fixes, and incomplete work. It connects through MCP to the Memories backend, where records remain available across sessions and can be searched by meaning or keywords. The service is self-hosted, so the memory data and supporting infrastructure stay under the operator's control.

The server supports both private and shared project memory patterns. Collaborative project memory uses separate person and project source prefixes, a shared backend, and managed keys with stable principal identities. Deliberate shared writes use project-scoped sources such as `project/<project>/decisions`, `knowledge`, `state`, or `operations`.

## How it works

Search can combine vector similarity with BM25 keyword matching, recency, confidence, feedback, and graph relationships. `memory_search` returns relevant records, while `memory_timeline` orders results chronologically for date and multi-event questions. `memory_evidence` produces a more structured evidence packet with candidate records, older evidence, source and date information, confidence, and suggested follow-up queries.

Memory changes preserve history. Updating a record replaces its active text while archiving the previous version and linking it through a supersedes relationship. The service can also create related-to links, detect conflicting memories, and apply lifecycle policies such as prefix-based retention and confidence-based archiving.

`memory_extract` uses an LLM-based Add, Update, Delete, Noop, or Conflict workflow to turn conversation text into memory operations. It supports dry runs and per-fact approval. Credential-shaped values such as API keys, tokens, JWTs, and URL credentials are redacted before extraction or storage.

## Setup and configuration

Clone the repository, enter its directory, and start the backend with Docker Compose:

```bash
git clone https://github.com/divyekant/memories.git
cd memories
docker compose up -d
```

The service is available at `http://localhost:8900`. A health endpoint is provided at `/health`, API documentation at `/docs`, and a browser interface at `/ui`. The web interface supports browsing, searching, editing, bulk operations, extraction review, conflict resolution, lifecycle inspection, exports, and maintenance tasks.

The accompanying Python CLI can be installed with `pip install -e .`; it is also included in the Docker image. Configure its backend URL and API key with `memories config set url` and `memories config set api_key`. CLI configuration resolves flags first, followed by the user configuration file, environment variables, and defaults.

## Tools and capabilities

- Search semantically, with optional hybrid keyword matching.
- Retrieve chronological results or detailed evidence packets.
- Add, update, delete, batch-delete, list, count, and inspect memory records.
- Check whether a proposed memory is novel before storing it.
- Extract memories from conversation text using an approval-aware workflow.
- Review conflicts, report missed memories, and list deferred project work.
- Submit usefulness feedback to influence later retrieval ranking.
- Filter, export, import, back up, and manage records through the CLI.

## Limitations and notes

Automatic extraction is private-first in collaborative mode: it writes to a person's project knowledge scope rather than inferring a shared project fact. Shared project writes require an intentional `memory_add` operation and an approved project source. Collaborative mode also requires one backend and server-issued managed keys; administrative or environment keys do not activate it.

The extraction workflow uses an LLM and incurs a stated cost of approximately $0.001 per call. Memory deletion is ID-based, so agents should search or list records before deleting them. The server also exposes deletion by source prefix for bulk cleanup, which should be used carefully because it can remove an entire source or project scope.

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

