memorry
A local-first MCP memory server that stores facts in SQLite with FTS5 full-text search, supports projects and pinned records, and optionally syncs to Obsidian, all without external API calls.
README
memorry

A fully local, API-key-free MCP memory server for Claude Code (or any MCP client). No Ollama, no embeddings, no external LLM calls — just SQLite, FTS5 full-text search, and optional live sync to an Obsidian vault.
Built collaboratively with Claude Code (Anthropic).
Why
Most "AI memory" setups either ship your notes to a hosted vector DB or
require a local embedding model. memorry doesn't do either. It's a single
Python process exposing a handful of MCP tools backed by one SQLite file.
The calling agent is responsible for distilling what's worth remembering
into one self-contained sentence — the server just stores it verbatim and
makes it searchable.
Features
- Local-first: one SQLite file (
memory.db), streamable-http on127.0.0.1:8765, no network calls of any kind. - FTS5 full-text search with Turkish/English stopword filtering and
Turkish character folding (
ı/İ→i,ş→s,ğ→g,ü→u,ö→o,ç→c) so search is forgiving of accents and common function words. - Projects: every record is tagged with a
project, so one server can hold memory for several unrelated things. - Pinned records: mark a handful of memories as always-relevant; fetch them without a search query.
- Live Obsidian sync: every add/update/delete mirrors to one or more
Obsidian vault folders as Markdown notes with frontmatter, and each new
note auto-links to the most relevant existing notes in the same project
via
[[wikilink]]— so the vault's Graph View reflects real semantic connections, no manual linking required. - Automatic backups: a timestamped copy of the DB is taken on every server start (last 30 kept).
- Health check:
memory_healthruns an actual write test against the FTS5 index, not justPRAGMA integrity_check— see a real bug we hit below. - Export/import: dump to JSON, re-import elsewhere with automatic dedup.
Tools
| Tool | Purpose |
|---|---|
memory_add(text, project, pinned) |
Store a fact verbatim |
memory_search(query, project, limit) |
FTS5 search, bm25-ranked |
memory_list(project, limit, pinned_only) |
List recent (or pinned) records |
memory_update(id, text, project, pinned) |
Edit in place, id/created_at preserved |
memory_delete(id) |
Remove a record |
memory_stats() |
Record counts, per-project breakdown, DB size |
memory_health() |
Integrity check + a real FTS5 write test |
memory_export(project) |
Dump to JSON |
memory_import(path) |
Re-import a JSON dump, deduped |
Use with Claude Code
Two optional pieces ship with the server, and they do different jobs:
SKILL.md — the discipline. Search before you add, distill
to one self-contained sentence, separate projects, when to reach for
memory_health. Claude loads it on its own whenever memory is relevant, so
you don't have to ask for it.
mkdir -p ~/.claude/skills/memorry
cp SKILL.md ~/.claude/skills/memorry/
commands/hatirla.md — the shortcut. A slash
command for when you want to bank something right now without breaking
your train of thought: /hatirla the deploy key rotates every 90 days.
("hatırla" is Turkish for "remember" — rename the file to change the
command name.)
mkdir -p ~/.claude/commands
cp commands/hatirla.md ~/.claude/commands/
Both land in ~/.claude/, so they work from any project. Drop them in a
project's own .claude/ instead if you'd rather scope them to one repo.
The command file has a "customize this" note at the bottom — worth two
minutes to point it at your own project names.
Setup
pip install -r requirements.txt
python server.py
Or on Windows, run start-memory.bat to launch it hidden in the
background (no autostart — you start it when you want it running).
Then point your MCP client at http://127.0.0.1:8765/mcp. For MCP hosts
that only support command/args-style stdio servers (some desktop
clients don't speak native type: http yet), bridge it with
mcp-remote:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://127.0.0.1:8765/mcp", "--allow-http", "--transport", "http-only"]
}
}
}
Obsidian sync
Edit OBSIDIAN_DIRS in server.py to point at one or more vault
subfolders. Leave the list empty (or point it somewhere that doesn't
exist) to skip Obsidian entirely — it's best-effort and never blocks a
memory write if the vault folder is unreachable.
Design notes
- The agent distills, the server doesn't.
memory_addnever summarizes or calls out to an LLM — it stores exactly what it's given. Tool descriptions instruct the calling agent to compress information into one self-contained sentence before writing, and to search first so duplicate/stale facts don't pile up. - Turkish-aware, not Turkish-only. The stopword list and character folding cover Turkish because that's what this was built for, but everything degrades gracefully for English text.
A real bug we hit
While building this, memories_fts was originally an FTS5 "external
content" table (content='memories', content_rowid='id'). At some point
its shadow tables got corrupted in a way PRAGMA integrity_check and
even FTS5's own integrity-check command both reported as fine — but any
DELETE/INSERT against the index raised database disk image is malformed. The underlying memories table was untouched.
The fix was to drop the external-content linkage entirely: memories_fts
is now a fully independent FTS5 table, rebuilt from memories on every
server start (cheap at personal-notes scale). memory_health() exists
specifically to catch this class of failure early — it does a real
(harmless, rowid=-999999) write against the index rather than trusting
integrity_check alone.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。