Memory Mcp

io.github.chenxiaofiePublished by GitHub account chenxiaofiev0.2.1Updated Oct 24, 2026

情景+实体记忆 MCP 服务,为 Claude Code 提供持久化记忆能力

The publisher's own server: Memory.fit

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Gives Claude Code persistent memory by saving conversation episodes and entities and recalling relevant history in later sessions.

What you can do
A local MCP server for Claude Code that stores each conversation session as an episode with an auto-generated summary, and extracts entities such as decisions, architecture notes, preferences and habits. Tools include memory_start_episode, memory_close_episode, memory_add_entity, memory_recall for semantic search, memory_search_by_type, memory_list_episodes and memory_stats. Storage is dual-layer: user-level data shared across projects and project-level data isolated per project. Optional Claude Code hooks make saving and recall automatic.
When to use it
Useful when you want Claude Code to remember decisions, preferences and prior discussions across sessions instead of repeating context. Best for ongoing projects where continuity matters. Without hooks, memory tools must be called manually.
Requirements
Local Python runtime, version 3.10 to 3.13 (chromadb is not compatible with 3.14+), run through uv/uvx. A one-time initialization downloads a roughly 400MB vector model. The CLAUDE_PROJECT_ROOT environment variable sets the project root path. Desktop only; no authentication declared.
Before you install
Conversation content, including decisions and preferences, is saved to local storage under ~/.claude-memory/ and the project's .claude/memory/ directory. Hooks run commands automatically on session start, prompt submit, response stop and session end, so saving happens without confirmation. Tools such as memory_clear_cache and memory_cleanup_messages delete stored data.

Installation

In SourceWeft

  1. Open Memory Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Memory MCP Service

[PyPI version] [Python] [License: MIT]

English | 中文

A persistent memory MCP service for Claude Code. Automatically saves conversations and retrieves relevant history across sessions.

What it does: Every time you chat with Claude Code, your conversation context (decisions, preferences, key discussions) is saved and automatically recalled in future sessions — so Claude always has the background it needs. [Memory recall demo - retrieving past session history]

Quick Start

Prerequisites

Install uv (Python package runner):

bash
# Windowspowershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Mac/Linuxcurl -LsSf https://astral.sh/uv/install.sh | sh

Requires Python 3.10 - 3.13 (chromadb is not compatible with Python 3.14+).

1. Initialize (First Time Only)

Download the vector model (~400MB, one-time):

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

2. Add MCP Server to Claude Code

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

3. Configure Hooks (Recommended)

Hooks enable fully automatic message saving. Without hooks, you need to manually call memory tools.

Add the following to ~/.claude/settings.json:

json
{  "hooks": {    "SessionStart": [{      "matcher": ".*",      "hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-session-start" }]    }],    "UserPromptSubmit": [{      "matcher": ".*",      "hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-auto-save" }]    }],    "Stop": [{      "matcher": ".*",      "hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-save-response" }]    }],    "SessionEnd": [{      "matcher": ".*",      "hooks": [{ "type": "command", "command": "uvx --from chenxiaofie-memory-mcp memory-mcp-session-end" }]    }]  }}

4. Verify

bash
claude mcp list

You should see memory-mcp: ... - ✓ Connected.

That's it! Start a new Claude Code session and your conversations will be automatically saved and recalled.

How It Works

Session Start ──► Create Episode ──► Monitor Process (background)                                          │User Message  ──► Save Message ──► Recall Related Memories ──► Inject Context                                          │Claude Reply  ──► Save Response           │                                          │Session End   ──► Close Signal ──► Archive Episode + Generate Summary
  • Episodes: Each conversation session is an "episode" with auto-generated summaries
  • Entities: Key knowledge extracted from conversations (decisions, preferences, concepts)
  • Dual-layer storage: User-level (shared across projects) + Project-level (isolated per project)
  • Semantic search: Vector-based retrieval finds relevant past context

Usage

Automatic Mode (With Hooks)

Once hooks are configured, everything is automatic. Claude will see relevant history from past sessions as context.

Manual Mode

You can also call memory tools directly in Claude Code:

# Start a new episodememory_start_episode("Login Feature Development", ["auth"])
# Record a decisionmemory_add_entity("Decision", "Use JWT + Redis", "For distributed deployment")
# Search historymemory_recall("login implementation")
# Close episodememory_close_episode("Completed JWT login feature")

Hooks Reference

HookWhat it doesTiming
SessionStartCreates a new episode~50ms
UserPromptSubmitSaves user message + retrieves related memories~1-2s
StopSaves assistant response~1s
SessionEndSignals episode closure~50ms

Tools Reference

ToolDescription
memory_start_episodeStart a new episode
memory_close_episodeClose and archive current episode
memory_get_current_episodeGet current active episode
memory_add_entityAdd a knowledge entity
memory_confirm_entityConfirm a detected entity candidate
memory_reject_candidateReject a false detection
memory_deprecate_entityMark an entity as outdated
memory_get_pendingList pending entity candidates
memory_recallSemantic search across episodes and entities
memory_search_by_typeSearch entities by type
memory_get_episode_detailGet full episode details
memory_list_episodesList all episodes chronologically
memory_statsGet system statistics
memory_encoder_statusCheck vector encoder status
memory_cache_messageManually cache a message
memory_clear_cacheClear message cache
memory_cleanup_messagesClean up old cached messages

Entity Types

TypeLevelDescription
DecisionProjectTechnical decisions for this project
ArchitectureProjectArchitecture designs
FileProjectImportant file descriptions
PreferenceUserPersonal preferences (shared across projects)
ConceptUserGeneral concepts
HabitUserWork habits

Storage Locations

  • User-level: ~/.claude-memory/
  • Project-level: {project-root}/.claude/memory/
Alternative: Install from source

If you need to run from source (e.g., for development):

bash
git clone https://github.com/chenxiaofie/memory-mcp.gitcd memory-mcp# Windows:install.bat# Mac/Linux:chmod +x install.sh && ./install.sh

Then configure MCP server with the venv Python:

bash
# Windows:claude mcp add memory-mcp -s user -- "C:\path\to\memory-mcp\venv310\Scripts\python.exe" -m memory_mcp.server
# Mac/Linux:claude mcp add memory-mcp -s user -- /path/to/memory-mcp/venv310/bin/python -m memory_mcp.server

Author

陈佳俊 (Jiajun Chen) — front-end engineer based in Hangzhou, China. GitHub @chenxiaofie · [email protected]

本项目由陈佳俊(GitHub: chenxiaofie)开发并维护。

License

MIT License - see LICENSE file for details.

Source: README.md at commit 40e5525

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Memory integrations