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 分