DearDiary MCP Server
A read-only MCP server that gives AI access to a local journal vault of transcribed handwritten diaries, offering tools to search entries, read them, and retrieve profile, timeline, and people information.
README
DearDiary · 亲爱的日记
Your handwritten diaries, remembered by every AI. 拍下你的旧日记,让每个 AI 都认识你。
Photograph your handwritten diaries. DearDiary transcribes them with a vision LLM, distills them into a structured, local-first knowledge base, and hands that lifetime of context to any AI — from a one-click copy-paste profile to a full MCP server. Switch AI apps as often as you like; they all get to know you instantly.
中文文档 → · MIT License · Node 20+
Why
People increasingly confide in AI — and increasingly hop between AI apps. Every hop resets to a stranger. Meanwhile, for many of us, the richest record of who we are isn't in any app: it's the stack of paper diaries we've kept since childhood.
Existing "AI memory" tools (mem0, OpenMemory, supermemory, …) assume memory is born digital — chats, files, screenshots. They remember what you told the AI. DearDiary knows who you were before AI existed. Existing journal MCP servers help an AI write new entries; DearDiary lets AI read the decades you already wrote.
Everything runs on your machine. Photos leave it only as API calls to a vision model you choose (or never, with Ollama). The output is plain Markdown you own forever.
How it works
npx deardiary ← the only command a non-technical user ever needs
A local web app opens in your browser:
- Pick a folder for your journal vault (plain Markdown + photos, Obsidian-compatible, yours forever).
- Drop in photos of diary pages — no renaming, no ordering chores.
Photograph the notebook page by page; the pipeline sorts photos by EXIF
capture order, reads each handwritten date header, stitches entries that
span multiple pages, splits pages holding several short entries, and
infers missing years from context ("3月14日" after a 2019 entry → 2019,
Dec→Jan rolls the year). Transcription is faithful — spelling errors
preserved, illegible characters marked ▢, uncertain readings marked
[?]. Every guessed date is flagged for one-click human confirmation; nothing uncertain ever pretends to be certain. - Proofread side-by-side with the photo, right in the browser. Corrections are just text edits.
- Build: a cheap model extracts people / places / topics / events / mood
per entry, then maintains a life timeline, person cards, and
profile/core.md— a living "who I am" distilled from everything. - Connect your AI — three tiers, lowest friction first:
| Tier | Works with | What you do |
|---|---|---|
| ① Copy & paste | Any AI (ChatGPT, Claude, Doubao, Kimi…) | Copy the generated profile into its custom instructions / memory. Zero setup. |
| ② Local MCP (stdio) | Claude Code, Claude Desktop, Cursor… | One command / one config block, shown ready-to-copy in the UI. The AI can then search and read every entry on demand. |
| ③ Local MCP (HTTP) | Any Streamable-HTTP MCP client on your machine | Point it at http://127.0.0.1:7717/mcp while the app runs. |
The MCP surface is 7 read-only tools: get_profile, search_journal
(CJK-aware full-text), read_entry, browse_entries, get_timeline,
list_people, get_person. Humans write; agents read — nothing an AI
does can touch your diary.
Architecture
flowchart LR
A["📷 photos"] -->|"vision LLM<br/>faithful transcription"| B["entries/*.md<br/>verbatim text"]
B -->|"cheap LLM"| C["frontmatter:<br/>people/places/topics/<br/>events/mood"]
C --> D["profile/core.md<br/>timeline.md · people/*.md"]
B --> E["local web app<br/>+ MCP server"]
C --> E
D --> E
E --> F["🤖 any AI"]
Four layers, each rebuildable from the one below; Markdown is the source of truth. Search is an in-memory inverted index with CJK bigram tokenization — a lifetime of diaries is ~10 MB of text, so there is no database, no embeddings infrastructure, no native deps beyond image processing. TypeScript end to end: one language for pipeline, server, MCP, and UI.
Install & run
# once published to npm:
npx deardiary
# from source, today:
git clone https://github.com/<you>/deardiary && cd deardiary
npm install
npm run build
node dist/cli.js # opens http://127.0.0.1:7717
Try it instantly with the bundled fictional 26-year demo journal — no API key needed to browse or serve it:
node dist/cli.js --vault examples/demo-vault
Developer commands: deardiary init|import|build|search|status (all
scriptable), deardiary mcp (stdio server, what tier-② configs invoke).
Choosing models
Set everything in the web UI (Settings) — keys are stored only inside your
vault's .deardiary/config.json, which its .gitignore excludes. Presets
ship for:
| Provider | Notes |
|---|---|
| Claude (Anthropic) | Recommended for transcription quality |
| Alibaba DashScope (qwen-vl) | OpenAI-compatible base_url |
| Moonshot / Zhipu / others | Any OpenAI-compatible endpoint works |
| Ollama | Fully local — photos never leave your machine |
Transcription is the foundation — use a strong vision model (≈ $0.02–0.03 per page with Claude Sonnet). Distillation runs fine on cheap fast models (≈ $2 per 1,000 entries with Haiku).
iPhone HEIC photos: shoot with "Most Compatible" format or export as JPEG (HEIC decoding is patent-encumbered; on the roadmap).
Design principles
- Local-first, or it's not trustworthy. Diaries are the most intimate
data a person owns. Plain files, your keys, your disk,
127.0.0.1only. (Rewind promised on-device and ended up inside Meta. Files can't be acquired.) - The original is immutable; every layer rebuilds. Transcription will
have errors — so photos are archived untouched, uncertainty is explicit
(▢ /
[?]), and proofreading is editing a text file. - The caller is an LLM — be a library, not an oracle. Give a smart agent a profile, a timeline, an index, and search; it will leaf through your journal like a thoughtful human.
- "Knows you instantly" is a latency requirement. Hence the distilled profile fast path — and the copy-paste tier that works with AIs that can't run MCP at all.
- Humans write; agents read. The AI-facing surface is strictly read-only.
Why now
Frontier vision LLMs only recently crossed the handwriting threshold — zero-shot transcription now matches or beats specialized HTR systems that used to require per-hand model training. Reading a lifetime of handwriting became a commodity API call at almost the same moment MCP standardized handing that lifetime to any agent. DearDiary joins the two.
Privacy model
- Photos go to exactly one place: the vision API you configured (or nowhere, with Ollama).
- Everything else is local file I/O. The server binds to
127.0.0.1— not visible to your LAN. No telemetry, no accounts. - Your vault is a folder. Git it, encrypt it, back it up — it's yours.
Roadmap
- [ ] npm publish (
npx deardiaryfor real) - [ ] Packaged desktop app (double-click, no Node required)
- [ ] HEIC support · proofread helper (surface low-legibility entries)
- [ ] Optional local semantic search for feelings-shaped queries
- [ ] Optional
remember()write-tool for AI-learned facts — into a separate file, never the diary (under debate; open an issue) - [ ] Export your diaries as an EPUB/PDF book
Contributing
src/core/prompts.ts is the soul of the pipeline — improvements to
transcription fidelity for messy handwriting, more languages, and
vertical/grid paper are especially welcome. npm test must stay green (46
tests incl. a real MCP client/server session). A reference Python
implementation of v0.1 lives in legacy/python/.
License
MIT. Your diaries are yours; so is this tool.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。