openmemkit
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., "@openmemkitsearch my notes about the Apollo deployment"
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.
memory-mcp-openmemkit
File-native, dual-channel AI agent memory as an MCP server. / 文件原生、双通道检索的 AI 记忆 MCP 服务器。
English | 中文
English
openmemkit gives any MCP-compatible AI agent (Claude Desktop, Codex CLI, Cursor,
Cline, Continue, …) a persistent, queryable memory that lives in plain Markdown
files you own. The framework ships with no memory data of its own — every user
points it at their own memory directory and SQLite index.
Why openmemkit
File-native — memories are human-readable Markdown organised by domain and date.
grep, edit, and version-control them with git; no proprietary lock-in.Dual-channel search — SQLite FTS5 (trigram tokenizer, great for CJK and English) plus optional semantic embeddings (local
bge-small-zh, offline), fused with Reciprocal Rank Fusion. Short queries (<3 chars) auto-fall-back to LIKE.Audited writes — agents never edit
.mddirectly. They append to awrite_log; an explicitflush/applystep distributes entries according to a configurable whitelist. Every write is traceable.Zero mandatory dependencies — the core is pure Python standard library (
sqlite3,re,json). Semantic search is an optional extra.Two transports — stdio (for desktop agents) and HTTP/SSE (for remote/shared deployments), same engine, identical behavior.
Batteries-included CLI —
init,index,search,get,write,flush,stats,doctor,domain, and both servers.
Quick start
pip install memory-mcp-openmemkit
# 1. Create your OWN empty memory root (the framework ships no data)
openmemkit init
# 2. Point your agent at it (stdio), then ask it to remember things
openmemkit serveDefault locations (override with flags, env vars, or a TOML config):
What | Default |
Memory root |
|
SQLite index |
|
Config file |
|
MCP client configuration
stdio (Claude Desktop claude_desktop_config.json, Codex config.toml, etc.):
{
"mcpServers": {
"openmemkit": {
"command": "openmemkit",
"args": ["serve", "--root", "/path/to/your/memories", "--db", "/path/to/index.sqlite"]
}
}
}HTTP/SSE:
openmemkit serve-http --host 127.0.0.1 --port 8765
# SSE endpoint : http://127.0.0.1:8765/sse
# messages POST: http://127.0.0.1:8765/messages/<session>MCP tools
Tool | Purpose |
| Load |
| List domains with file counts |
| Search chunks; modes |
| Read one |
| List indexed files with chunk counts/mtime |
| Index statistics, domain distribution, write-log status, semantic coverage |
| Append an audited entry ( |
| Replace a |
| Move a |
| Show the audited change trail for a path (or the whole write log) |
| Distribute pending write-log entries to |
Semantic search (optional)
pip install "memory-mcp-openmemkit[semantic]"Then enable it via config ([semantic] enabled = true), env
(OPENMEMKIT_SEMANTIC=1), or --semantic on indexing. The default model
(BAAI/bge-small-zh-v1.5) downloads from HuggingFace on first use and runs fully
offline afterward. Swap in any backend by implementing the Embedder protocol and
calling openmemkit.embedder.register_backend().
Configuration
# openmemkit.toml
root = "~/.local/share/openmemkit/memories"
db_path = "~/.local/share/openmemkit/openmemkit.sqlite"
[search]
default_top_k = 60
default_mode = "hybrid" # keyword | hybrid | vector
min_fts_len = 3
[semantic]
enabled = false # flip to true after installing [semantic]
model = "BAAI/bge-small-zh-v1.5"
[write]
auto_apply_kinds = ["network_fetch", "task_history", "data_read", "data_written", "memory_note"]
top_level_files = ["MEMORY.md"]
[server]
host = "127.0.0.1"
port = 8765Resolution order: CLI flags > OPENMEMKIT_* env vars > TOML > built-in defaults.
CLI
openmemkit init [--force] # scaffold an empty memory root
openmemkit index [--semantic] [--incremental] # (re)build the search index
openmemkit search "query" [--domain web] [--mode hybrid]
openmemkit get notes/project.md
openmemkit list [--domain notes]
openmemkit write --kind memory_note --summary "..."
openmemkit rm notes/old.md [--summary "..."] # delete (moves to .trash/)
openmemkit update notes/x.md --file new.md # replace (archives old version)
openmemkit history [notes/x.md] [--json] # audited change trail
openmemkit flush # apply pending writes + reindex
openmemkit stats [--json]
openmemkit doctor [--fix] # integrity + index-drift check
openmemkit domain list|add|rm <name> [--force]
openmemkit backup [--output out.tar.gz] # snapshot memories + SQLite
openmemkit restore backup.tar.gz --yes # restore (moves current aside)
openmemkit prune --domain web --days 90 [--delete] [--dry-run]
openmemkit export --format jsonl|md [--out f] # bulk export
openmemkit serve # MCP stdio
openmemkit serve-http --host 127.0.0.1 --port 8765Management & data safety
Deletes are recoverable.
memory_delete/rmmove files to.trash/YYYY-MM-DD/and write atombstonerecord; nothing is hard-deleted.Updates are versioned.
memory_update/updatecopy the previous file to.archive/YYYY-MM-DD/and link log entries viaparent_id, sohistoryshows the full chain.Backup/restore.
backupproduces a tar.gz of yourmemories/tree plus a consistentVACUUM INTOSQLite snapshot (with amanifest.json);restoremoves the current state aside before replacing it, so it is reversible.Retention.
prunearchives (or with--deletehard-deletes) files older than per-domainretention_days, with--dry-runto preview.MEMORY.mdis protected from delete/update through the engine.
Security model
Agents only write through
memory_write→write_log; they cannot touch arbitrary files. Path traversal is rejected at read time.Auto-apply is whitelist-based. Kinds outside the whitelist stay
pendinguntil reviewed (CLIflushapplies configured auto-kinds).OPENMEMKIT_READONLY=1disables all writes — useful for sharing one memory root across multiple agents.The engine only reads beneath the configured
rootand writes todb_path. There is no telemetry and no network call other than the optional model download.
Development
git clone <repo> && cd memory-mcp-openmemkit
uv sync --extra dev
uv run pytest # 28 tests: chunker/search/write/CLI/stdio/HTTP
uv run openmemkit --versionLicense
MIT.
Related MCP server: mcp-ltm
中文
openmemkit 为任何兼容 MCP 的 AI agent(Claude Desktop、Codex CLI、Cursor、Cline、
Continue 等)提供持久、可检索的长期记忆,记忆以你拥有的纯 Markdown 文件形式存储。
框架本身不携带任何记忆数据——每个用户都把它指向自己的记忆目录和 SQLite 索引。
特性
文件原生:记忆是人类可读的 Markdown,按域/日期组织,可 grep、可编辑、可 git 版本管理,无私有格式锁定。
双通道检索:SQLite FTS5(trigram 分词,中英文通吃)+ 可选语义向量(本地
bge-small-zh,完全离线),用 RRF 融合;<3 字短查询自动走 LIKE 兜底。审计式写入:agent 不直接改
.md,先写write_log,经flush/apply按白名单 分发,每条写入可追溯。零强制依赖:核心纯 Python 标准库(
sqlite3/re/json),语义检索为可选 extras。双 transport:stdio(桌面 agent)与 HTTP/SSE(远程/共享部署),同一引擎、行为一致。
完整 CLI:
init、index、search、get、list、write、rm、update、history、flush、stats、doctor、domain、backup、restore、prune、export, 以及两种 server。管理与安全:删除移入
.trash/(可恢复),更新归档旧版本到.archive/(版本链), 备份/恢复带清单,prune 按域保留期归档,MEMORY.md受保护。
快速开始
pip install memory-mcp-openmemkit
# 1. 创建属于你自己的空记忆库(框架不携带任何数据)
openmemkit init
# 2. 让 agent 以 stdio 方式接入
openmemkit serve默认路径(可用参数、环境变量或 TOML 配置覆盖):
项目 | 默认 |
记忆根目录 |
|
SQLite 索引 |
|
配置文件 |
|
客户端配置
stdio(Claude Desktop / Codex 等):
{
"mcpServers": {
"openmemkit": {
"command": "openmemkit",
"args": ["serve", "--root", "/你的/记忆目录", "--db", "/你的/index.sqlite"]
}
}
}HTTP/SSE:
openmemkit serve-http --host 127.0.0.1 --port 8765
# SSE:http://127.0.0.1:8765/sse
# 消息 POST:http://127.0.0.1:8765/messages/<session>语义检索(可选)
pip install "memory-mcp-openmemkit[semantic]"在配置中开启 [semantic] enabled = true,或设 OPENMEMKIT_SEMANTIC=1,或索引用
--semantic。默认模型 BAAI/bge-small-zh-v1.5 首次使用时从 HuggingFace 下载,之后完全
离线。实现 Embedder 协议并调用 register_backend() 即可接入任意向量后端。
开发
git clone <repo> && cd memory-mcp-openmemkit
uv sync --extra dev
uv run pytest许可证
MIT。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceA local-first shared memory layer for MCP-aware agents like Claude, Codex, and Hermes, enabling persistent memory across chats and clients via Markdown files and SQLite FTS.62MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent long-term memory for AI assistants with tag-based retrieval, wiki-style linking, and source references, storing memories as markdown files with SQLite index.1MIT
- AlicenseAqualityCmaintenanceProvides a hybrid memory architecture with a thin SQLite index and Markdown cold storage, enabling AI agents to write, query, link, and rebuild long-term memories via MCP tools, model-agnostic and zero third-party dependencies.7MIT
- AlicenseNot gradedqualityAmaintenanceTurns a folder of Markdown notes into an agent-native knowledge base, providing long-term memory with provenance, token-budgeted retrieval, and safe write-back with versioning.MIT
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory for AI agents. Search, store, and recall across sessions.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Jlnine/memory-mcp-openmemkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server