memory-mcp
Pulls Apple Calendar events (7 days back to 30 days ahead, every 5 minutes) and Apple Messages through an Executor MCP server, indexing them for search and record extraction.
Ingests Gmail mail every minute through an Executor MCP server, storing messages verbatim so agents can search and read them and extract records (bills, payments, orders, appointments) for SQL queries.
Ingests Apple Messages texts every minute through an Executor MCP server, making conversations searchable and readable with neighbouring messages of each thread, and feeding people profiles and record extraction.
Saved YouTube links are fetched and transcribed via yt-dlp, then enriched with a summary, tags and per-chunk context so their content becomes searchable alongside other captures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memory-mcpload my context and find recent notes about the API redesign"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nbrain
One memory shared by every AI agent you use. nbrain keeps five things on your machine:
The record. Your mail, texts, calendar, X bookmarks, coding sessions, saved pages and research notes, verbatim in Postgres, with a search that says when nothing it found is a good answer.
The profile. Short statements about how you work, what you want and your life, in a git repo. Each line names where it came from, and only your own words or a correction change it.
Now. What you have in flight this week, per project and for your life, rewritten every morning.
The library. A card for each bookmark or saved page worth keeping: what it is, why it fits you, which projects it bears on, and whether you tried it. Design references also get a screenshot.
Skills and styles. How you want a kind of work done and how your things should look, distilled from work you approved.
At the start of a task an agent asks for a brief: about 1,500 tokens drawn from all of the above for that task. It searches the record for the rest. Every agent reaches nbrain through one MCP server with its own token and scopes, so a coding agent in your terminal and a chat app on your phone start from the same context.
It runs on your machine. Brain content leaves it only in model calls and in the weekly message it sends you.
A brief
What a coding agent gets for "cut the 0.5 release" in the nbrain repo, for a made-up owner:
## Alex's rules for this work
- Run the tests before every commit.
- Plain words, outcome first; no marketing in READMEs.
- Release notes list what changed for users, not commit subjects.
## Now (2026-10-22)
### nbrain
- Library cards and captures are live; the 0.5 release waits on the docs.
- Next: Alex reviews the docs, then tags 0.5.
- Last touched Thu, Oct 22.
## Earlier on this
- Oct 14, 2026 · omp · Cut v0.4: Tag after the changelog, then push the tag and write the notes from it… [omp:…]
## Worth loading
- release (skill): How Alex cuts a release: changelog, tag, notes. Load: skill_get {"name":"release"}Related MCP server: knowledge-base-server
Tools
Tool | Scope | Does |
Start | ||
| work, life | The brief for a task and project: your rules for it, where the project stands, what came before, what to load |
The record | ||
| work, life | Hybrid search over the record. Each result is strong or weak; |
| work, life, archive | One thing by id: an item in 8 KB pages with its thread, a library card, the profile, or now |
| work, life | What came in since a time, grouped by thread, with a count per source |
| archive | One read-only |
| life | Who someone is: relationship, other names, handles, records, last threads |
The library | ||
| work, life | Cards for a plain description, with kind, project and status filters |
| write | Record that a card was tried, adopted or dropped, and why |
Writes | ||
| write | Keep a URL, text or local file; searchable in about a minute, carded within minutes |
| write | Leave a note, signed with the agent's name |
| write | Fix a profile line, record, card or now; applied within a minute, and it sticks |
| write | Keep an item or its whole thread out of search, briefs, the profile and the library |
Skills and styles | ||
| work, life | The catalog, or one skill or style with a manifest of its files |
| write | Add or update a skill or style; an update names the digest of the version it read |
A token sees only the tools its scopes allow. search and fetch also answer in the shape ChatGPT deep research reads. The server also offers the brief as a prompt, every skill file as a skill:// resource, and the MCP Skills extension. Tool names and inputs are a stable contract.
Scope | Grants |
| The work profile files and now's project blocks; the record limited to X bookmarks, saved pages, research notes, skills and coding sessions |
|
|
|
|
|
|
Requirements
Needs | For |
macOS | launchd jobs and the Keychain; on Linux, run the same scripts under systemd (setup) |
Postgres 17 with pgvector and ParadeDB pg_search, from | |
Node 26 | The server, ingest and CLI |
Local embeddings, | |
A Cloudflare account with Workers AI | The search judge, |
An OpenAI-compatible chat endpoint | Records, library cards, the curator and now |
Optional: Google Chrome for library captures, Executor for mail, texts and calendar, xurl for X bookmarks, yt-dlp for YouTube, and restic for backups.
Quickstart
From a clone of this repository:
npm install
docker compose up -d # Postgres on 127.0.0.1:5433
ollama pull qwen3-embedding:0.6b
bin/nbrain init --name "Alex Rivera" # writes ~/.brain/env, stopsEdit ~/.brain/env: check OWNER_*, TZ and DATABASE_URL, set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN (a token with Workers AI access), and set LLM_URLS and LLM_API_KEY (or LLM_API_KEY_FILE). Then:
bin/nbrain init # context repo, schema, roles
bin/run-memory-mcp.sh # own shell: server on :8830
bin/run-ingest.sh # own shell: ingest loops
bin/nbrain doctor # every line should read ok
bin/nbrain connect claude-codeconnect also takes omp, codex, cursor, claude-desktop and json. It mints a token for the client, writes the server into its config and says where:
claude-code: nbrain at http://127.0.0.1:8830/mcp as agent "claude-code" (work, write) → claude mcp (user scope)Restart the client and ask it what it knows about you. On an empty brain, save something first:
bin/nbrain save https://www.anthropic.com/engineering/contextual-retrieval \
--why "chunk context for retrieval"
bin/nbrain search "contextual retrieval"Docs
How it works: sources, search, the profile and curator, now, the library, the brief, the Sunday message, the upkeep loops and scopes.
Connecting clients: omp, Claude Code, Codex, Cursor, Claude Desktop, ChatGPT and claude.ai, remote access, plain HTTP.
Setup: running it under launchd, connectors, readers, backups, Linux, every setting and every command.
Research: the evidence behind each design decision.
Development
npm install
npm run check # tsc --noEmit
npm test # vitest runTests run as a made-up owner in a fixed time zone. Point them at a throwaway BRAIN_HOME and database, never a live brain. Tool names, inputs and scopes are a public contract: add tools freely, but renaming one or changing its inputs breaks connected clients.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
The second brain your AI agents share. It builds itself from your work and keeps itself current.
Personal memory layer: files, notes, messages, tasks and email, semantically indexed.
Stop re-explaining yourself to Agents. Give it the right context, right when needed.
Governed memory and workspace for any AI: tasks, calendar, mail and pages, with per-action consent.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, classify, synthesize, and retrieve persistent shared knowledge from sources such as Obsidian, code, transcripts, bookmarks, and sessions. It provides token-efficient search, context briefings, and tiered memory through MCP and REST APIs.14 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to share persistent memory by ingesting knowledge from sources like Obsidian, code, documents, web clips, and terminal sessions, then providing token-optimized search, context, classification, synthesis, and capture tools through MCP and REST APIs.14 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, classify, promote, synthesize, and retrieve persistent knowledge from sources such as Obsidian vaults, code repos, YouTube transcripts, bookmarks, terminal sessions, and bug fixes. Exposes tiered cold/warm/hot memory with token-optimized search, context briefings, and cross-source synthesis so multiple agents share one compounding brain across sessions.14 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI agents a shared persistent memory by ingesting Obsidian vaults, code, transcripts, web clips, and session or bug-fix captures, then serving token-optimized context briefings, keyword and semantic search, and cross-source synthesis. Enables multiple agents to read and write the same growing knowledge base so each session builds on the last.14 npmMIT