TOMC Memory

io.github.ZipengWu365由 GitHub 帳號 ZipengWu365 發布v0.1.1更新於 Oct 24, 2026

CPU task-specific context preparation and explicitly saved local project notes through MCP.

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

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

概覽

AI 產生的概覽

本機 MCP 伺服器,可從對話歷史準備針對特定任務的上下文,並保存明確記錄的專案筆記,回傳已變更事實的最新值。

可以做什麼
  • 依你提供的對話歷史,為特定任務準備精簡後的上下文,並保留已變更事實的最新版本。
  • 檢索已保存的專案筆記與事實,並附上來源行。
  • 在本機保存新的專案筆記,並可刪除單一筆記本。
  • 當後續內容可能改動某個值時,將該值標記為不確定,並附上對應行供核對。
適用情境
適合反覆向新的 AI 對話解釋同一個專案、並希望取得最新版本決定而非舊版本的情況。較適合較長的歷史(約 1 萬 token 以上);短對話效益很小。
執行需求
以本機程序形式在使用者電腦上執行(僅桌面端)。從原始碼安裝需要 Python 3.10 或更新版本;Claude Code 與 Codex 外掛需要 uv。筆記保存在使用者家目錄下的本機 SQLite 檔案中。未宣告需要帳號、API 金鑰或環境變數。
安裝前請注意
它不會壓縮助理目前正在進行的對話,只處理你交給它的歷史與已保存的筆記。比對以詞語為基礎而非語意,改寫過的更新可能被漏掉,預算較小時更明顯。保存的筆記會留在磁碟上,需用刪除工具或全部清除指令移除。只有在開啟保存後才會儲存結果。部分用戶端的工具呼叫尚未在真實機器上驗證。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[TOMC Memory]

TOMC Memory

English | 简体中文 · v0.3.1 research preview · MIT · Python 3.10+

I got tired of re-explaining my project to every new AI chat, and then getting the old version of a decision back.

When a fact changes, only the latest version comes back.

Say your project chat moved from Flask to Django, then FastAPI, then Litestar. TOMC Memory hands your assistant framework = Litestar, plus the line it came from.

After installing, say to your assistant: "Try TOMC Memory". In a terminal: tomc try.

  • Latest value, offline check (v0.3.0): 144 questions per budget, each about a fact that changed 3 to 5 times. At the default budget the prepared context held the latest value every time (v0.2.1: 58%). At a 10% budget: 85% (v0.2.1: 51%). Synthetic notes and chats, no model call. We wrote these questions alongside the fixes, so treat them as our regression test, not an independent evaluation.
  • Smaller requests in Codex (0.1.0 preview, not re-run since): 9 synthetic project chats of about 10K to 40K tokens, 5 questions each, gpt-6.1-sol. Keeping 40% of the history cut request input by 29.7% on average, and all 45 answers stayed right. One run per condition.
  • BEAM long-history benchmark (paper experiments): same reader model on both sides, 3 readers, 6 other memory methods. TOMC had the higher mean score in 54 of 54 comparisons at 500K to 10M tokens, and 17 of 18 at 100K. Mean scores only; not comparable with other projects' BEAM numbers.

Every number, with its conditions and failures · Before you use it · Install

Before you use it

  1. It does not shrink the chat your assistant is already having. Claude Code and Codex manage their own chat. TOMC Memory works on history you hand it and notes you saved. Context ownership
  2. Short histories gain little. Under about 10K tokens there is not much to cut. With the default budget, our earlier tests saved roughly 10–20% of input (Codex 9.2%, Claude API-style 19.8%; 0.1.0 previews). Smaller budgets save more but can drop the latest value. Check them on your own tasks first. The default keeps 80% of a history up to 10K tokens, sliding to 60% at 1M, and never less than 1,024 tokens.
  3. It matches words, not meaning. A reworded update such as "scratch that, go with Django" can be missed, mostly at small budgets. When a later line may have changed a value, the value is marked STATE? and that line is attached so you or your assistant can check it.
  4. What gets stored, and how to erase it. Results of prepare_context and recall_memory are not saved unless you turn it on (tomc settings --save-mcp-results on). Notes you save with remember_memory stay on your computer in ~/.tomc/memory.sqlite3. Delete one notebook with forget_memory, or everything with tomc erase-all --yes. Security and privacy
  5. Not every client is checked. Codex and Claude Code passed real model calls with earlier previews. For Cursor, TRAE and WorkBuddy the setup is written, but their tool calls have not been checked on real machines. Claude Desktop installation has not been checked in the app.
  6. The paper is not public yet. The benchmark numbers come from our own runs and setup. The evidence page lists sources, sample sizes and what can be rechecked offline (make reproduce).

Install

Each path ends the same way: say "Try TOMC Memory" in a new chat, and run tomc doctor if something looks wrong. The Claude Code and Codex plugins need uv. Running from source needs Python 3.10 or newer (python3 --version; the macOS system Python 3.9 is too old).

Claude Code

text
/plugin marketplace add ZipengWu365/TOMC/plugin install tomc-memory@tomc

Start a new session, check /mcp for plugin:tomc-memory:tomc, then say "Try TOMC Memory" or run /tomc-memory:try. More Claude Code notes

Codex

Download tomc-memory-codex-0.3.1.zip, unzip it into a folder you will keep, and run there:

bash
uv run --no-project --python 3.12 install.py --checkuv run --no-project --python 3.12 install.py

The installer starts the server once to check it. Open a new Codex session and say "Try TOMC Memory". Full Codex steps

Any MCP client (Cursor, Claude Desktop, WorkBuddy, TRAE …)

bash
git clone https://github.com/ZipengWu365/TOMC.git && cd TOMCpython3 -m venv .venv && .venv/bin/python -m pip install -e '.[mcp]'.venv/bin/tomc setup --client cursor --write   # or claude-desktop, claude-code, codex, workbuddy.venv/bin/tomc doctor

--write backs up the client's config file first and keeps your other servers. For TRAE or a project file, add --config path/to/mcp.json. Restart the client and say "Try TOMC Memory". On Windows use py -3.12 -m venv .venv and .venv\Scripts\. Per-client guides

Python API

python
from tomc import prepare_context  # pip install -e . from a clone; no dependencies
prepared = prepare_context(history, task)response = client.chat.completions.create(model=model, messages=prepared.messages)

Send prepared.messages in place of the old history; appending it adds input. .venv/bin/tomc try shows a worked example offline. API guide

Mainland China network

If GitHub or PyPI downloads stall, use a mirror for pip and uv:

bash
python3 -m pip install --user uv -i https://pypi.tuna.tsinghua.edu.cn/simpleexport UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simpleexport UV_PYTHON_INSTALL_MIRROR=https://registry.npmmirror.com/-/binary/python-build-standalonepython3 -m uv run --no-project --python 3.12 install.py   # Codex installer, run in the unzipped folder

For a source install, add -i https://pypi.tuna.tsinghua.edu.cn/simple to the pip install line. In PowerShell, set the variables with $env:UV_DEFAULT_INDEX="…".

Go deeper

Community, citation and license

Try, compare, contribute: First-run reports · Context-compression evaluation note · Contribution guide

Follow Zipeng Wu for work across time-series research software and AI task memory. Star this repository to save TOMC; use Watch settings for project notifications. Following or starring is optional and is never required for help.

[GitHub Stars] [Cumulative recorded clones]

Cumulative clones · recorded since 2026-10-02 · updated 2026-11-05 UTC. Method and updates

MIT License: free to use, change and ship, including commercially; keep the copyright and license notice. If TOMC Memory helps your research, please cite it with CITATION.cff (GitHub's "Cite this repository" button). Examples are synthetic; the repository holds numeric benchmark aggregates only, without question text, answers or API payloads. Data provenance · Data and licensing

來源:README.md,提交 14b09be

工具

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

版本歷史

1
  1. v0.1.1最新Oct 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Memory 整合