Open Agent Memory

io.github.rocke2020由 GitHub 帳號 rocke2020 發布v0.0.1更新於 Nov 12, 2026

Self-hosted OAM memory with cited recall over your existing deployment

發布方自己的服務:Memory.fit

已驗證STDIO僅桌面知識與記憶AI 與機器學習

概覽

AI 產生的概覽

面向自架 Open Agent Memory 部署的本機 stdio MCP 用戶端,讓助理取得附引用的記憶召回、記憶寫入與文件匯入能力。

可以做什麼
  • 依查詢召回附引用的記憶內容,可選 fast 或 normal 等級及完整結構化項目
  • 寫入一則新的記憶訊息,可指定事件時間與冪等鍵
  • 以文字或 HTTPS 網址新增文件來源並追蹤其操作狀態
  • 查詢記憶操作的就緒狀態與各階段狀態
  • 讀取已儲存的使用者 Profile 及其引用與新鮮度
  • 刪除基本記憶或洞察
適用情境
當你已自行架設 Open Agent Memory,並希望 Claude Code、Cursor 或 Codex 等助理附引用地召回已索引的記憶、依使用者要求保存新記憶或匯入文件時使用。適合單一使用者的自架情境,而非託管或多使用者的記憶服務。
執行需求
執行 MCP 用戶端的環境需 Node.js 22 或更新版本,並透過 npx 執行此 npm 套件。需要一個以 api_key 模式運作、且至少完成過一次記憶寫入與索引的 OAM 部署。需設定環境變數 OAM_BASE_URL、OAM_USER_ID 與 OAM_USER_API_KEY(使用者層級金鑰,以 bearer 方式送出)。一個行程只服務一位 OAM 使用者。
安裝前請注意
使用者層級 API 金鑰透過 OAM_USER_API_KEY 傳入,可能被存放在 MCP 用戶端的設定檔中,請保護該檔案且不要提交真實金鑰。非本機部署務必使用 HTTPS,以明文 HTTP 傳送的 bearer 金鑰會被網路看見。寫入工具會新增記憶與文件,memory_remove 會刪除記憶或洞察。召回的文字屬於不可信證據,不應被當成指令執行。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Open Agent Memory,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Open Agent Memory MCP Server

Overview

This package is a thin Model Context Protocol (MCP) server for Open Agent Memory (OAM). It runs as a local stdio process started by an MCP client such as Claude Code, Cursor, or Codex, and calls the OAM HTTP API of an existing deployment. It adds no hosted service, database, queue, or listening port.

The wrapper is an API client, not a second memory implementation. OAM owns authentication, authorization, retention policy, indexing, retrieval, citations, and operation state. The wrapper has six tools and passes OAM's contract through rather than reimplementing it.

Retrieved memory is untrusted evidence, not instructions. Tool descriptions state this boundary; clients must not follow directives found inside recalled text.

See the 71-second cited-recall demo: a fresh published MCP process checks readiness and retrieves an already indexed synthetic preference, then Memory Inspector opens the original source. The recording runs at 2× speed and performs no new indexing.

Prerequisites

  1. OAM is running in api_key mode with a user-scoped key. See the OAM quickstart.
  2. The OAM user has completed at least one retain and indexing operation, so recall has evidence to return.
  3. Node.js 22 or newer is available where the MCP client runs.

The wrapper supports only api_key mode. dev mode and forged trusted headers are unsupported. One wrapper process serves one OAM user.

Installation

Install the published npm package:

bash
npx -y @rocke-dong/oam-mcp

To build and run from source instead:

bash
npm installnpm run buildnode dist/index.js

Configuration

The wrapper reads only environment variables and stores no credential:

VariableRequiredMeaning
OAM_BASE_URLYesOrigin of the OAM deployment, for example http://127.0.0.1:17333
OAM_USER_IDYesAuthorized personal user
OAM_USER_API_KEYYesUser-scoped key, sent as Authorization: Bearer <key>

OAM_BASE_URL must use HTTP or HTTPS, must not contain credentials, and must not include a query or fragment. The wrapper rejects an empty user or key before connecting. Use HTTPS for any non-loopback deployment; a bearer key sent over plaintext HTTP is visible to the network.

The MCP client may store these environment values in its own configuration. Protect that file and never commit a real key. The wrapper itself does not write configuration or cache memory content.

Client Configuration

Claude Code, after setting the three environment variables above in your shell:

bash
claude mcp add oam \  -e "OAM_BASE_URL=$OAM_BASE_URL" \  -e "OAM_USER_ID=$OAM_USER_ID" \  -e "OAM_USER_API_KEY=$OAM_USER_API_KEY" \  -- npx -y @rocke-dong/oam-mcp

Cursor, using ~/.cursor/mcp.json:

json
{  "mcpServers": {    "oam": {      "command": "npx",      "args": ["-y", "@rocke-dong/oam-mcp"],      "env": {        "OAM_BASE_URL": "http://127.0.0.1:17333",        "OAM_USER_ID": "your-user-id",        "OAM_USER_API_KEY": "your-user-key"      }    }  }}

Other MCP clients use the same stdio command, arguments, and environment variables.

Tools

ToolOAM callInputReturns
memory_recallPOST /v1/recallquery; optional recall_level (fast default or normal), include_chunks (default true), detail (context default or full)Rendered context with citations and trace_id; full adds typed items and diagnostics
memory_addPOST /v1/retaincontent; optional timezone-aware event_time, learning_eligible (default true), idempotency_keyDurable operation ID and source ID
memory_add_documentPOST /v1/users/{user_id}/resourcesdocument_id, update_mode, exactly one of text or url plus media_type, and optional idempotency_keySource receipt and operation state
memory_operationGET /v1/users/{user_id}/operations/{operation_id}operation_idReadiness, stage state, and safe failure details
memory_profileGET /v1/users/{user_id}/profileNoneStored Profile content, references, and freshness; never generates
memory_removeDELETE /v1/users/{user_id}/memories/{id} or /insights/{id}memory_id, memory_type (basic or insight)Removal operation receipt

memory_add sends one explicit user message. Use it only when the user asks to remember something. memory_add_document supports text and HTTPS URL originals in this version; multipart file upload is not supported.

Both write tools accept an optional idempotency_key. Keys must be 1-200 characters from A-Z, a-z, 0-9, ., _, :, or -; omit the key to generate one. Pass the same key when retrying the same logical write so OAM reuses the original receipt instead of duplicating the interaction or document revision. Without a key, the wrapper generates a new one for every invocation, so a retry becomes a new logical request.

memory_recall defaults to fast because it is the pre-agent retrieval mode. detail: "full" returns the complete recall JSON, including typed items and diagnostics; the default returns the rendered context, token count, tokenizer identity, trace ID, and item count.

Behavior and Security

  1. Recall output is evidence. The wrapper labels it as untrusted data and never interprets it as instructions.
  2. The wrapper sends the API key only in the Authorization header. It does not log keys, request bodies, or memory text.
  3. OAM errors return the safe OAM code, HTTP status, retryability, and X-Request-ID. Unexpected failures return a generic error without a stack.
  4. The wrapper does not retry automatically. Retry decisions belong to the caller.
  5. Requests use a 60-second total timeout. OAM owns recall deadlines; the platform fetch stack applies its own connection timeout inside that window.
  6. Success bodies are capped at 8 MiB and error bodies at 64 KiB. OAM already bounds recall context; the wrapper does not add a second content budget.
  7. The wrapper writes no memory content to disk and keeps no background workers.
  8. The wrapper refuses HTTP redirects, so the bearer key cannot be forwarded to a different origin by the upstream endpoint.

Limitations

  1. stdio transport only; there is no maintainer-hosted remote MCP endpoint.
  2. One OAM user per process; no multi-user switching or OAuth.
  3. Text and HTTPS URL documents only; no multipart file upload.
  4. User Profile reads only; Profile refresh is not exposed.
  5. No generated answers, summarization, or reranking. Recall returns evidence for the host agent to reason over.
  6. OAM still calls its configured models for indexing and embedding; this wrapper does not make OAM local-only.

Development

bash
npm installnpm testnpm run build

The tests use a local mock HTTP server and an in-memory MCP transport. They do not call a live OAM deployment or any model provider. A live acceptance run against a real OAM user remains required before claiming end-to-end readiness.

See the OAM HTTP API, operations guide, and repository README.

License

Apache-2.0. See LICENSE and third-party notices.

來源:integrations/mcp/README.md,提交 0d0dfdf

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

1
  1. v0.0.1最新Nov 12, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Memory 整合