Alaya Mcp

io.github.SecurityRonin由 GitHub 账号 SecurityRonin 发布v0.4.7更新于 Oct 28, 2026

Local memory engine for AI agents with knowledge graphs, forgetting, and semantic recall

已验证STDIO仅桌面数据库知识与记忆

概览

AI 生成的概览

面向 AI 助手的本地记忆引擎:把对话片段存入 SQLite,构建知识图谱,并进行语义召回。

可以做什么
  • 存储与检索记忆:保存对话片段,并对其做语义搜索
  • 管理知识:写入预先抽取的事实与关系、浏览已抽取知识、探索知识图谱
  • 查看记忆状态:系统健康与统计、自动形成的分类体系、已固化的用户偏好
  • 执行维护:触发强化、转换、遗忘等生命周期操作
  • 配置嵌入提供方及其他选项
适用场景
适合希望助手在本机跨会话保留结构化长期记忆、避免每次注入完整上下文,并让弱记忆自然衰减、强记忆长期保留的场景。
运行要求
以 npm 包 alaya-mcp 通过 stdio 在本地运行,例如用 npx 启动。数据保存在本地 SQLite 数据库,默认位于用户主目录下,可用 ALAYA_DB 指定路径。可选的 ALAYA_LLM_API_KEY、ALAYA_LLM_API_URL 与 ALAYA_LLM_MODEL 用于启用 LLM 知识抽取;不设置时由助手自行抽取知识,检索退化为 BM25。
安装前请注意
可选的 ALAYA_LLM_API_KEY 是保存在客户端配置中的密钥;一旦设置,记忆内容会发送到 ALAYA_LLM_API_URL 指定的 OpenAI 兼容端点,请选择可信服务商。该服务器会写入并维护本地数据库,生命周期维护可能遗忘记忆。仅支持桌面客户端。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Alaya Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

alaya-mcp

The only memory engine with neuroscience-grounded memory dynamics — Bjork dual-strength forgetting, retrieval-induced suppression, and Hebbian co-activation — in a zero-dependency embeddable Rust library.

Stores conversation episodes, consolidates knowledge through a cognitive lifecycle, and builds a personal knowledge graph — all in a local SQLite database.

Install

Claude Code

Add to ~/.claude/claude_code_config.json:

json
{  "mcpServers": {    "alaya": {      "command": "npx",      "args": ["-y", "alaya-mcp"]    }  }}

Claude Desktop

Add to your Claude Desktop MCP config:

json
{  "mcpServers": {    "alaya": {      "command": "npx",      "args": ["-y", "alaya-mcp"],      "env": {        "ALAYA_LLM_API_KEY": "sk-...",        "ALAYA_LLM_API_URL": "https://api.openai.com/v1/chat/completions",        "ALAYA_LLM_MODEL": "gpt-4o-mini"      }    }  }}

The ALAYA_LLM_* env vars are optional — they enable automatic knowledge extraction. Without them, the agent extracts knowledge from its own context.

MCP Tools

ToolDescription
rememberStore a conversation episode
recallSemantic search across memories
statusMemory system health and stats
knowledgeBrowse extracted knowledge
learnStore pre-extracted facts and relationships
categoriesView emergent category taxonomy
preferencesTrack crystallized user preferences
neighborsExplore the knowledge graph
lifecycleTrigger maintenance (strengthen, transform, forget)
configureSet embedding provider and other options

How It Works

  1. Remember — store conversation episodes as they happen
  2. Consolidate — extract facts, relationships, and concepts from episodes
  3. Strengthen — co-retrieved memories strengthen their connections (Hebbian LTP); retrieving memory A actively suppresses competing memories B and C (retrieval-induced forgetting)
  4. Categorize — emergent categories form automatically from your knowledge
  5. Forget — Bjork dual-strength decay separates storage strength (how well-encoded) from retrieval strength (how easily found); weak memories fade, strong ones persist
  6. Crystallize — implicit preferences emerge from accumulated impressions (vasana), no LLM required

All data stays on your machine in ~/.alaya/memory.db.

Why Alaya

ProblemFile-based memoryAlaya
Token wasteFull-context injection (~35K tokens/msg)Ranked retrieval — only top-k relevant memories
No structureEverything in one fileThree typed stores: episodes, knowledge, preferences
No forgettingFiles grow until manually curatedBjork dual-strength decay + retrieval-induced forgetting
No associationsFlat files, no linksHebbian co-retrieval graph (LTP/LTD)
Brittle preferencesAgent-authored summary, driftsImplicit preferences emerge from impressions (vasana)
LLM requiredCan't function without oneGraceful degradation: no embeddings → BM25-only

Links

License

MIT

[图片]

来源:npm/alaya-mcp/README.md,提交 7e43e0b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.7最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分