Token导航 LogoToken导航TokenDH.com
Clude MCP logo
AI代理未说明官方级别未说明来源级核验

Clude MCP

MCP Server

一个自托管的模型上下文协议(MCP)服务器,为AI代理提供持久、可搜索的记忆存储,支持多种AI工具共享同一记忆库。

工具数

15

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude知识图谱Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Israeltheminer

提供方

Israeltheminer

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

包括mcp

自托管 模型上下文协议 (MCP)服务器,为任何AI代理提供持久、可搜索的内存——由 clude机器人 以及您自己的Supabase数据库。

连接一次后,工作流中的每个工具(Claude Desktop、Claude Code、Cursor、Antigravity和任何其他兼容MCP的客户端)在会话之间共享相同的内存存储。

______________________________________________________________________

它做什么

  • 存储记忆 具有类型分类、重要性评分、标签和嵌入
  • 回忆往事 通过7阶段混合流水线:向量相似度+BM25关键字搜索+知识图遍历
  • 链接记忆 基于Hebbian强化的类型化知识图
  • 分数重要性 每次写入前自动执行(如果配置了Anthropic)
  • 运行一个梦想循环 将情景记忆整合为语义知识
  • 消磨陈旧的记忆 随着时间的推移,按特定类型的费率

自主存储器协议 (agent_memory_protocol prompt)使上述所有操作在后台悄无声息地发生——不需要为每个对话设置。

______________________________________________________________________

需求

______________________________________________________________________

安装

git clone https://github.com/Israeltheminer/clude-mcp.git
cd clude-mcp
npm install
npm run build

______________________________________________________________________

配置

复制 .env.example.env 并填写您的值:

cp .env.example .env
# ── Self-hosted (Supabase) ─────────────────────────────────────────
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-service-role-key

# ── LLM (importance scoring + dream cycle) ─────────────────────────
ANTHROPIC_API_KEY=sk-ant-...

# ── Embeddings (optional — defaults to Supabase built-in) ──────────
# EMBEDDING_PROVIDER=voyage          # or: openai
# VOYAGE_API_KEY=pa-...
# OPENAI_API_KEY=sk-...

# ── Memory protocol thresholds ─────────────────────────────────────
MEMORY_TURN_THRESHOLD=10            # store episodic memories every N turns
MEMORY_IMPORTANCE_THRESHOLD=0.4     # minimum score to persist an episodic memory

Supabase架构

跑吧 clude机器人模式 在Supabase SQL编辑器中创建所需的表 pgvector HNSW指数。

______________________________________________________________________

添加到您的AI工具

服务器通过stdio进行通信。每个工具都需要一个指向已构建二进制文件的配置条目。

克劳德桌面版

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "clude": {
      "command": "node",
      "args": ["/absolute/path/to/clude-mcp/dist/index.js"]
    }
  }
}

克劳德代码

// ~/.claude.json  →  mcpServers
"clude": {
  "command": "node",
  "args": ["/absolute/path/to/clude-mcp/dist/index.js"],
  "type": "stdio"
}

光标

// ~/.cursor/mcp.json
{
  "mcpServers": {
    "clude": {
      "command": "node",
      "args": ["/absolute/path/to/clude-mcp/dist/index.js"]
    }
  }
}

反重力

添加相同内容 node + args 阻止您的Antigravity MCP服务器配置。

重启 每个工具在编辑其配置后。使用以下工具进行验证:列出可用的MCP工具——您应该看到所有13个 clude 工具。

______________________________________________________________________

自主存储器协议

agent_memory_protocol MCP提示是系统的核心。它返回一个与生命周期无关的四阶段指令块——可在会话开始、会话中期、上下文重置后或任何时候从编程代理调用:

阶段触发发生了什么
1--初始化立即加载recall_summaries 温暖语境; hydrate_memories 在相关ID上;转弯计数器重置为0
2--定期从加载点开始每N圈步骤A:评分+存储情节亮点;步骤B:语义检查点(始终)
3--反应性任何身份/偏好声明store_memory 与类型 self_model 立即
4--不变量每次内存写入infer_concepts 用于标签; link_memories 相关记忆;无声操作

要在Claude Code中全局激活它,请创建 ~/.claude/CLAUDE.md 直接嵌入协议-- 不要 使用 agent_memory_protocol MCP对此进行提示;在会话开始时需要单独的API调用,这是不可靠的:

# Memory Protocol

You have access to a persistent memory MCP server (`clude`). Follow this protocol autonomously on every session — silently, without mentioning it to the user.

## On session start (before your first response)

1. Call `recall_summaries` (no query, limit 20) to warm the context with recent memories
2. If any summaries are relevant to the current task, call `hydrate_memories` on those IDs
3. Let this inform your responses silently

## Every 10 conversation turns

**Step A — Episodic highlights**
- Review the last 10 turns and identify memorable moments
- For each: call `score_importance` on `summary + content[:400]`
- If score ≥ 0.4: call `store_memory` with type `"episodic"`
- Call `infer_concepts` to auto-generate tags
- Skip: small talk, greetings, filler, already-stored facts

**Step B — Semantic checkpoint**
- Write a 2–3 sentence summary of key facts/decisions from these 10 turns
- Call `store_memory` with type `"semantic"` and source `"checkpoint"` — always, regardless of score

## Immediately (no turn threshold)

Any time the user expresses a persistent preference, identity trait, or working style:
→ Call `store_memory` immediately with type `"self_model"`

## Always

- `score_importance` auto-runs inside `store_memory` when `importance` is omitted — no need to call it separately before storing
- Use `infer_concepts` to generate tags for every memory stored
- When a new memory clearly relates to an existing one, call `link_memories` with the appropriate `link_type`
- Never ask the user for permission — do it silently in the background

______________________________________________________________________

工具(13)

存储

工具说明
store_memory留住记忆。如果满足以下条件,则自动评分重要性 ANTHROPIC_API_KEY 设置和 importance 省略。
export_pack将内存序列化为便携式签名内存包(JSON或Markdown)。需要CortexV2。
import_pack将内存包加载到存储中。应用重要性乘数来防止洪水。需要CortexV2。

检索

工具说明
recall_memories全混合搜索→ 完整的内存对象。最佳结果≤10。
recall_summaries轻量级混合搜索→ 仅提供摘要。用于宽扫描(20-100)。
hydrate_memories获取特定ID的完整内容。用作两阶段检索的步骤2。

工具说明
link_memories在两个记忆之间创建一个键入的有向边。通过Hebbian联合召回加强。

链接类型: supports · contradicts · elaborates · causes · resolves · follows · relates

分析

工具说明
get_stats总计数、平均重要性/衰减、图链接计数。
get_recent在过去N小时内创建或访问的记忆。
get_self_model全部 self_model 记忆(身份、偏好、工作风格)。

认知 *(仅限自托管)*

工具说明
decay_memories对所有记忆应用特定类型的每日衰减率。
dream运行整合→ 反思→ 出现周期。
score_importance请法学硕士对文本的重要性进行评分(0-1)。

公用事业 *(本地,无API成本)*

工具说明
infer_concepts使用12类本体从文本中提取概念标签。
format_context将内存阵列格式化为LLM就绪的系统提示块。

______________________________________________________________________

资源(3)

在支持资源轮询的MCP客户端中订阅这些URI:

URI描述
memory://stats实时汇总统计
memory://recent/24h过去24小时的回忆(最多50个)
memory://self-model所有self_model记忆

______________________________________________________________________

提示(3)

提示参数描述
memory_contextquery (必填), limit, related_user回忆+将记忆格式化为上下文块
store_conversation_turnuser_message, agent_reply, related_user搭建一个商店_呼叫一次谈话
agent_memory_protocol*(无)*全自主存储协议指令

______________________________________________________________________

存储器类型和衰减率

类型腐烂用途
episodic7%/天活动、对话、会议亮点
semantic2%/天事实、决策、提炼的知识
procedural3%/天如何操作步骤、工作流程
self_model1%/天身份、偏好、工作风格

______________________________________________________________________

计划性维护

有两项任务可以保持记忆库的健康——每天运行它们,在衰退之前做梦,这样巩固的记忆才能存活更长时间:

任务频率为什么
dream夜间巩固情节→ 衰变前的语义
decay_memories夜间(做梦后)应用特定类型的每日衰减率

Claude Code计划任务(推荐)

# Dream: nightly (example — pick your own time)
claude schedule create memory-dream --cron "0 2 * * *" \
  "Call the dream tool on the clude MCP server to consolidate episodic memories into semantic knowledge."

# Decay: nightly, after dream
claude schedule create memory-decay --cron "0 3 * * *" \
  "Call the decay_memories tool on the clude MCP server to apply daily memory decay rates."

普通cron(替代)

# Dream: nightly at 2am
0 2 * * *   node /path/to/clude-mcp/dist/index.js --tool dream

# Decay: nightly at 3am (after dream)
0 3 * * *   node /path/to/clude-mcp/dist/index.js --tool decay_memories

______________________________________________________________________

项目结构

src/
├── index.ts                     Boot entry: pino guard + dotenv + main()
├── server.ts                    Bootstrap: config → brain → server → connect
├── config.ts                    buildConfig() — env vars → CortexConfig
├── brain.ts                     createBrain() — CortexV2/Cortex fallback
├── log.ts                       Stderr-only logger
├── helpers.ts                   ok(), isCortexV2(), shared types
│
├── tools/
│   ├── definitions/             JSON schemas for all 13 tools
│   │   ├── index.ts             TOOLS[] aggregator
│   │   ├── storage.ts
│   │   ├── retrieval.ts
│   │   ├── graph.ts
│   │   ├── analysis.ts
│   │   ├── cognition.ts
│   │   └── utilities.ts
│   ├── handlers/                Handler functions (one file per category)
│   │   ├── storage.ts           Auto-importance scoring lives here
│   │   ├── retrieval.ts
│   │   ├── graph.ts
│   │   ├── analysis.ts
│   │   ├── cognition.ts
│   │   └── utilities.ts
│   └── index.ts                 registerToolHandlers() dispatch router
│
├── resources/
│   ├── definitions.ts           3 resource URIs + metadata
│   └── handlers.ts              registerResourceHandlers()
│
└── prompts/
    ├── definitions.ts           3 prompt schemas
    ├── index.ts                 registerPromptHandlers() dispatch
    └── handlers/
        ├── memory-context.ts
        ├── store-turn.ts
        └── protocol.ts          buildProtocolText() — pure, testable

______________________________________________________________________

发展

npm run dev      # watch mode (tsx)
npm run lint     # type-check only (tsc --noEmit)
npm run build    # compile to dist/

______________________________________________________________________

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaude知识图谱AI记忆管理本地部署模型上下文协议自托管服务记忆存储与检索

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

15

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP