1. Conduid
  2. Developer Tools
  3. io.github.chenxiaofie/memory-mcp
MCP server · Developer Tools

io.github.chenxiaofie/memory-mcp

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

Unclaimed devtools
37Low

Scored 7 months ago · breakdown

About io.github.chenxiaofie/memory-mcp

io.github.chenxiaofie/memory-mcp is an MCP server published by chenxiaofie in the Developer Tools category: 情景+实体记忆 MCP 服务,为 Claude Code 提供持久化记忆能力.

The repository has 10 stars and 2 forks, with the last commit 3 months ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

uvx
uvx chenxiaofie-memory-mcp
pip
pip install chenxiaofie-memory-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (17)

memory_add_entityAdd a knowledge entity

Parameters not published.

memory_cache_messageManually cache a message

Parameters not published.

memory_cleanup_messagesClean up old cached messages

Parameters not published.

memory_clear_cacheClear message cache

Parameters not published.

memory_close_episodeClose and archive current episode

Parameters not published.

memory_confirm_entityConfirm a detected entity candidate

Parameters not published.

memory_deprecate_entityMark an entity as outdated

Parameters not published.

memory_encoder_statusCheck vector encoder status

Parameters not published.

memory_get_current_episodeGet current active episode

Parameters not published.

memory_get_episode_detailGet full episode details

Parameters not published.

Show all 17 tools
memory_get_pendingList pending entity candidates

Parameters not published.

memory_list_episodesList all episodes chronologically

Parameters not published.

memory_recallSemantic search across episodes and entities

Parameters not published.

memory_reject_candidateReject a false detection

Parameters not published.

memory_search_by_typeSearch entities by type

Parameters not published.

memory_start_episodeStart a new episode

Parameters not published.

memory_statsGet system statistics

Parameters not published.

Ask AI

✦

Ask AI about io.github.chenxiaofie/memory-mcp

Powered by Claude · Grounded in docs

I know everything about io.github.chenxiaofie/memory-mcp. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Memory MCP Service

PyPI version Python

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):

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Mac/Linux
curl -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):

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

2. Add MCP Server to Claude Code

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:

{
  "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

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 episode
memory_start_episode("Login Feature Development", ["auth"])

# Record a decision
memory_add_entity("Decision", "Use JWT + Redis", "For distributed deployment")

# Search history
memory_recall("login implementation")

# Close episode
memory_close_episode("Completed JWT login feature")

Hooks Reference

Hook What it does Timing
SessionStart Creates a new episode ~50ms
UserPromptSubmit Saves user message + retrieves related memories ~1-2s
Stop Saves assistant response ~1s
SessionEnd Signals episode closure ~50ms

Tools Reference

Tool Description
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

Entity Types

Type Level Description
Decision Project Technical decisions for this project
Architecture Project Architecture designs
File Project Important file descriptions
Preference User Personal preferences (shared across projects)
Concept User General concepts
Habit User Work habits

Storage Locations

  • User-level: ~/.claude-memory/
  • Project-level: {project-root}/.claude/memory/

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

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

Then configure MCP server with the venv Python:

# 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

License

MIT License - see LICENSE file for details.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About io.github.chenxiaofie/memory-mcp

How do I install io.github.chenxiaofie/memory-mcp?

Run uvx chenxiaofie-memory-mcp, then add the server to your MCP client's configuration.

Is io.github.chenxiaofie/memory-mcp safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is io.github.chenxiaofie/memory-mcp still maintained?

Yes — the last commit was 3 months ago. The repository has 10 stars and 2 forks.