claude-recall
A persistent memory server for Claude Code that captures session context and tool outputs to inject relevant history into future sessions. It enables long-term recall through semantic search and automatic context management, allowing for more consistent and context-aware coding interactions.
README
<p align="center">
<img width="1344" height="768" alt="Untitled design (32)" src="https://github.com/user-attachments/assets/03483342-0950-4d80-8bd2-423cd644b6ba" />
</p>
<p align="center">
</p>
<p align="center"> <strong>Long-term memory layer for OpenClaw, MoltBook & Claude Code that learns and recalls your project context automatically. $BRAIN CA 0x35e7942E91876Eb0c24A891128E559a744fe8B07 </strong> </p>
<p align="center"> <a href="#-quick-install">Install</a> • <a href="#-features">Features</a> • <a href="#-how-it-works">How It Works</a> • <a href="#-openclaw-integration">OpenClaw</a> • <a href="#%EF%B8%8F-configuration">Config</a> • <a href="#-api">API</a> </p>
<br>
⚡ Quick Install
<p align="center">
╔══════════════════════════════════════════════════════════════════════╗
║ ║
║ Step 1 /plugin marketplace add nhevers/moltbrain ║
║ Step 2 /plugin install moltbrain ║
║ ║
╚══════════════════════════════════════════════════════════════════════╝
</p>
<p align="center"><em>That's it. MoltBrain starts working automatically.</em></p>
<br>
🧠 What It Does
╭──────────────────────────────────────────────────────────────────────────────╮
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ SESSION #1 │ │ SESSION #47 │ │
│ │─────────────────│ │─────────────────│ │
│ │ │ │ │ │
│ │ "Set up auth │ │ "Add password │ │
│ │ with OAuth" │ │ reset flow" │ │
│ │ │ │ │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ │ Claude discovers: │ Claude remembers: │
│ │ • OAuth2 + PKCE flow │ • Your auth setup │
│ │ • JWT with 1hr expiry │ • Token structure │
│ │ • bcrypt cost factor 12 │ • Security choices │
│ │ │ │
│ ▼ ▲ │
│ ┌────────────────┐ ┌────────────────┐ │
│ │ CAPTURE │ ──────────────────► │ INJECT │ │
│ │ & LEARN │ MEMORY │ & RECALL │ │
│ └────────────────┘ └────────────────┘ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
<br>
✨ Features
+-------------------------+-------------------------+-------------------------+
| | | |
| OBSERVATIONS | SMART SEARCH | WEB VIEWER |
| ---------------- | ---------------- | ---------------- |
| Auto-captures | Semantic search | Browse history |
| discoveries, | via MCP tools | at localhost |
| decisions & code | finds context | :37777 |
| | | |
+-------------------------+-------------------------+-------------------------+
| | | |
| ANALYTICS | TAGS & FILTERS | FAVORITES |
| ---------------- | ---------------- | ---------------- |
| Track tokens, | Organize with | Bookmark your |
| sessions, and | custom tags & | most important |
| concept trends | smart filters | observations |
| | | |
+-------------------------+-------------------------+-------------------------+
| | | |
| EXPORT | THEMES | SHORTCUTS |
| ---------------- | ---------------- | ---------------- |
| JSON, CSV, or | Dark & light | Full keyboard |
| Markdown with | mode with | navigation in |
| custom templates | custom themes | the web viewer |
| | | |
+-------------------------+-------------------------+-------------------------+
<br>
🔧 How It Works
╔═══════════════════════════════════╗
║ CLAUDE CODE SESSION ║
╚═══════════════╤═══════════════════╝
│
┌────────────────────┼────────────────────┐
│ │ │
▼ ▼ ▼
╔════════════════╗ ╔════════════════╗ ╔════════════════╗
║ SessionStart ║ ║ PostToolUse ║ ║ Stop ║
║────────────────║ ║────────────────║ ║────────────────║
║ Inject context ║ ║ Capture output ║ ║ Generate ║
║ from memory ║ ║ extract facts ║ ║ summary ║
╚═══════╤════════╝ ╚═══════╤════════╝ ╚═══════╤════════╝
│ │ │
└────────────────────┼────────────────────┘
│
╔══════════════╧══════════════╗
║ WORKER SERVICE ║
║ http://localhost:37777 ║
╚══════════════╤══════════════╝
│
┌─────────────────────────┼─────────────────────────┐
│ │ │
▼ ▼ ▼
╔════════════════╗ ╔════════════════╗ ╔════════════════╗
║ SQLite ║ ║ ChromaDB ║ ║ Web Viewer ║
║ Database ║ ║ Vector Search ║ ║ UI ║
║────────────────║ ║────────────────║ ║────────────────║
║ Observations ║ ║ Semantic ║ ║ Timeline ║
║ Summaries ║ ║ similarity ║ ║ Search ║
║ Sessions ║ ║ matching ║ ║ Analytics ║
╚════════════════╝ ╚════════════════╝ ╚════════════════╝
<br>
⚙️ Configuration
Settings stored in ~/.moltbrain/settings.json:
┌──────────────────────────────────────┬─────────┬────────────────────────────┐
│ SETTING │ DEFAULT │ DESCRIPTION │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_WORKER_PORT │ 37777 │ Worker service port │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_CONTEXT_OBSERVATIONS │ 50 │ Max observations to inject │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_PROVIDER │ claude │ AI provider for summaries │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_PRUNE_DAYS │ 0 │ Auto-prune (0 = disabled) │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_THEME │ system │ UI theme (dark/light/sys) │
├──────────────────────────────────────┼─────────┼────────────────────────────┤
│ MOLTBRAIN_LOG_LEVEL │ info │ Logging verbosity level │
└──────────────────────────────────────┴─────────┴────────────────────────────┘
<br>
💻 CLI Commands
moltbrain stats # Show memory statistics
moltbrain export # Export to markdown
moltbrain tag <id> <t> # Tag an observation
moltbrain prune # Manual cleanup
moltbrain search <q> # Search observations
<br>
📁 Project Structure
moltbrain/
│
├── 📊 benchmarks/ Performance tests
├── 🎨 contrib/ Community modes & themes
├── 📚 docs/ Documentation
├── 📖 examples/ Usage examples & guides
│
├── 🔌 extension/
│ ├── profiles/ Observation modes
│ ├── runtime/ Worker scripts
│ ├── themes/ UI themes (dark/light)
│ ├── snippets/ Code snippets
│ └── templates/ Summary templates
│
├── 🌍 locales/ i18n (en, es, fr)
├── 🗄️ migrations/ Database migrations
├── 📋 schemas/ JSON validation schemas
├── 🛠️ scripts/ Build & utility scripts
│
├── 💻 src/
│ ├── analytics/ Token & session tracking
│ ├── cache/ Query & context caching
│ ├── core/ Core engine
│ ├── export/ JSON/CSV/MD exporters
│ ├── favorites/ Bookmark system
│ ├── filters/ Date/type/project filters
│ ├── formatters/ Output formatters
│ ├── mcp/ MCP server for OpenClaw & MoltBook
│ ├── shortcuts/ Keyboard shortcuts
│ ├── themes/ Theme system
│ └── validators/ Input validation
│
├── 🦞 integrations/
│ └── clawd/ Clawd extension & skill
│
├── 📝 templates/ Export templates
├── 🧪 tests/ Test suites
└── 🔧 tools/ CLI utilities
<br>
🔌 API
The worker exposes a REST API at http://localhost:37777:
# Health check
curl http://localhost:37777/health
# Search observations
curl "http://localhost:37777/api/search?q=authentication"
# Get timeline
curl "http://localhost:37777/api/timeline?project=my-app&days=7"
# Export data
curl "http://localhost:37777/api/export?format=json" > backup.json
# Get statistics
curl "http://localhost:37777/api/stats"
<br>
🦞 OpenClaw Integration
Works with OpenClaw (116k+ stars) - the popular personal AI assistant!
+-----------------------------------------------------------------------------+
| |
| EXTENSION Add to OpenClaw's extensions/ folder |
| ---------- Full lifecycle hooks integration |
| |
| SKILL Install as an OpenClaw skill |
| ---------- recall_context, search_memories, save_memory tools |
| |
| MCP SERVER Protocol-based integration |
| ---------- Works with any MCP-compatible client |
| |
+-----------------------------------------------------------------------------+
Quick setup:
# As OpenClaw extension
cd ~/.openclaw/extensions
git clone https://github.com/nhevers/moltbrain.git moltbrain
cd moltbrain/integrations/openclaw
npm install && npm run build
# Enable the plugin (required for bundled installations)
pnpm openclaw plugins enable moltbrain
# Or via MCP
npm run mcp:start
Note: If installing as a bundled extension (in OpenClaw's extensions/ directory), you must explicitly enable it: pnpm openclaw plugins enable moltbrain
See integrations/openclaw/README.md for full setup guide.
<br>
📚 MoltBook Integration
Works with MoltBook - the social network for AI agents! Share memories, learn from other agents, and build collective knowledge.
Quick setup:
# Install MoltBook MCP integration
npm install --save @moltbrain/moltbook-mcp
# Configure in your MoltBrain settings
{
"MOLTBRAIN_MOLTBOOK_ENABLED": true,
"MOLTBRAIN_MOLTBOOK_API_URL": "https://moltbook.com"
}
See integrations/moltbook/README.md for full setup guide.
<br>
💻 Claude Code Integration
Works with Claude Code via the plugin marketplace:
/plugin marketplace add nhevers/moltbrain
/plugin install moltbrain
<br>
📋 Requirements
╔══════════════════════════════════════╗
║ ║
║ • Node.js 18+ or Bun 1.0+ ║
║ • OpenClaw, MoltBook, or Claude Code ║
║ ║
╚══════════════════════════════════════╝
<br>
📄 License
AGPL-3.0
<br>
<p align="center"> <sub>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</sub> </p>
<p align="center"> <strong>Built with care for the OpenClaw, MoltBook & Claude Code community</strong> </p>
<p align="center"> <sub>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</sub> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。