DearDiary MCP Server

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.

Category
Visit Server

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:

  1. Pick a folder for your journal vault (plain Markdown + photos, Obsidian-compatible, yours forever).
  2. 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.
  3. Proofread side-by-side with the photo, right in the browser. Corrections are just text edits.
  4. 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.
  5. 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

  1. 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.1 only. (Rewind promised on-device and ended up inside Meta. Files can't be acquired.)
  2. 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.
  3. 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.
  4. "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.
  5. 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 deardiary for 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.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured