memory-arbiter-mcp
This server provides a fully local, SQLite-backed shared memory store with built-in conflict arbitration for AI coding tools (e.g., ZCode, Codex, Cursor, Claude Code), enabling multi-agent collaboration through a unified MCP protocol.
Core capabilities:
Write structured memories: Store memories with rich metadata — content, subject, tags, agent ID, workspace, source type (
agent_generated,user_confirmed,document_extracted), confidence score, event time, and protection level.user_confirmedmemories are automatically locked against overwriting.Search memories: Query by keyword, tags, and workspace using a graceful fallback chain (FTS5 → LIKE).
Compare two memories: Analyze whether two memories conflict and receive a human-readable explanation — without recording any conflict.
Arbitrate conflicts: Resolve disputes using structured rules (user confirmation → event time → source trust → ingest time), with options to record the conflict and/or mark the loser as superseded.
Confirm and lock a memory: Promote a memory to
user_confirmedstatus with locked protection, preventing agents from overwriting it.List unresolved conflicts: View open conflict records across all agents and tools.
Check server status: Inspect the database path, degradation mode, client identifier, and policy configuration.
Key properties: Operates entirely locally (no cloud, no external LLM calls), degrades gracefully across sqlite-vec → FTS5 → LIKE → JSONL backup, and supports per-client enable/disable settings and agent allow/deny lists for governance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memory-arbiter-mcpsave that the user prefers dark mode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-name: io.github.billy12151/memory-arbiter-mcp
memory-arbiter-mcp
English
A lightweight, fully local MCP Server that gives your AI coding tools a shared memory store with built-in conflict arbitration.
Every tool — ZCode, Codex, Cursor, Claude Code — has its own memory. They don't talk to each other. Memory Arbiter fixes this: one SQLite database, all tools read and write through the same MCP protocol, conflicts are resolved by structured rules (not LLM guesswork).
Features
Structured memory write:
content,agent_id,workspace,tags,source_type,event_time,ingest_time,confidence,protection_level, and more.Source trust levels:
user_confirmed>document_extracted>agent_generated>unknown.Dual timeline arbitration: resolves conflicts by user confirmation → event time → source trust → ingest time. Every decision comes with an explainable rationale.
Locked protection:
user_confirmedmemories are automatically locked — no agent can overwrite them.Client policy system: per-client enable/disable, agent allow/deny lists for multi-agent governance.
Graceful degradation:
sqlite-vec→ FTS5 →LIKE→ JSONL backup. Never crashes.Zero cloud, zero LLM calls: pure local SQLite. No Postgres, Redis, or external services.
Quick Start
Requirements: Python 3.11+
# Clone
git clone https://github.com/billy12151/memory-arbiter-mcp.git
cd memory-arbiter-mcp
# Setup
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
# Optional: semantic recall via sqlite-vec
pip install '.[vec]'
# Run
memory-arbiter-mcpConnect Your Tool
Add to your tool's MCP config (see examples/ for ready-made templates):
{
"mcpServers": {
"memory-arbiter": {
"command": "/path/to/memory-arbiter-mcp/.venv/bin/memory-arbiter-mcp",
"env": {
"MEMORY_ARBITER_CLIENT": "zcode",
"MEMORY_ARBITER_AGENT_ID": "zcode-default",
"MEMORY_ARBITER_DB_PATH": "~/.local/share/memory-arbiter/memory.sqlite3"
}
}
}
}Change
MEMORY_ARBITER_CLIENTfor each tool (zcode,codex,cursor,claude-code). All tools share the sameDB_PATH— that's the whole point.
⚠️ New session required: MCP servers are loaded at session startup. Already-open sessions won't see the new tools. Start a fresh session after configuring.
Client Config Locations
Client | Config Location |
ZCode |
|
Codex CLI |
|
Claude Code |
|
Cursor |
|
MCP Tools
Tool | Description |
| Write a memory ( |
| Search memories (FTS5 → LIKE fallback) |
| Compare two memories, returns explanation only |
| Arbitrate conflict, can record result ( |
| Promote a memory to user-confirmed and locked |
| List unresolved conflicts |
| Show current mode, degradation status, storage paths |
Data Migration
Moving to a new machine? Just copy the SQLite file:
# Copy the database
cp ~/.local/share/memory-arbiter/memory.sqlite3 /new/machine/~/.local/share/memory-arbiter/
# Reinstall the project (don't copy .venv — rebuild it)
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .Testing
python3.11 -m pip install -r requirements.txt
python3.11 -m pytestLicense
MIT
Related MCP server: knitbrain
中文
一个轻量、完全本地运行的 MCP Server,给你的 AI 编程工具提供共享记忆库,内置冲突仲裁机制。
你同时用 ZCode、Codex、Cursor、Claude Code——每个工具都有各自的记忆,互不相通。Memory Arbiter 解决这个问题:一个 SQLite 数据库,所有工具通过同一个 MCP 协议读写,冲突由结构化规则仲裁,不依赖大模型。
核心能力
结构化写入:
content、agent_id、workspace、tags、source_type、event_time、ingest_time、confidence、protection_level等。来源可信度:
user_confirmed>document_extracted>agent_generated>unknown。双时间轴仲裁:按 用户确认 → 事件发生时间 → 来源可信度 → 录入时间 的优先级判定,输出可解释的裁决理由。
锁定保护:
user_confirmed的记忆自动锁定,任何 Agent 都不能自动覆盖。客户端策略:按客户端启用/禁用,Agent 级别的 allow/deny 白名单控制。
逐级降级:
sqlite-vec→ FTS5 →LIKE→ JSONL 备份,不会崩。零云依赖、零大模型调用:纯本地 SQLite,不需要 Postgres、Redis 或外部服务。
快速开始
要求:Python 3.11+
# 克隆
git clone https://github.com/billy12151/memory-arbiter-mcp.git
cd memory-arbiter-mcp
# 安装
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
# 可选:启用语义召回增强(sqlite-vec)
pip install '.[vec]'
# 启动
memory-arbiter-mcp接入工具
在你的工具的 MCP 配置中加入(完整示例见 examples/ 目录):
{
"mcpServers": {
"memory-arbiter": {
"command": "/path/to/memory-arbiter-mcp/.venv/bin/memory-arbiter-mcp",
"env": {
"MEMORY_ARBITER_CLIENT": "zcode",
"MEMORY_ARBITER_AGENT_ID": "zcode-default",
"MEMORY_ARBITER_DB_PATH": "~/.local/share/memory-arbiter/memory.sqlite3"
}
}
}
}每个工具改一下
MEMORY_ARBITER_CLIENT标识(zcode、codex、cursor、claude-code),共享同一个DB_PATH——这就是跨工具记忆共享的关键。
⚠️ 需要新建会话:MCP Server 在客户端启动时加载,已经打开的会话不会识别新添加的 Server。配置好后请新建一个会话。
客户端配置位置
客户端 | 配置文件位置 |
ZCode |
|
Codex CLI |
|
Claude Code | 项目根目录 |
Cursor |
|
MCP 工具
工具 | 说明 |
| 写入记忆( |
| 搜索记忆(FTS5 → LIKE 自动降级) |
| 比较两条记忆,只返回解释 |
| 仲裁冲突,自动判定胜者( |
| 用户确认某条记忆,锁定保护 |
| 列出未解决的冲突 |
| 查看运行状态、模式、降级原因 |
数据迁移
换电脑只需拷贝一个文件:
# 拷贝数据库
cp ~/.local/share/memory-arbiter/memory.sqlite3 新电脑:~/.local/share/memory-arbiter/
# 重新安装项目(.venv 不要拷贝,新机器上重建)
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .测试
python3.11 -m pip install -r requirements.txt
python3.11 -m pytestLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/billy12151/memory-arbiter-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server