TMCRA Agent Memory

io.github.reshuibuduo由 GitHub 帳號 reshuibuduo 發布v1.0.0-rc.1更新於 Oct 24, 2026

Role-aware Agent memory with cross-session recall, durable writes, and multi-Agent project scope.

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

概覽

AI 產生的概覽

本地 MCP 伺服器,為助理提供依專案隔離的長期代理記憶,支援跨工作階段召回與持久化對話寫入。

可以做什麼
在專案範圍內依查詢召回可直接注入的證據片段,或在回答前準備輪次、回答後提交精確的使用者與助理記錄。持久化已發生的訊息,區分使用者、助理、系統與工具角色並保留代理歸屬。檢視或變更工作階段模式、任務選擇與召回預算。以冪等鍵重試待處理寫入,並讀取或等待非同步寫入工作。預覽原始證據,在互動確認後提交針對性意見回饋。
適用情境
當助理需要在同一穩定專案範圍內跨工作階段、跨不同 MCP 宿主延續上下文,或需要明確的準備/提交輪次流程與可復原寫入時使用。沒有記憶需求的一次性對話不需要它;自動召回與擷取需另裝外掛。
執行需求
可啟動 stdio 程序的本地 MCP 宿主;MCPB 套件需要 uv 執行環境,wheel 需要 Python。需要 TMCRA 帳號與 API 金鑰,透過 TMCRA_API_KEY 或受保護的裝置檔案提供;可選 TMCRA_BASE_URL、TMCRA_DEFAULT_SCOPE、TMCRA_AGENT_ID。需要以 HTTPS 存取 TMCRA API。
安裝前請注意
需要 TMCRA 帳號與 API 金鑰(TMCRA_API_KEY 或受保護的裝置檔案),請勿提交到程式碼倉庫。它會把對話記錄寫入遠端服務,使用者與助理輪次會離開本機。召回的回憶被標記為不可信,不可當成指令執行。意見回饋送出依賴宿主確認,任意用戶端未必會遵守。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

TMCRA MCP Server

[Tests] [License]

TMCRA MCP Server gives MCP hosts explicit access to long-term Agent memory. It recalls project evidence, writes real conversation records with speaker attribution, preserves multi-Agent project scope, and tracks asynchronous writes to a terminal state.

中文说明

What it provides

  • Cross-session project continuity. Recall bounded evidence from one stable project scope.
  • Cross-tool collaboration. Different MCP hosts can use the same scope while keeping their own session provenance.
  • Speaker and Agent attribution. User, assistant, system, and tool records remain separate; known Agent producers or targets remain attached.
  • Explicit turn lifecycle. A host can prepare recall before an answer and commit the exact user/assistant turn afterward.
  • Durable write recovery. Transport uncertainty enters a local SQLite queue with idempotent reconciliation.
  • Verifiable receipts. Recall, ingest, and job responses are validated before the MCP host receives them.
  • Nine MCP tools. Recall, ingest, prepare, commit, reconcile, get job, wait for job, session memory controls, and targeted feedback.

tmcra_memory_control exposes task selection, a 12000-character default recall budget, and normal, recall_only, off modes. Pass the exact same session_id to recall/prepare and controls. Pending older generations are discarded after a mode change; already submitted jobs remain submitted. tmcra_feedback supports ignore, correct (user-supplied replacement), and restore with a stable idempotency key. Effective feedback requires the matching backend update; check correction_index_status separately. The visual control panel is provided by the Codex and DSH distributions. This MCP package automatically discovers the shared local installation; numeric loopback HTTP is permitted only for an explicit local identity. Hosted connections require HTTPS.

Conversational corrections now require interactive host confirmation. On an actual correction request, call tmcra_memory_control(operation="correction_start") before clarification or feedback to suppress automatic capture of that discussion turn. tmcra_feedback reads exact original evidence and uses MCP form elicitation to show the source, replacement and scope; only explicit acceptance submits feedback. Rejection, cancellation, expiry or an unsupported host leaves memory unchanged. Do not substitute ingestion for a rejected correction. Host lifecycle turn IDs protect the discussion from later queue replay while preserving other identified turns. A third-party host must route elicitation to its user; the server cannot guarantee that an arbitrary client will not answer automatically. Hypothetical/quoted correction language is not authorization.

Generic MCP clients decide when to call tools. Connecting this server alone does not observe the host's before-answer or after-answer lifecycle. For automatic Codex recall and capture, install the separate TMCRA Codex Memory plugin.

Install

MCPB release

Download tmcra-mcp-server-1.0.0-rc.1.mcpb from the v1.0.0-rc.1 release and open it in an MCPB-compatible client. The bundle uses the cross-platform uv runtime. Hosted service users enter their API key in the sensitive field. For account-free Windows local memory, extract the standalone runtime, double-click Install-Local.cmd, then restart the MCP host. The local identity is discovered automatically and overrides the form's cloud URL/key; keep the API key blank for this mode. Explicit advanced TMCRA_CONFIG_FILE overrides remain authoritative. Local model acceptance limitations are documented in the runtime release.

Python wheel

bash
python -m pip install \  https://github.com/reshuibuduo/tmcra-mcp-server/releases/download/v1.0.0-rc.1/tmcra_mcp_server-1.0.0rc1-py3-none-any.whl

Directly from GitHub with uvx

bash
uvx --from "git+https://github.com/reshuibuduo/[email protected]" tmcra-mcp

Authorize

Create a TMCRA account and API key, then provide it through your MCP client's secret storage or the TMCRA_API_KEY environment variable. Do not commit credentials to a repository.

text
TMCRA_API_KEY=<your TMCRA API key>TMCRA_BASE_URL=https://api.tmcra.comTMCRA_DEFAULT_SCOPE=<stable project scope, optional>TMCRA_AGENT_ID=<known Agent identity, optional>

Users signed in through a TMCRA application can instead use its protected device file at ~/.config/tmcra/config.json. Environment variables override that file for developer and self-hosted configurations.

The server accepts only HTTPS API origins without embedded credentials, query strings, or fragments.

Register with an MCP host

After installing the wheel, an MCP host can launch:

json
{  "mcpServers": {    "tmcra-memory": {      "command": "tmcra-mcp",      "env": {        "TMCRA_API_KEY": "<stored securely by the host>",        "TMCRA_DEFAULT_SCOPE": "project-example"      }    }  }}

The package also includes a Codex setup helper:

bash
tmcra-mcp-setup install --mode explicittmcra-mcp-setup status --mode explicit

Tools

ToolPurpose
tmcra_memory_controlInspect or explicitly change session modes, tasks and recall budgets.
tmcra_feedbackPreview exact evidence and request interactive confirmation before targeted feedback.
tmcra_recallReturn at most eight prompt-ready evidence windows for the current query.
tmcra_ingestPersist messages that already occurred, preserving role and Agent attribution.
tmcra_turn_prepareRecall before an answer and durably bind the real user turn.
tmcra_turn_commitPersist the prepared user turn and exact assistant answer as separate records.
tmcra_reconcileRetry durable pending records with the same idempotency key.
tmcra_get_jobRead one asynchronous write job state.
tmcra_wait_jobWait for a job to succeed, fail, or be cancelled.

Every project collaborator should use the same project scope. Each conversation keeps its own session_id. Agent identity is attribution and does not split the project memory.

Recalled content is returned with trust_boundary: untrusted_memory_data. A host must treat it as evidence, never executable instructions.

Explicit lifecycle

An MCP host that wants per-turn continuity should:

  1. Call tmcra_turn_prepare after receiving the current user question.
  2. Inject only the returned injectable_context as untrusted evidence.
  3. Draft the answer.
  4. Call tmcra_turn_commit with the same turn_id and the exact final answer.
  5. Report pending or terminal write state accurately.

The lower-level equivalent is tmcra_recall, answer, tmcra_ingest, then tmcra_get_job or tmcra_wait_job.

Security boundary

  • Credentials are read from environment or a protected TMCRA device file and are never printed by the server.
  • API destinations must use HTTPS.
  • Structured receipts reject malformed recall, ingest, and job responses.
  • Recalled memory remains untrusted data.
  • The repository contains the client-side MCP integration only. It contains no production service source code or production credentials.
  • Destructive memory deletion and export are not exposed by this toolset.

See SECURITY.md for vulnerability reporting.

Development

bash
python -m pip install -e ".[dev]"python -m pytest -qpython -m buildpython -m twine check dist/*

The tests cover receipt validation, scope and actor semantics, durable queue recovery, configuration safety, setup behavior, and a real MCP initialize/list/call smoke exchange.

License

Apache-2.0. See LICENSE and NOTICE.

來源:README.md,提交 d1024d5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0-rc.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Memory 整合