/ 目錄 / 演練場 / MARM-Systems
● 社群 Lyellr88 ⚡ 即開即用

MARM-Systems

作者 Lyellr88 · Lyellr88/MARM-Systems

跨 Claude、Qwen、Gemini 及任何 MCP 客戶端的持久化、可搜尋記憶體——工作階段、筆記本與語意召回,整合於單一伺服器。

MARM-Systems 是一個 Python MCP 伺服器,為任何 AI 客戶端提供持久化記憶體層:工作階段、筆記本、自動分類的情境日誌,以及語意向量搜尋。支援 STDIO、HTTP 和 WebSocket 傳輸協定。後端採用 SQLite 並啟用 WAL 模式以支援並行存取。

為什麼要用

核心特性

即時演示

實際使用效果

marm-systems.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "marm-systems": {
      "command": "uvx",
      "args": [
        "MARM-Systems"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "marm-systems": {
      "command": "uvx",
      "args": [
        "MARM-Systems"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "marm-systems": {
      "command": "uvx",
      "args": [
        "MARM-Systems"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "marm-systems": {
      "command": "uvx",
      "args": [
        "MARM-Systems"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "marm-systems",
      "command": "uvx",
      "args": [
        "MARM-Systems"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "marm-systems": {
      "command": {
        "path": "uvx",
        "args": [
          "MARM-Systems"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add marm-systems -- uvx MARM-Systems

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: MARM-Systems

在長期專案中跨工作階段建立持久化記憶體

👤 任何與 AI 共同進行多週工作的使用者 ⏱ ~15 min beginner

何時使用: 您每次開始新工作階段都要重新說明相同的專案背景。

前置條件
  • 已安裝並執行 MARM-Systems — docker pull lyellr88/marm-mcp-server && docker run -d -p 8001:8001 lyellr88/marm-mcp-server
步驟
  1. 啟動一個標記專案的工作階段
    marm_start with project tag 'dataplatform-migration'. Log that we're migrating from Redshift to Snowflake, deadline end of Q2.✓ 已複製
    → 工作階段已啟動;初始項目已儲存
  2. 作業時隨時記錄情境
    marm_contextual_log: 'Decided to use Fivetran for CDC replication, evaluated Airbyte but config overhead too high.'✓ 已複製
    → 已自動分類並儲存
  3. 下次工作階段時召回
    marm_smart_recall 'what did we decide about CDC tooling?'✓ 已複製
    → 相關的過往決策浮現

結果: 第 N+1 次工作階段開始時,第 1 到 N 次的所有情境皆可透過查詢取得,無需重新輸入。

注意事項
  • 將所有對話內容全部存入記憶體會干擾召回品質 — 使用 marm_contextual_log 記錄決策和里程碑,而非每一次的對話交流
  • 向量搜尋對專業術語的命中率較低 — 明確以專案名稱為項目加上標籤,作為關鍵字搜尋的備援
搭配使用: drift

透過多個 AI 助理在團隊間共享記憶體

👤 團隊成員分別使用 Claude/Qwen/Gemini 的團隊 ⏱ ~45 min advanced

何時使用: 知識不應被鎖在某個人的 AI 裡。

步驟
  1. 將 MARM 作為共享 HTTP 伺服器執行
    Deploy MARM-Systems on a team server; each teammate points their MCP client at http://marm.team.internal:8001/mcp.✓ 已複製
    → 所有客戶端皆已連線
  2. 記錄共享情境
    marm_contextual_log: 'Database backup runbook is at /runbooks/db-backup.md; last updated 2026-04-10.'✓ 已複製
    → 所有人皆可召回此資訊
  3. 從任意客戶端召回
    From a teammate's Qwen session: marm_smart_recall 'how do I restore the DB'?✓ 已複製
    → 召回相同的答案

結果: 跨 AI 的共享組織知識庫。

注意事項
  • 共享記憶體需要正式的 OAuth 機制 — 請勿依賴開發模式中的硬編碼憑證——在正式使用前請串接您的 IdP
  • 敏感資料可能洩漏至共享召回中 — 使用專案標籤,並以標籤限制查詢範圍

將筆記本作為 AI 可查詢的草稿空間

👤 學習者、研究人員 ⏱ ~5 min beginner

何時使用: 您希望有一個主題範疇的筆記區域,讓 AI 日後可以搜尋。

步驟
  1. 建立一個筆記本
    marm_notebook_add name='rust-ownership' with entry: 'Move vs borrow: move transfers ownership, borrow lets you peek.'✓ 已複製
    → 筆記本已建立
  2. 邊學邊新增
    marm_notebook_add 'rust-ownership': 'Mutable borrow is exclusive; only one at a time.'✓ 已複製
    → 項目已附加
  3. 稍後召回
    marm_notebook_show 'rust-ownership'✓ 已複製
    → 完整筆記本內容

結果: 一個可查詢的學習日誌。

組合

與其他 MCP 搭配,撬動十倍槓桿

marm-systems + drift

drift 記憶程式碼規範;MARM 記憶專案決策

Recall drift conventions AND MARM decisions for project 'dataplatform-migration' and summarize where they interact.✓ 已複製
marm-systems + claude-code-organizer

將短期記憶從 CC 移至 MARM 以進行長期保存

Organizer listed my 12 biggest memories — move the 5 project-specific ones into MARM notebooks.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
marm_start project?, tags? 任何工作階段開始時 free (local)
marm_refresh session_id? 工作階段中途重新載入情境 free
marm_smart_recall query: str, top_k?: int 對過往項目進行語意搜尋 free (local embeddings)
marm_contextual_log text: str, tags?: str[] 持久化儲存決策/里程碑/事實 free
marm_log_session session_id 回顧過往的工作階段 free
marm_notebook_add name: str, entry: str 以主題為範疇的筆記記錄 free
marm_notebook_use name: str 在工作階段中固定一個主題 free
marm_notebook_show name: str 讀取一個筆記本的內容 free
marm_summary scope: session|notebook|tag, id 濃縮較長的歷史記錄 free (local)
marm_context_bridge from_session, to_session 跨專案推理 free

成本與限制

運行它的成本

API 配額
無——僅限本機
每次呼叫 Token 數
召回回應通常為 500-2000 tokens
費用
免費,開放原始碼
提示
定期輪替或封存舊的工作階段——SQLite 可應對規模成長,但雜訊過多會降低召回品質。

安全

權限、密鑰、影響範圍

憑證儲存: 本機 SQLite;共享 HTTP 模式請使用環境變數存放 OAuth 密鑰
資料出站: 預設無資料外流(本機儲存);若使用共享模式,資料僅在您的網路內部流通
切勿授予: Exposing port 8001 to the public internet without an auth layer

故障排查

常見錯誤與修復

Cannot connect to localhost:8001

容器未執行。請用 docker ps 確認狀態;再用 docker start marm-mcp-server 啟動。

驗證: curl http://localhost:8001/docs
Embeddings model download fails

首次執行時需下載模型,須有對外網路連線。下載完成後即可離線使用。

驗證: Check docker logs for HuggingFace download
Recall returns unrelated entries

項目數量過少導致嵌入品質不佳;請新增更多項目,或事先以標籤過濾。

驗證: marm_smart_recall with tag filter

替代方案

MARM-Systems 對比其他方案

替代方案何時用它替代權衡
drift您需要以程式碼為主的記憶體(規範、決策)聚焦於程式碼;通用性較低
Letta (MemGPT)您需要的是研究等級的記憶體代理,而非單純的伺服器執行環境較重;架構具較強的主觀性
CC native memories僅使用 Claude Code;無跨客戶端需求無語意搜尋;會使情境視窗膨脹

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills