AI Diary Server
БесплатноНе проверенA private, local-first MCP server that gives any AI long-term memory — its own diary. Zero models, zero network, zero subscription; smarter search than Notion,
Описание
A private, local-first MCP server that gives any AI long-term memory — its own diary. Zero models, zero network, zero subscription; smarter search than Notion, running entirely on your machine.
README

A private, local-first MCP server that gives any AI long-term memory — its own diary.
Zero models · zero network · zero subscription. Smarter search than Notion, running entirely on your machine.
Quick start · Dashboard · Connect · Tools · Why
✨ Highlights
- 🔒 Truly private. Every memory lives in one SQLite file on your disk. Nothing is ever uploaded.
- 🧠 No embeddings, still smart. Retrieval uses SQLite FTS5 + BM25 with a trigram tokenizer, so search is instant and works great for English and 中文 / CJK.
- 🤝 Borrows your platform's brain. When the host supports MCP sampling,
recallexpands & re-ranks andreflectauto-summarizes — with graceful fallback when it doesn't. The server itself never ships a model. - 🕸️ A real knowledge graph. Link memories and traverse the web of context.
- 🗂️ Collections, tags, importance, reflection, dedup. Organize like Notion — locally and programmatically.
- 🎨 A beautiful local dashboard. Browse, search, and add memories in your browser (dark & light).
- 🧩 Works everywhere MCP does. Claude Desktop, Cursor, Windsurf, Cline, VS Code, Zed…
🖥️ The dashboard
A polished local web UI over the same database — npm run dashboard, then open http://localhost:4178.
![]() |
![]() |
| Tags, including 中文 | Add a memory in a click |
Browse · full-text search (English + 中文) · filter by tag/collection · spot near-duplicates · add memories · dark/light theme · one-click git snapshot.
🏆 Why it's better than Notion
| AI Diary | Notion | |
|---|---|---|
| Privacy | 100% local, single file you own | Cloud-hosted |
| Built for AI | Native MCP tools an agent calls directly | Manual / limited API |
| Chinese search | FTS5 trigram — precise CJK substring search | Weak |
| Knowledge graph | First-class links + graph traversal | No |
| Offline | Always | No |
| Cost | Free, no subscription | Paid tiers |
| Versioning | Optional git history of your memory | Limited |
🚀 Quick start
git clone https://github.com/pangxianggang/ai-diary-mcp.git
cd ai-diary-mcp
npm install
npm run build # produces dist/index.js — the stdio MCP server
npm run smoke # self-test (26 assertions)
Try the dashboard with some sample data:
AI_DIARY_DB_PATH=./demo.db node scripts/seed-demo.mjs
AI_DIARY_DB_PATH=./demo.db npm run dashboard # http://localhost:4178
Override the port with
AI_DIARY_PORT.
🎨 The design philosophy
The server is the hippocampus — fast storage, structure, and retrieval. Your platform's model is the cortex — it reasons, summarizes, and decides what to remember.
The server never calls an LLM and never goes online. That keeps it private, free, and trivially portable.
💾 Where memories are stored
A single SQLite file:
| OS | Default path |
|---|---|
| Windows | %APPDATA%\ai-diary\memory.db |
| macOS | ~/Library/Application Support/ai-diary/memory.db |
| Linux | $XDG_DATA_HOME/ai-diary/memory.db (or ~/.local/share/...) |
Override with AI_DIARY_DB_PATH. Back up by copying the file. Keep it inside a git repo and call snapshot for versioned memory history.
🔌 Connect it to your AI
Use the absolute path to the built dist/index.js.
Claude Desktop
claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"ai-diary": {
"command": "node",
"args": ["/absolute/path/to/ai-diary-mcp/dist/index.js"]
}
}
}
Cursor / Windsurf / Cline / Zed / VS Code
All use the same shape — command: "node" with args pointing at dist/index.js. Add an env block to relocate the database:
{
"mcpServers": {
"ai-diary": {
"command": "node",
"args": ["/absolute/path/to/ai-diary-mcp/dist/index.js"],
"env": { "AI_DIARY_DB_PATH": "/absolute/path/to/my-memory.db" }
}
}
}
Restart the client after editing its config.
🧰 Tools
| Tool | What it does |
|---|---|
remember |
Save a memory (content, optional tags, category, importance 1–5, occurred_at). Identical content is de-duplicated. |
recall |
Search by text (FTS5 BM25, CJK-aware) with optional tags / category / collection_id / time filters. smart=true adds host-model query expansion + re-ranking (with fallback). |
recent |
List the most recently created memories. |
timeline |
Browse chronologically by when things occurred. |
get |
Fetch one memory by id, including its links. |
update |
Edit an existing memory. |
forget |
Archive (default) or hard-delete a memory. |
link |
Connect two memories into a knowledge graph (e.g. caused, related). |
graph |
Traverse the knowledge graph around a memory (BFS to a depth) and return connected memories + links. |
find_duplicates |
Surface near-duplicate memories via trigram similarity. |
create_collection / add_to_collection / list_collections |
Group memories into Notion-like collections. |
list_tags |
All tags with usage counts. |
stats |
Totals, categories, time range, db location. |
export |
Export memories as Markdown. |
reflect |
Consolidate related memories. auto=true (with host sampling) summarizes and stores the reflection, linked to its sources. |
snapshot |
Commit the SQLite file to git for versioned memory history. |
Resource memory://recent (recent entries as Markdown) · Prompt recall-about (recall + summarize a topic).
🧱 Capabilities by phase
- MVP — SQLite + FTS5 (CJK trigram) + full CRUD over stdio, one-line client config.
- Smart retrieval — optional MCP-sampling query expansion + re-ranking in
recall, automatic fallback to plain FTS5. - Structure — tags, collections, links / knowledge graph traversal, importance, soft-forget.
- Reflection —
reflect auto=trueconsolidates memories via the host model;find_duplicatesfor de-duplication. - Experience — a polished local web dashboard + Markdown export + optional git-versioned history.
🔍 How search works (without embeddings)
- FTS5 + BM25 ranks entries by relevance. The trigram tokenizer indexes 3-character sequences, which is what makes substring and CJK search work.
- Metadata filters (tags, category, collection, time range, importance) narrow results.
- Queries shorter than 3 characters fall back to a
LIKEsubstring scan. - With
smart=true, a sampling-capable host expands the query and re-ranks candidates — but the core works fully without it.
🛠️ Development
npm run dev # tsc --watch
npm run typecheck # type-check only
npm run smoke # in-memory end-to-end check (26 assertions)
npm run dashboard # local web UI
📄 License
MIT
Установка AI Diary Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/pangxianggang/ai-diary-mcpFAQ
AI Diary Server MCP бесплатный?
Да, AI Diary Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для AI Diary Server?
Нет, AI Diary Server работает без API-ключей и переменных окружения.
AI Diary Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить AI Diary Server в Claude Desktop, Claude Code или Cursor?
Открой AI Diary Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Notion
Read and write pages in your workspace
автор: NotionLinear
Issues, cycles, triage — from Claude
автор: LinearGoogle Drive
Search and read your Drive files
автор: Googlemindsdb/mindsdb
Connect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).
автор: mindsdbCompare AI Diary Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории productivity


