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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.