MENTAT is a personal memory system designed to stop AI chats from repeatedly asking for the same background. It stores concise, linked Markdown notes in a private Git repository, organized around personal context, life areas, projects, people, and dated monthly logs. The owner edits the notes directly in Obsidian or another editor; wiki links provide structure, while automated builds create an index and graph. A Cloudflare Worker exposes the notes to Claude and OpenCode through MCP tools for reading, searching, filtering, following links, and retrieving recent log entries. Every push to the main branch rebuilds and deploys the Worker, avoiding a separate database and keeping changes synchronized across devices.
The system prioritizes privacy and controlled updates because AI-written notes could mislead future chats if untrusted content were recorded as fact. Access requires GitHub OAuth tied to the owner’s immutable numeric user ID; the Worker runs on a private subdomain, and the repository is checked for secrets. AI write requests create pull requests rather than editing trusted notes directly. The Worker restricts paths and content, log-entry requests can auto-merge after 72 quiet hours, and other note changes require approval. A graph page visualizes note connections behind the same sign-in. The author also describes practical implementation failures, including brittle date-based tests, OAuth callback confusion, and an auto-merge rule that failed on real changes. A public, fictional demo and reusable template show how others can start with a short profile note and a few project notes.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.