# Chenxiaofie Memory MCP [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/chenxiaofie/memory-mcp  
**GitHub Stars:** 10  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memory-mcp-2

## Description
A scenario + entity memory MCP service that provides persistent memory capabilities for Claude Code.

## Tools
Capabilities this server exposes over MCP:

- **memory_start_episode** — Start a new episode
- **memory_close_episode** — Close and archive current episode
- **memory_get_current_episode** — Get current active episode
- **memory_add_entity** — Add a knowledge entity
- **memory_confirm_entity** — Confirm a detected entity candidate
- **memory_reject_candidate** — Reject a false detection
- **memory_deprecate_entity** — Mark an entity as outdated
- **memory_get_pending** — List pending entity candidates
- **memory_recall** — Semantic search across episodes and entities
- **memory_search_by_type** — Search entities by type
- **memory_get_episode_detail** — Get full episode details
- **memory_list_episodes** — List all episodes chronologically
- **memory_stats** — Get system statistics
- **memory_encoder_status** — Check vector encoder status
- **memory_cache_message** — Manually cache a message
- **memory_clear_cache** — Clear message cache
- **memory_cleanup_messages** — Clean up old cached messages

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

```json
"mcpServers": {
  "chenxiaofie-memory-mcp": {
    "command": "uvx",
    "args": ["--from","chenxiaofie-memory-mcp","memory-mcp-init"]
  }
}
```

## Documentation

## What memory-mcp MCP server does

The memory-mcp MCP server adds persistent conversation memory to Claude Code. It records sessions as episodes, extracts or accepts knowledge entities, and retrieves related information in later sessions. Episodes represent individual conversations and can receive summaries when they are closed. Entities can represent project decisions, architecture, important files, user preferences, general concepts, and work habits.

Storage has two scopes. User-level data is shared across projects under `~/.claude-memory/`, while project-level data is kept under `{project-root}/.claude/memory/`. This separation allows personal preferences and general concepts to remain available while project-specific decisions stay associated with the relevant codebase.

## How it works

The memory-mcp MCP server can run with Claude Code hooks that connect session lifecycle events to memory operations. At session start, a new episode is created. When the user submits a prompt, the message can be saved and related memories retrieved. The assistant response is saved when Claude stops, and the episode receives a close signal when the session ends.

Without hooks, Claude Code can call the memory tools directly. A typical manual workflow starts an episode, records a decision or other entity, searches previous context, and closes the episode with a completion note.

Semantic recall uses vector-based retrieval across episodes and entities. The project requires a one-time download of a vector model of about 400 MB during initialization. The repository notes that its ChromaDB dependency supports Python 3.10 through 3.13, but not Python 3.14 or later.

## Setup and configuration

Install `uv`, then initialize the service with:

```bash
uvx --from chenxiaofie-memory-mcp memory-mcp-init
```

Register the stdio server with Claude Code using:

```bash
claude mcp add memory-mcp -s user -- uvx --from chenxiaofie-memory-mcp memory-mcp
```

For automatic saving and recall, add the supplied commands to `~/.claude/settings.json` under the `SessionStart`, `UserPromptSubmit`, `Stop`, and `SessionEnd` hook events. The repository recommends verifying the registration with `claude mcp list`; a connected entry should be shown for `memory-mcp`.

A source-based installation is also documented. It clones the repository, runs the platform-specific install script, and starts the module with the Python executable from the created virtual environment.

## Tools and capabilities

Available MCP tools include:

- Start, inspect, and close conversation episodes.
- Add, confirm, reject, and deprecate knowledge entities.
- Search semantically across stored episodes and entities.
- Search entities by type and inspect pending candidates.
- List episodes chronologically and retrieve complete episode details.
- View system statistics and vector encoder status.
- Cache messages manually, clear the cache, and remove older cached messages.

The entity workflow supports review of detected candidates before they become accepted knowledge. Deprecation marks an entity as outdated rather than removing the broader memory record.

## Limitations and notes

The documented automatic workflow is specific to Claude Code because it depends on Claude Code session hooks and commands. The service requires Python 3.10–3.13 according to the repository documentation; Python 3.14 and newer are not supported because of ChromaDB compatibility. Vector initialization downloads approximately 400 MB, and automatic behavior requires configuring the hooks rather than only registering the MCP server.

The repository describes MIT licensing. No environment variables are specified in the provided setup instructions.

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

