🔌
MCP工具

长期记忆系统

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:TrueMemory
⭐ 84 Stars 🍴 9 Forks 💻 Python 📄 AGPL-3.0 🏷 AI 8.0分
8.0AI 综合评分
智能体记忆MCP工具长期记忆数据推理Anthropic
✦ AI Skill Hub 推荐

AI Skill Hub 强烈推荐:长期记忆系统 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。

📚 深度解析
长期记忆系统 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 长期记忆系统,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。长期记忆系统 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 长期记忆系统 评为 AI 评分 8.0 分,属于同类工具中的优质选择。
📋 工具概览

长期记忆系统 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 84
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
AGPL-3.0
AI 综合评分
8.0 分
工具类型
MCP工具
Forks
9
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

长期记忆系统 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/buildingjoshbetter/TrueMemory

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "------": {
      "command": "npx",
      "args": ["-y", "truememory"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 长期记忆系统 执行以下任务...
Claude: [自动调用 长期记忆系统 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "______": {
      "command": "npx",
      "args": ["-y", "truememory"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 52/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <img src="assets/charts/hero-banner.png" alt="TrueMemory" /> </p>

<p align="center"> A living memory system for AI agents. Long-horizon recall on commodity hardware. </p>

<p align="center"> <a href="https://pypi.org/project/truememory/"><img src="https://img.shields.io/pypi/v/truememory?color=blue&label=PyPI" alt="PyPI"></a> <a href="https://pypi.org/project/truememory/"><img src="https://img.shields.io/pypi/pyversions/truememory?color=blue" alt="Python"></a> <a href="https://github.com/buildingjoshbetter/TrueMemory/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="License"></a> <img src="https://img.shields.io/badge/LoCoMo-93.0%25_(Pro)-blueviolet" alt="LoCoMo Score"> <img src="https://img.shields.io/badge/LongMemEval-92.0%25_(Pro)-blue" alt="LongMemEval Score"> <img src="https://img.shields.io/badge/BEAM--1M-76.6%25_(SOTA)-orange" alt="BEAM Score"> </p>

<p align="center"> <a href="#-what-is-truememory">What is TrueMemory?</a> · <a href="#-quick-start">Quick Start</a> · <a href="#%EF%B8%8F-edge--base--pro">Edge / Base / Pro</a> · <a href="#-architecture">Architecture</a> · <a href="#-benchmarks">Benchmarks</a> · <a href="#-python-api">API</a> · <a href="#-docs">Docs</a> · <a href="#-faq">FAQ</a> </p>

---

🚀 Quick Start

<ins>Step 1.</ins> Open a terminal.

  • Mac: Cmd + Space, type Terminal
  • Linux: Ctrl + Alt + T
  • Windows: open PowerShell

&nbsp;

<ins>Step 2.</ins> Paste this and press Enter:

Mac / Linux:

curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.ps1 | iex

&nbsp;

<ins>Step 3.</ins> Wait 3-5 minutes for installation.

&nbsp;

<ins>Step 4.</ins> Quit Claude completely and reopen it (Mac: Cmd+Q, Windows: right-click the Claude tray icon → Quit).

&nbsp;

<ins>Step 5.</ins> Type "Set up TrueMemory" and pick Edge, Base, or Pro.

&nbsp;

That's it. TrueMemory remembers your conversations automatically from here.

  • Switch tiers: tell Claude "switch to Pro" or "switch to Base"
  • Update: run uv tool upgrade truememory in Terminal, then restart Claude
  • Uninstall: run uv tool uninstall truememory
⭐ Tip: Quit your Claude sessions when you're done prompting. TrueMemory's memory hook runs when the session ends, so it can capture and store the full conversation.

<details> <summary><b>Click here for the advanced setup guide ▸</b></summary>

What the installer does

Installs uv (Astral's Python tool manager) if needed, fetches a managed Python 3.12, installs TrueMemory with all tier models into an isolated tool environment, registers the MCP server, wires up lifecycle hooks, and merges instructions into ~/.claude/CLAUDE.md. Your system Python is never touched. No sudo, no venvs, no pip struggle.

Audit the script

It's ~200 lines of shell, no sudo, stays entirely under $HOME:

curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh -o install.sh && less install.sh && sh install.sh

Python library (for developers)

If you're embedding TrueMemory in your own Python project (requires Python 3.10+):

pip install truememory
pip install installs the Python library only. It does NOT register the MCP server, install hooks, or configure Claude. For Claude Code / Claude Desktop, always use the curl | sh installer above.

```python from truememory import Memory

m = Memory() m.add("Prefers dark mode and TypeScript", user_id="alex") m.add("Allergic to peanuts", user_id="alex")

results = m.search("What are Alex's preferences?", user_id="alex") print(results[0]["content"])

Evaluation config

All benchmarks use the same eval pipeline. Nothing is hidden.

ParameterLoCoMoLongMemEvalBEAM-1MBEAM-10M
**Dataset**10 convs, 1,540 Qs500 Qs, multi-session35 convs at 1M tokens, 700 Qs10 convs at 10M tokens, 200 Qs
**Answer model**gpt-4.1-minigpt-4.1-minigpt-4.1-minigpt-4.1-mini
**Answer temp**0000
**Judge model**gpt-4o-minigpt-4o-minigpt-4o-minigpt-4o-mini
**Judge voting**3x majority3x majority3x majority3x majority
**Retrieval top-k**100100100100
**Compute**Modal T4Modal A10GModal T4Modal A100 80GB

Full details: LoCoMo | LongMemEval | BEAM

---

🐍 Python API

```python from truememory import Memory

m = Memory()

❓ FAQ

My session doesn't seem to know anything about me. What's wrong?

On your first session, TrueMemory runs setup. It won't recall memories until setup is complete. After that, every new session automatically searches your memory and injects up to 25 relevant facts as context. If memories still aren't loading, check that the MCP server is connected (truememory_stats) and that you have memories stored (truememory_search with a broad query).

Where is my data stored? Is anything sent to the cloud?

Everything lives locally in a single SQLite file at ~/.truememory/memories.db. Edge and Base tiers make zero external network calls. Pro tier sends only your search query text to an LLM API for HyDE expansion. Your memories themselves are never transmitted. Back up anytime with cp ~/.truememory/memories.db backup.db.

How do I switch tiers (Edge → Base → Pro)?

Call truememory_configure(tier="base") (or "pro") in any session, or run truememory-ingest upgrade-tier base from the terminal. All tier models are included in the standard install — switching just re-embeds your existing memories with the new model. Pro also needs an API key for HyDE query expansion.

I switched tiers and search results seem off. How do I fix it?

After a tier switch, TrueMemory re-embeds all memories with the new model. If this was interrupted, run truememory_configure(tier="...") again to retry. If results are still degraded, you can delete ~/.truememory/memories.db and start fresh. Your conversations are still in your chat history and will be re-extracted.

Do I need Python installed?

No. The recommended install (curl -LsSf .../install.sh | sh) uses uv to manage a sandboxed Python 3.12. Your system Python is never touched. To uninstall cleanly: uv tool uninstall truememory.

Does TrueMemory collect telemetry?

TrueMemory collects anonymous usage telemetry to help us understand how the product is used and improve it. We track which tools are called and how often, session counts, and basic platform info (OS, tier, version). We never track your memory content, search queries, file paths, or API keys. Telemetry is on by default. To opt out:

export TRUEMEMORY_TELEMETRY=off

---

Find me on X @Building_Josh · Follow us @Sauron_Labs

---

🎯 aiskill88 AI 点评 A 级 2026-05-22

创新记忆架构赋能智能体持久学习,MCP集成方案优雅,社区活跃度良好,是构建智能对话系统的关键组件。

⚡ 核心功能
👥 适合人群
Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师
🎯 使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
⚖️ 优点与不足
✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。

🔗 相关工具推荐
📚 相关教程推荐
❓ 常见问题 FAQ
TrueMemory 是一款Python开发的AI辅助工具。开源MCP工具:A living memory system that ingests long-horizon data to infer insights, enablin。⭐84 · Python 主要应用场景包括:构建有状态AI智能体、长期对话记忆管理、用户交互历史存储。
💡 AI Skill Hub 点评

总体来看,长期记忆系统 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

⬇️ 获取与下载
⬇ 下载源码(GPL)
⚠️ 本工具使用 AGPL-3.0 协议。您可以自由下载和使用,但衍生作品必须以相同协议开源,不可商业闭源。使用前请确认符合协议要求。
📚 深入学习 长期记忆系统
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 TrueMemory
原始描述 开源MCP工具:A living memory system that ingests long-horizon data to infer insights, enablin。⭐84 · Python
Topics 智能体记忆MCP工具长期记忆数据推理Anthropic
GitHub https://github.com/buildingjoshbetter/TrueMemory
License AGPL-3.0
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/buildingjoshbetter/TrueMemory

收录时间:2026-05-21 · 更新时间:2026-05-22 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。