Memu MCP — Development skill for Claude Code
MemU 语义记忆系统的 MCP 接口:为 Claude Code 提供跨会话长期记忆 MCP server for the MemU memory system: persistent long-term memory for Claude Code.
How to install Memu MCP
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open OstrichHermit/memu-mcp and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Memu MCP does
MemU 语义记忆系统的 MCP 接口:为 Claude Code 提供跨会话长期记忆 MCP server for the MemU memory system: persistent long-term memory for Claude Code.
Alternatives in Development
- Claude Supermemory — Persistent memory across sessions and projects using Supermemory 2.3k ★
- /remember — Save a finding or successful pattern to persistent hunt memory 1.2k ★
- Projectmem — Open-source coding agent memory 766 ★
README
MemU MCP Server
为 Claude Code CLI 提供 MemU 记忆系统的 MCP (Model Context Protocol) 接口。
[English](README_EN.md) | [简体中文](README.md)
功能特性
- 保存记忆 - 将重要信息保存到记忆系统
- 语义搜索 - 使用自然语言查询相关记忆
- 上下文检索 - 智能获取会话相关的历史记忆
- 统计信息 - 查看记忆系统的使用情况
架构
Claude Code CLI
↓ (MCP 协议)
MCP Server (工具层)
↓ (调用)
memu_utils (辅助层)
↓ (存储)
MemU Service + PostgreSQL + pgvector
安装
1. 安装依赖
# 使用 pip
pip install -r requirements.txt
# 或使用 uv(推荐)
uv pip install -r requirements.txt
2. 配置环境变量
在 MemU 工作目录创建 `.env` 文件(启动时自动读取),包含以下配置:
# 通义千问 LLM 配置
DASHSCOPE_API_KEY=your_dashscope_api_key
# PostgreSQL 配置
DATABASE_TYPE=postgres
POSTGRES_DSN=postgresql+psycopg2://postgres:postgres@127.0.0.1:5432/memu
3. 配置 MCP Server
在 `.mcp.json` 中添加:
{
"mcpServers": {
"memu": {
"type": "stdio",
"command": "python",
"args": ["server.py"],
"cwd": "/absolute/path/to/memu-mcp"
}
}
}
也可以独立 HTTP 服务运行:`python server.py --transport http --host 127.0.0.1 --port 3335`,然后配置 `"type": "http", "url": "http://127.0.0.1:3335/mcp"`。详细部署步骤见 [docs/INSTALL.md](docs/INSTALL.md)。
MCP 工具
1. save_memory
保存新的记忆到 MemU 系统。
**参数:**
content(必需): 记忆内容category(可选): 记忆分类metadata(可选): 额外元数据importance(可选): 重要性评分 (0-1)
**示例:**
# 保存用户偏好
save_memory(
content="猪猪喜欢使用 Vim 编辑器",
category="preferences",
importance=0.8
)
2. search_memory
使用语义搜索查找相关记忆。
**参数:**
query(必需): 搜索查询(自然语言)limit(可选): 返回结果数量(默认 5,最大 20)category(可选): 过滤分类
**示例:**
# 搜索编辑器偏好
search_memory(query="猪猪喜欢什么编辑器", limit=3)
# 搜索特定分类
search_memory(query="MCP 协议", category="knowledge", limit=5)
3. get_context_memories
获取会话相关的上下文记忆(用于会话启动)。
**参数:**
query(必需): 当前任务或上下文描述max_tokens(可选): 最大 token 数量(默认 1000)limit(可选): 最大返回记忆数量(默认 10)
**示例:**
# 会话启动时获取上下文
get_context_memories(
query="处理 Python 代码重构任务",
max_tokens=1000
)
4. get
Related Skills
Lore Plugin
Claude Code plugin for persistent long-term memory via Lore. Auto-ingests session transcripts and exposes read
Pieces Agent Skills
Two advanced agentic skills for Pieces OS, focusing on deep research synthesis and MCP-based long-term memory
Thoth
Thoth is a Rust library (plus a CLI, an MCP server, and a Claude Code / Cowork plugin) that gives a coding age
Mem0 Chrome Extension
OpenMemory Chrome Extension: Long-term memory for ChatGPT, Claude, Perplexity, Grok etc
MoltBrain
Long-term memory layer for OpenClaw & MoltBook agents that learns and recalls your project context automatical
Memory Skill
a file-based long-term memory agent skill
Related Agents
Context Memory Manager
Context Window & Token Optimization Specialist. Manages token budgets, compresses prompts (RTK/Caveman), imple
Curate Chatlog
Curate the m3-chatlog store — clean, dedupe, decay ephemeral turns, prune abandoned conversations, promote hig
Agent Memory MCP Setup
Agent Memory MCP Server - Setup Complete ✅