
Memory Arbiter Mcp
io.github.billy12151由 GitHub 帳號 billy12151 發布v0.18.4更新於 Nov 4, 2026
Local SQLite MCP memory: evidence-based recall, advisory conflict notices, authorized governance.
發布方自己的服務:Ahkam — Saudi court rulings
概覽
本機 SQLite 記憶伺服器,讓多個編碼助理共用一份帶出處的事實庫,支援以證據為基礎的回憶與衝突提示。
- 可以做什麼
- 在共用記憶庫中寫入、尋找、批次尋找、依區間精確讀取、更新與判定事實
- 唯讀檢視記憶健康度、衝突分組與詳情、歷史、過期與稽核、實體與工作區
- 執行經明確授權的治理操作,例如退役、套用衝突方案與確認
- 修復證據索引、全庫衝突掃描、清理歷史與回放備份
- 每次呼叫回傳結構化結果,包含警告、降級標記與需留意事項
- 適用情境
- 適合讓 Claude Code、Cursor、Codex 等多個編碼助理共用一份持久記憶,而不是各記各的;也適合需要帶原文位移的回憶、需要浮現互相矛盾的事實,以及要求資料只留在本機、變更需明確授權的情境。
- 執行需求
- 以本機 Python 套件執行(pip install memory-arbiter-mcp),用 mema 指令透過 stdio 啟動,可選本機回環的 streamable-http 模式。需在 config.json 設定 client 與 agent_id(留空則拒絕啟動)、指定 SQLite 資料庫路徑;證據回憶與寫入時衝突仲裁還需本機嵌入 GGUF 模型和 mDeBERTa 判定模型。設定以設定檔為準,MEMORY_ARBITER_* 環境變數作為備援。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Memory Arbiter Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Memory Arbiter MCP
[PyPI] [Website] [License] [Python]
English | 中文
Official site & docs: memarbiter.cn
Memory Arbiter (迷码) is a capability amplifier for your AI agents: plug it in over MCP and every agent you use — Claude Code, Cursor, Codex, ZCode — becomes one assistant with a running memory. Decisions made in Claude today are usable in Cursor tomorrow; every fact carries its provenance, collisions get surfaced before they bite, and what you've locked cannot be silently overwritten. One SQLite file on your machine holds every fact in full; every model — embeddings, conflict judge — runs locally.
Current release:
0.18.4· local-first · MCP-native · 4 tools · knowledge workbench in0.18.0
In one minute: what mema does for you
Every coding agent you use — Claude Code, Cursor, Codex, ZCode — keeps its own notes and knows nothing about the others. Facts get duplicated, contradicted, and silently go stale. mema replaces that with one trusted fact store all your agents share:
- Recall that actually works. Lexical and sentence-level evidence channels search in parallel and fuse by rank: 65/65 self-recall on the release exam. Sub-threshold candidates never reach a result page — what it returns is what you can cite — and every hit carries source offsets, so
read span=[start,end]slices the exact original text. - Conflicts get surfaced, not buried — and not spammed. When two facts disagree, a self-trained local mDeBERTa judge (one conflict probability, no prompt engineering, no winner-picking) calls it: only high-confidence conflicts interrupt you, hearsay-style narrative lines are dismissed by a code rule, and everything else lands in a small weekday triage queue your agent clears band by band — so a strict threshold never means a lost finding, and an open gate never means noise. On the release exam, 94.1% of the conflicts it interrupts you with are real.
- Facts stay yours — and stay safe. Full original text in one SQLite file on your machine, provenance on every write, version history on every edit, trust levels that lock what you confirmed. mema dials out nowhere on its own — the only optional call is a PyPI update check (the console workbench talks to the LLM endpoint you configure).
- A knowledge base, curated by you. The local browser console lets you pick which memories count as knowledge, browse them by workspace → tag with rendered markdown and relation graphs, and study them with a bring-your-own-LLM workbench (knowledge summary / key points / merge & tidy / self-quiz / plain-words explain / ask-me / timeline) whose outputs write back through the standard pipeline.
Benchmarks
Public: LoCoMo-Refined
Evaluated on LoCoMo-Refined (all 1,382 questions, official judge Qwen3-14B):
Context: Mem0's full pipeline scores 48.91% on the same text-only basis (re-scored by the benchmark authors) — bare mema with no LLM in the write path matches it; with a writer-agent, mema's text-only score trails only MemoraX on the leaderboard. Full methodology and reproduction: evals/locomo/RESULTS.md.
Internal release exam (shipped configuration)
Every release must pass the internal exam suite — fixed fixtures: 42 recall queries across five query kinds (paraphrase / lookup / legal / far / keyword), 106 conflict pairs across four label classes (33 true conflicts), and four similarity-label groups (as of 0.18.0, shipped judge and thresholds; reproduce with eval/runner.py --suite all):
The exam is deliberately conservative and precision-favored: whatever the strict gate withholds is not lost — mid-band suspects land in the weekday triage queue instead. This is the quality bar that ships, re-measured on every release.
Install & quickstart
Install with your AI Agent
Paste this into Codex, Claude Code, Cursor, or another coding agent with terminal access:
The agent treats this README as the source of truth, picks uvx/core/vec/semantic-local from your environment, and stops for user input when a safe choice cannot be inferred. A successful install is not complete until mema doctor has run and every warning has been reported. On a fresh install the agent may also offer a one-minute product demo — it first checks the mema-first-run-demo-status marker memory (offered at most once, globally; skipped silently if it exists).
Install manually
Or step by step:
Then wire your MCP client from examples/*.mcp.json and start the server with mema. Missing capabilities (models not downloaded) surface as a persistent degraded banner with remediation — an incomplete install cannot pass for a complete one.
Full documentation, the Team edition and the personal edition live at memarbiter.cn (docs: memarbiter.cn/docs).
Two things to know before first use:
- Identity is explicit. Set
clientandagent_idin config.json — no built-in defaults, the server refuses to start when either is blank. rememberrequiresworkspace. Callmemory_review(view="workspaces")first to list existing buckets, then pass one;'default'is the global pool.
The four tools
Every call returns {ok, mode, warnings, degraded, data}; things needing your attention arrive as notices or data.action_required. Point any agent at the packaged rule: memory(action="help", data={"topic":"agent_onboarding"}).
The daily loop is four calls — remember a reusable fact, find to recall, read for exact lookup, update when a newer source replaces an old fact (never a second active copy of one source of truth). find is an index page (metadata + content_chars + outline with source offsets); batch_find merges 8 queries into one round-trip; read span=[start,end] quotes exactly; an empty recall says so honestly instead of stuffing recent memories.
What's inside
Conflict arbitration, included. Candidate pairs surviving a deterministic funnel (sentence prefilter → memory screen → cosine band → rule evidence) are judged by the local mDeBERTa encoder — two bare row texts in, one calibrated conflict probability out. Only high-confidence conflicts notify; narrative hearsay is dismissed by a post-verdict code rule; mid-band suspects land in a bounded two-band ledger that a weekday triage task clears with row-level evidence — never in user-facing lists, never a full-library rescan. The judge never picks a winner and never edits memory: findings live in one auditable conflicts lifecycle (open → applying → resolved) your agent walks under explicit authorization (judge → apply_conflict_action → resolve_conflict, CAS-pinned revisions).
A knowledge workbench, included. memory-arbiter console opens a local browser console: curate your knowledge base (one-click kb_member add/remove — a dedicated column agents cannot drop by rewriting tags), browse by workspace → tag with markdown and one-hop relation graphs, and run seven one-click study actions on any memory (knowledge summary / key points / merge & tidy / self-quiz / plain-words explain / ask-me / timeline) with your own OpenAI-compatible API — outputs write back as memories, attributed to the console.
Trust, enforced. Provenance on every write, append-only version history, normal/protected/locked trust levels plus the user_confirmed label, and per-action authorized=true on every state-changing governance call. Workspace isolation comes in none/weak/strict — under strict, a new workspace stays pending until you confirm it, and the reserved default pool is invisible from project scopes. Workspaces listed in a recall_blacklist.jsonl file next to the database are excluded from unscoped recall; mema doctor reports the effective list.
Configuration
File-only, in ~/.config/memory-arbiter/config.json. The complete surface is 34 keys — full template at examples/memory-arbiter.config.example.json, per-key docs and migration tables in docs/INTEGRATION.md. The keys that matter on day one:
embedding.model_path— pointing at a local GGUF model is the sole intent to enable evidence recall.semantic_conflict.mdeberta_ckpt— pointing at the judge checkpoint (see below) enables write-time arbitration.mcp.transport—stdio(default) orstreamable-httpfor one shared local server.- Six launch-context environment variables exist (
MEMORY_ARBITER_CONFIG/DB_PATH/BACKUP_JSONL/MCP_TRANSPORT/CLIENT/AGENT_ID); config file wins, and any otherMEMORY_ARBITER_*export warns "no longer read".
HTTP mode: sharing one local server
stdio (default) needs no background process. To share one server across several clients: set mcp.transport to "streamable-http", keep the process alive (launchd template in examples/ — mema has no built-in daemon), and point clients at http://127.0.0.1:8000/mcp with the fixed X-Mema-Client/X-Mema-Agent-Id headers from examples/streamable-http.mcp.json. Loopback only; headers are provenance, not authentication. Claude Desktop / Claude Code connect through a one-entry mcp-remote bridge — copy it from the same example file.
Conflict judge model (mDeBERTa, optional)
One-time manual install (the ~556MB fp16 checkpoint does not ship on PyPI):
pip install memory-arbiter-mcp[mdeberta];- download
mdeberta-v78_ep5_fp16.pt(+ themdeberta-basetokenizer directory) from the mini-clash release artifacts (already included in the offline install bundle frommemarbiter.cn— skip this step there); - point
semantic_conflict.mdeberta_ckptat it — auto-enables and preloads at startup;mema doctorverifies the digest and label contract.
Unconfigured = write-time arbitration disabled; the weekday triage queue stays empty until you enable it.
Degradation
- No sqlite-vec / embedding model: lexical recall and governance continue, evidence indexing is unavailable.
- No judge: write-time arbitration pauses; nothing lands in the triage queue.
- SQLite unavailable: writes fall back to the append-only JSONL envelope; workspace decision state requires the database.
Upgrading from an older database
Databases older than schema generation workspace_state_v1 are refused at startup — run the side-by-side mema upgrade (preview with --dry-run, the source database is never deleted). The full operational guide — WAL-safe backup, what gets carried over and what is intentionally dropped, the post-upgrade scan epoch — lives in docs/UPGRADE.md (中文版 docs/UPGRADE.zh-CN.md).
Development
During development, package/docs may describe an unreleased dev version while server.json (the MCP Registry manifest) stays at the last released version; scripts/sync_version.py advances it at release time and --check prevents drift.
中文摘要
Memory Arbiter(迷码)是面向 AI Agent 的本地可信事实层:每条事实只存一份完整原文,向量与索引皆可重建;写入带出处、编辑带版本、信任级别防静默改写。冲突仲裁与知识库工作台开箱即得——mDeBERTa 二分类判定走宽严双门(宽门保召回、严门保安静),conflicts 表走 open → applying → resolved 可审计生命周期;浏览器控制台提供知识库策展(kb_member 独立治理位)与自带 LLM 的学习工作台。公开评测 LoCoMo-Refined 文本类口径写入代理 65.62%、零抽取打平 Mem0;内部发版考试自召回 65/65。完整中文文档见 README.zh-CN.md;另见 INTRO.md、docs/INTEGRATION.zh-CN.md 与 docs/UPGRADE.zh-CN.md。
License
Apache-2.0 — see LICENSE.
來源:README.md,提交 9e7194d
工具
0版本歷史
6- v0.18.4最新Nov 4, 2026
- v0.17.1Oct 5, 2026
- v0.16.12Sep 22, 2026
- v0.16.8Sep 17, 2026
- v0.16.7Sep 16, 2026
- v0.16.5Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Arbiter 整合
Ahkam — Saudi court rulings
sa.arbiter官方發布者
檢索已公佈的沙特法院判決,並獲得僅基於所檢索判決的分析。AI 翻譯

Saudi Law Portal · البوابة الميسرة للأنظمة
sa.arbiter官方發布者
沙特法律法規:搜尋、閱讀全文、分析遮蔽事實(阿拉伯語/英語)。AI 翻譯

NullClear Arbiter
由 GitHub 帳號 mithgalalfayez 發布
NullClear Arbiter 讓助理探索 x402 API、稽核 Base 代幣與錢包,並透過託管式 HTTP 402 付款完成呼叫並取得憑證。

Arbiter
由 GitHub 帳號 godwin105 發布
本機 MCP 伺服器,讓助理按次以 USDC 付費取得 Arbiter 的判斷:交易風險裁決、對手方核驗與人工審核。