Clude Memory MCP
Clude 的 4 层认知记忆系统的 MCP 服务器 - 存储、回忆、搜索和梦想。基于 Supabase + pgvector 构建,具有特定类型的衰减、Hebbian 关联图以及通过 Solana 的链上承诺。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~sebbsssss-clude-memory-mcpcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~sebbsssss-clude-memory-mcp/file -o sebbsssss-clude-memory-mcp.md# Clude Memory MCP MCP server exposing a 4-tier cognitive memory architecture inspired by Stanford's Generative Agents (Park et al. 2023). ## Tools ### `recall_memories` Search the memory system. Returns scored memories ranked by relevance, importance, recency, and vector similarity. - `query` — text to search against memory summaries - `tags` — filter by tags - `related_user` — filter by user/agent ID - `memory_types` — filter by type: `episodic`, `semantic`, `procedural`, `self_model` - `limit` — max results (1-20, default 5) - `min_importance` — minimum importance threshold (0-1) ### `store_memory` Store a new memory. Memories persist across conversations, decay over time if not accessed, and get committed to Solana. - `type` — `episodic` (events), `semantic` (knowledge), `procedural` (behaviors), `self_model` (identity) - `content` — full memory content - `summary` — short summary for recall matching - `tags` — tags for filtering - `importance` — importance score 0-1 - `source` — origin identifier (e.g. `mcp:my-agent`) ### `get_memory_stats` Get statistics: counts by type, average importance/decay, dream session history, top tags. ### `get_market_mood` Get current market mood and price state (no LLM call). ### `ask_clude` Ask Clude a question and get an in-character response. Calls Claude API. ## Setup ```bash npm install clude-bot ``` Requires a Supabase project with the schema from `supabase-schema.sql`. Set `SUPABASE_URL` and `SUPABASE_SERVICE_KEY` environment variables. ## Architecture - **4-tier memory**: episodic (7%/day decay), semantic (2%/day), procedural (3%/day), self_model (1%/day) - **Hybrid retrieval**: pgvector cosine similarity + keyword matching + tag scoring - **Dream cycles**: consolidation, reflection, emergence — every 6 hours - **On-chain commitment**: SHA-256 hashed memories committed to Solana via memo transactions - **Granular decomposition**: per-fragment embeddings for precise sub-memory retrieval ## License MIT --- ## 中文说明 # Clude Memory MCP MCP 服务器,提供受斯坦福 Generative Agents(Park 等人,2023)启发的 4 层认知记忆架构。 ## 工具 ### `recall_memories` 搜索记忆系统。返回经过评分的记忆,按相关性、重要性、新近度和向量相似度排序。 - `query` — 用于匹配记忆摘要的搜索文本 - `tags` — 按标签筛选 - `related_user` — 按用户/代理 ID 筛选 - `memory_types` — 按类型筛选:`episodic`、`semantic`、`procedural`、`self_model` - `limit` — 最大结果数(1-20,默认 5) - `min_importance` — 最低重要性阈值(0-1) ### `store_memory` 存储一条新记忆。记忆会跨对话持久保存,若未被访问则随时间衰减,并被提交到 Solana。 - `type` — `episodic`(事件)、`semantic`(知识)、`procedural`(行为)、`self_model`(身份) - `content` — 完整的记忆内容 - `summary` — 用于回忆匹配的简短摘要 - `tags` — 用于筛选的标签 - `importance` — 重要性评分 0-1 - `source` — 来源标识符(例如 `mcp:my-agent`) ### `get_memory_stats` 获取统计信息:按类型计数、平均重要性/衰减、梦境会话历史、热门标签。 ### `get_market_mood` 获取当前的市场情绪和价格状态(不调用 LLM)。 ### `ask_clude` 向 Clude 提问并获得契合其角色设定的回答。调用 Claude API。 ## 设置 ```bash npm install clude-bot ``` 需要一个采用 `supabase-schema.sql` 中 schema 的 Supabase 项目。设置 `SUPABASE_URL` 和 `SUPABASE_SERVICE_KEY` 环境变量。 ## 架构 - **4 层记忆**:episodic(每日衰减 7%)、semantic(每日 2%)、procedural(每日 3%)、self_model(每日 1%) - **混合检索**:pgvector 余弦相似度 + 关键词匹配 + 标签评分 - **梦境周期**:巩固、反思、涌现 —— 每 6 小时一次 - **链上承诺**:经 SHA-256 哈希的记忆通过 memo 交易提交到 Solana - **细粒度分解**:按片段生成嵌入,以实现精确的子记忆检索 ## 许可证 MIT