brain
Summary: brain is a local MCP memory server that gives AI agents a shared, searchable Markdown vault — notes, projects, profile, memory and saved web pages — plus semantic/keyword search, web research and safe, reversible writes.
Manage vault notes: list, read, create/replace, append, targeted string-replace, edit frontmatter, move/rename and delete notes.
Undo anything: every write is versioned; inspect
file_historyandrestore_file(including deleted files).Keep the vault tidy:
vault_overviewsurfaces loose/unlinked/undescribed notes, tag variants and similar names;inspect_graph_regionexplains graph neighbors and links.Propose graph changes safely: add/remove
relatedlinks viapropose_graph_change, which only applies after user approval.Build a persistent user profile:
add_memorystores durable facts (deduplicated, dated) withsupersedefor outdated facts;memory_historyshows superseded ones.Save the web:
save_urlscrapes pages (with JS rendering fallback), chunks, embeds and stores them inknowledge/sources/, updating instead of duplicating.Search your knowledge: hybrid semantic + exact-keyword search over saved sources and connection captures, with scores and match type; rebuild keyword index with
reindex_keyword_search.Curate sources: list saved sources with abstracts/refresh status, and re-download one or all while keeping the last good copy.
Research the web:
web_searchreturns titles/URLs/snippets/dates;read_urlreads a page without saving it.Fact-check claims: brain-first verification, optional web search, evidence grouping, quotes and rule-based verdicts; saves nothing.
Work with skills: list skills, fetch one by name, and gather vault material on a topic with
distill_skillso the agent can write a new skill.Extend via MCP connections: list connections, propose new servers (user approves before anything runs), refresh their tools, and use proxied
<connection>__<tool>tools.Integrate local apps: search Lumina's knowledge base and OpenBlocks pages (read-only).
Stay safe: core files are read-only to agents, paths are sandboxed to the vault, and graph/connection changes require explicit approval.
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., "@brain remember that I prefer concise answers"
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.
brain
Your local second brain for Claude, ChatGPT and any AI agent.
brain is an MCP server that runs on your computer (macOS, Linux or Windows) and gives your AI agents a shared memory: your notes, your projects, what they know about you and the web pages you saved, with semantic search. Connect it once to Claude, ChatGPT, Cursor or whatever agent you use, and they all read and write the same knowledge base. Everything stays on your computer; agents in the cloud (Claude.ai, Manus on the web…) can reach it through an optional private URL.
It ships with a web dashboard so you never have to touch the terminal: turn services on and off, fill in your profile, import the memory other chatbots have about you, connect agents, explore the connection graph and search what you saved.
curl -fsSL https://raw.githubusercontent.com/Lautaro005/brain/main/install.sh | bash # macOS and Linuxirm https://raw.githubusercontent.com/Lautaro005/brain/main/install.ps1 | iex # Windows (PowerShell)brain comes in two versions that share the same install, vault and data: the terminal version (type brain and the web dashboard opens in your browser) and the desktop app (brain app, or the brain icon in your apps: the same dashboard in its own window, with an icon that stays in the menu bar or tray when you close it, plus system notifications and a notch panel when your vault changes). The installer sets up both.
Website: https://lautaro005.github.io/brain/ · Docs: https://lautaro005.github.io/brain/docs/ · Changelog: https://lautaro005.github.io/brain/changelog/
Contents
Related MCP server: shyn
What you can do
Let your agents know you. Write a profile (who you are, what you do, how you like to work) and import the memory ChatGPT, Claude or Gemini already have about you. Every connected agent reads it when it starts and saves anything new it learns with
add_memory.One knowledge base, shared by every agent. Markdown notes organized into projects and skills. What Claude writes today, ChatGPT can read tomorrow.
Save the web. Give brain a URL and it downloads the page, extracts the text (including sites built with JavaScript), indexes it and makes it available to semantic search: you search by meaning, not exact words.
Chat with your memory. A local Ollama model that already knows your profile and memory. Ask it things, or have it save, add or edit notes for you. Chats are kept in Chroma, and you can pop the chat out into a floating window that stays on top of your other apps.
See how everything connects. An interactive graph shows your profile, memories, projects, skills, sources and tags, and how they relate. When the chat or an agent wants to link or unlink notes, you first see an image of the change and approve it.
Check facts, with the evidence in view. Fact check splits a text into claims, looks in your memory first and on the web only if needed, reads every page, looks for counter-evidence and gives a verdict by rules, with quotes, dates and limitations.
Undo anything. Every write goes into a version history. If an agent deletes or overwrites something, you get it back.
Bring your apps along. Plug other MCP servers into brain (GitHub, Notion, Gmail…, or hundreds of apps through Composio): their tools show up in every agent you connected, and whatever they fetch is saved to your memory automatically.
Private by design. Embeddings are computed on your machine with Ollama, and your data never leaves your computer (the only request brain makes on its own is checking GitHub for a new version; Fact check searches the web only when you run it).
Installation
Requirements: macOS, Linux or Windows, and git. The installer takes care of the rest.
System | Command | File |
macOS |
| |
Linux | same command |
|
Windows |
|
|
Missing git? macOS: xcode-select --install. Linux: your distro's package manager (sudo apt install git). Windows: the installer tries winget, or get it from git-scm.com. brain-setup.exe isn't code-signed yet, so Windows SmartScreen may ask you to confirm (More info → Run anyway).
Every commit to main runs the tests, the desktop app's checks and both installers on macOS, Linux and Windows in GitHub Actions, and every release attaches the desktop app (.dmg for macOS, .AppImage and .deb for Linux, setup.exe for Windows), the Windows installer .exe and the Linux installer.
The installer:
Installs uv if you don't have it (it manages Python and the dependencies without touching the system Python).
Downloads brain into
~/.brain.Installs the dependencies and the headless Chromium used to scrape JavaScript sites.
Installs Ollama if needed (Homebrew on macOS,
wingeton Windows, the official script on Linux whensudodoesn't ask for a password; otherwise it tells you the command), and pulls thenomic-embed-textembedding model (~270 MB). Without Homebrew, it tells you where to download Ollama. The chat model (llama3.2, ~2 GB) is optional and not pulled automatically: it powers the Chat tab, source summaries (abstract) and entity extraction for the graph. Get it withollama pull llama3.2or the Download llama3.2 button in the Chat tab; without it those three features are skipped and everything else works. Use another model withBRAIN_SUMMARY_MODEL=<model>, or turn summaries and entities off withBRAIN_SUMMARY_MODEL=off.Downloads the desktop app from the latest release (
~/Applications/brain.appon macOS, an AppImage with an app-menu entry on Linux x86_64, the user installer on Windows). If the release doesn't have it yet it says so and brain keeps working in the terminal; skip it on purpose with--no-app(bash -s -- --no-app) orBRAIN_NO_APP=1.Creates the
braincommand in~/.local/bin(%USERPROFILE%\.local\bin\brain.cmdon Windows) and adds it to yourPATHif it wasn't there.
On Linux, Chromium needs some system libraries; if they're missing the installer prints the one command to add them (sudo uv run playwright install-deps chromium).
Running it again updates the install. To install somewhere else, set BRAIN_HOME=~/some/folder before bash.
git clone https://github.com/Lautaro005/brain ~/.brain && cd ~/.brain
uv sync
uv run playwright install chromium
ollama pull nomic-embed-text
./brain.shGetting started
Open the dashboard:
brain. It opens athttp://127.0.0.1:8765and starts Ollama and the Chroma server if they aren't running. Keep it open while you use your agents; Ctrl+C closes it.Connect your agents: Connect agent tab → Connect on Claude Desktop, ChatGPT or whichever you use.
Tell it who you are: Profile tab → fill in "About you" and import your memory from another chatbot.
Try it: in Claude, ask "what do you know about me according to brain?" or "save this URL to brain: …".
The dashboard
Tab | What it's for |
Dashboard | Switches to turn Chroma, Ollama, LM Studio (local OpenAI-compatible chat server; URL in Settings) and the MCP Inspector (a UI to try the tools by hand) on and off. Vault metrics, activity charts for the last 30 days, sources by domain, operations, system health and recent changes. |
Chat | Talk to a local Ollama model with your profile, all your memories, the |
Profile | Your details (name, headline, about me) and your memory. Below About you, What brain knows about you is a summary of your memory that rewrites itself whenever a memory changes, and goes into |
Connect agent | Connect and disconnect brain from Claude Desktop, ChatGPT, OpenMausBot, DeepSeek Harness, Claude Code, Codex, Cursor, VS Code, Windsurf and Gemini CLI in one click, Manus Studio with the values for its form (under Any other MCP client), remote access by URL for agents in the cloud, plus manual setup for anything else. My connections lists the agents brain configured, plus any app that used brain (detected from the MCP handshake, so apps where you added brain with an "Add MCP server" form show up the first time they use it) and apps you note by hand. |
Connections | Other MCP servers brain uses on your behalf: add them as a local command or a URL (or through Composio), switch each one on or off, choose whether its results are saved to memory, refresh its tools. Servers that need a login (OAuth) show Sign in: it opens the service's own sign-in page and brain keeps the token. Connections an agent proposed ( |
Graph | Interactive map of the vault, built around its structure: |
Knowledge | Save a URL (optionally forcing JavaScript rendering), hybrid search (semantic score, or a keyword tag for exact matches), a button to rebuild the keyword index, and the list of saved sources with how old their content is and when they were last checked. Refresh re-downloads one source or all of them; if a refresh fails, the last good copy is kept and the error is shown. |
Fact check | Verify claims: brain searches your memory first and the web only if that's not enough (and says so), reads every page, groups sources that aren't independent, looks for counter-evidence and gives a verdict by rules (supported, likely supported, mixed, inconclusive, likely false, false, not verifiable) with quotes, dates and limitations. Preferences are set once: level, freshness, primary sources, counter-evidence, claim types, high-risk topics, regions, languages, source types, search engine (DuckDuckGo, SearXNG, Brave, or a search tool from your Connections such as OpenSEO or Composio), blocked domains, and whether the chat and all your agents check facts that aren't in brain on their own. Copy the report, save a source to brain or block a domain with one click. |
Settings → WorkStudio family | A card per app of the family — AI WorkStudio, brain, OpenCue, Lumina and OpenBlocks — with its logo, whether it is installed or running, and an Open button. In the Chat, OpenCue's agents show up in the model picker (they answer with your profile and memory as context) and the + button lists your commands and skills and turns on search in Lumina's knowledge base and in your OpenBlocks pages. An agent's memory goes in |
Prompts | Ready-to-paste instructions for your AI agent (project instructions, coding agents, "configure yourself", and everyday prompts), each with the tool it should use and where it was tested, with a copy button in English and Spanish. |
Logs | Live output of every service the dashboard manages. |
Open in Obsidian (in the sidebar, can be hidden from Settings like any view) opens the vault in Obsidian, with its folders and files in order. brain adds the vault to Obsidian's vault list (with Obsidian closed, keeping a .bak-brain copy of its settings) and, the first time, a small .obsidian/ config so links are written the way brain writes them and the graph is colored by folder. If Obsidian isn't installed, it tells you where to get it and which folder to open.
The bottom of the sidebar has the theme (system, light or dark; in system everything, the graph included, follows your OS when it switches between light and dark), the language (English / Español), an i button that lists the services (Chroma, Ollama, MCP Inspector) and their state, and Settings (the gear), a full view where you can:
see the installed version and check for updates: brain asks GitHub for the latest release when the dashboard opens, every 3 hours while it's open, and when you click the button. If there's a newer one, Settings shows it with a link to the release notes and the gear turns green; the green Update and restart button next to Check for updates closes brain, updates it and reopens it (the page reloads by itself), or run
brain update;reorder the sidebar and hide the views you don't use (a hidden view is still reachable by its URL, e.g.
#logs);pick the default chat model, used when the chat opens and on every new chat;
set the chat's context window: each model's maximum with a cap for all (16k by default), everything each model supports, or a value per model, with a table of the detected models and what they support;
make a backup of everything local (vault, history, settings, connections and what's indexed in Chroma, embeddings included) and restore it; credentials are left out unless you tick the box, and restoring first saves a backup of the current state;
set up an automatic backup (Automatic backup…): the folder (any folder, e.g. an external drive or a synced folder, with a folder picker), how often (every X hours, every day or once a week, at a set time), the file name (
{date},{time},{version},{n}), how many to keep, whether to include credentials and whether to skip it when nothing changed. It runs while brain is open, and catches up when you open it if one was missed;write a system prompt for the chat: how you want it to answer (tone, format, language, focus), added to brain's own instructions; the chat's fixed app context is shown below it, read-only;
turn on system notifications for uploads, changes and deletions in your vault, whether an agent, the chat or you made them;
note format: fill in
type,createdandupdatedon older notes in one click (new writes get them automatically);give each graph node type (Brain, brain files, Profile, Memory, Projects, Skills, Sources, Notes, Folders, Tags, Entities) its own color, or go back to black and white.
The button next to the logo collapses the sidebar into a narrow rail of icons.
When you close the dashboard, it only stops what it started. If Ollama was already running (for example the menu-bar app), it shows up as External and is left alone.
The desktop app adds a menu-bar / tray icon and a notch that grows out of the top of the screen: see The desktop app.
The desktop app
The app (built with Tauri 2, source in apps/desktop) is a shell around the same dashboard. It starts it (~/.brain/brain.sh) if none is running, shows it in a window and, when you close the window, stays in the menu bar (macOS) or tray (Linux, Windows). Open it with brain app or from your apps menu; or download it from the latest release: .dmg (macOS, Apple Silicon and Intel), .AppImage / .deb (Linux x86_64), setup.exe (Windows). It needs brain installed (~/.brain); without it the window shows the install command.
Menu (right click the icon; on Linux the tray opens it with a left click): brain's version, a divider, then Open, Notifications, Settings, Updates and Close. A left click on macOS and Windows opens the notch instead of the menu. Close asks the dashboard to shut down (it stops what it started) and quits the app; if you had
brainopen in a terminal, the app uses that dashboard and leaves it running.Notch: the panel grows out of the top center of the screen — on a Mac, out of the notch, in the same black, so it doesn't sit as a separate square under the menu bar. A click on the icon opens your vault graph there (a notifications icon in the header shrinks it to the latest changes; click a node to open the full graph; it opens on the screen where the pointer is, and on Linux the menu has a Notch… item). When something in the vault is created, changed or deleted, Settings → Notifications chooses where that goes: a system notification, or a short notch alert that animates out and takes much less space than the graph. Not both. It works with the window closed. The choice, which changes count, and whether closing the window keeps brain in the tray are saved in
data/app_settings.jsonand travel in backups.Logs → App: the app's own log (start, tray actions, notifications, errors, plus the dashboard's output) in
data/logs/app.log.Updates: Settings → Update and restart updates brain and the window reloads by itself. The app is its own program, so it also checks that its version matches brain's: when brain is newer it quits, downloads the latest release's app (
brain app-update), installs it and opens again, so the icon and the window are never on different versions.Not code-signed yet: macOS may ask you to confirm the first time (right-click → Open; the installer clears the quarantine flag) and Windows SmartScreen shows More info → Run anyway. On GNOME, the tray icon needs the AppIndicator extension.
Moving from the terminal version to the app: in the web dashboard, Settings → Desktop app → Move to the desktop app closes that dashboard (it stops what it started) and opens the app, which starts its own. Same data. If the app isn't installed, the card links to the download.
Prefer the browser? Everything works without the app: brain opens the dashboard and Ctrl+C stops what it started.
Connecting agents
Each agent keeps its list of MCP servers in its own file. When you click Connect, brain adds its entry without touching the rest of the file, and saves a backup first (<file>.bak-brain).
Agent | Where it's configured | Notes |
Claude Desktop (chat and Cowork) |
| Claude rewrites this file when it quits, so it's edited with the app closed. If it's open, the dashboard offers to quit it, connect and reopen it. |
ChatGPT (desktop app) |
| Works in Codex and ChatGPT Work modes; regular ChatGPT chat doesn't use local servers. Afterwards: Settings → MCP servers → Restart. Shares its config with Codex CLI. |
Claude Code |
| Available in all your projects. |
Codex CLI |
| Same config as ChatGPT. |
Cursor |
| |
VS Code (Copilot, agent mode) |
| |
Windsurf |
| |
Gemini CLI |
| |
OpenMausBot |
| Reads its MCP servers when it opens, so it's edited with the app closed; the dashboard offers to quit, connect and reopen it. |
DeepSeek Harness (desktop app and |
| brain adds its own block (an |
Manus Studio | its own form | Manus adds local servers with its Run a command form; copy the command and arguments from Any other MCP client; its card switches to Detected once Manus uses brain. Manus on the web can use remote access. |
Anything else | The dashboard gives you ready-to-copy config as JSON, TOML, a command, or field by field. |
Paths are the macOS ones; on Windows they're under %APPDATA% and on Linux under ~/.config. All the local agents launch the same server (uv run --directory ~/.brain python server.py) with absolute paths, so they work from any folder.
Remote access by URL
For agents that run in the cloud or on another computer (Claude.ai custom connectors, Manus on the web, ChatGPT developer mode…), Connect agent → By URL (cloud) publishes brain's MCP server through a tunnel. Off by default. Pick the tunnel service on the card:
Service | URL | What you need |
Tailscale Funnel (recommended) | fixed: | Tailscale installed and signed in (free). The first time, Tailscale shows a link to enable Funnel; the card shows it as Enable Funnel. On Linux you may need |
ngrok | fixed: your account's free | ngrok installed and your authtoken pasted on the card (the domain is optional). |
Cloudflare quick | changes every time it starts ( | nothing: Install cloudflared downloads it. Claude in the cloud couldn't connect through these URLs; other agents can. |
Cloudflare named | fixed: your own domain | a tunnel in your Cloudflare account pointing to |
brain runs
server.py --httpon127.0.0.1:8770and the tunnel publishes it; no ports are opened on your router. brain never installs Tailscale or ngrok for you (they don't publish checksums brain can verify, or they're system apps); it finds the ones you installed. Install cloudflared downloadscloudflaredfrom Cloudflare's GitHub release and checks the published SHA256 (or brain uses the one you installed with brew, winget or apt).The ngrok authtoken is stored in
data/remote.json(600) and handed to ngrok as an environment variable, never on the command line. Tailscale uses the session you already have.The URL is
https://…/<token>/mcp; without the token every request gets404. Apps that prefer a header can use…/mcpwithAuthorization: Bearer <token>. Generate a new URL cuts off the old one right away, and Read-only leaves only the tools that read and search.Through the URL,
save_urlandread_urlonly fetch public addresses, never your computer or local network.It stays up until you turn it off or close brain. While it's on, brain keeps the computer from going to sleep by itself (the screen can still turn off; untick Keep the computer from sleeping to allow it). If the computer sleeps anyway (closing the lid), a watchdog checks the tunnel on wake:
cloudflaredreconnects with the same URL, and if it can't, or the tunnel no longer exists on Cloudflare's side, brain reopens it by itself. A quick tunnel then gets a new*.trycloudflare.comURL and the card tells you; Tailscale, ngrok and a named tunnel keep their URL. Reconnect does the same by hand. If the tunnel fails in a way retrying won't fix (Tailscale not signed in, an invalid ngrok authtoken), brain stops retrying and the card says what to fix; Retry tries again.
Apps with an "Add MCP server" form
Many apps have a dialog with two options, Run a command and Connect to a URL. Choose Run a command. If the app only takes a URL, use remote access: pointing it at the dashboard's address returns 403, because the dashboard only accepts requests from its own page.
Field | Value |
Server name |
|
Executable command | the absolute path to |
Arguments (one per line) |
|
Environment | empty |
The Connect agent tab shows these values already filled in for your machine, each with a copy button. Once the app uses brain for the first time, it appears under My connections on its own.
Connections
brain is also an MCP client. In the Connections tab you add other MCP servers, and brain re-exposes their tools to every agent you connected, prefixed with the connection's name (github__create_issue, composio__GMAIL_FETCH_EMAILS) so they never clash with brain's own tools.
Local command (recommended): an MCP server that runs on your Mac, e.g.
npx -y @modelcontextprotocol/server-githubwithGITHUB_TOKEN=…. The token stays on your machine.URL: a remote MCP server, with optional headers (
Authorization: Bearer …).Composio (optional). Composio stores your accounts' OAuth tokens in its own cloud; brain keeps the key, the configuration and everything it fetches locally. Two kinds of key work:
Consumer key (
ck_…, the usual one from dashboard.composio.dev): paste it and click Save and connect. brain connects tohttps://connect.composio.dev/mcpwith thex-consumer-api-keyheader, and the apps you already linked in Composio come with it. No user ID needed.Project key (
ak_…): fill in the user ID, click Choose apps, pick the auth configs, and brain creates the MCP server through Composio's developer API (x-api-key).Disconnect removes the Composio connection and wipes the key from
.env.
Every connection has two switches: Active (turn it off and its tools disappear from your agents right away) and Save to memory. With the second one on, each result is written to vault/knowledge/connections/<connection>/…md (or knowledge/composio/<app>/…), with the tool name, arguments and time in its frontmatter, and indexed in Chroma: what you fetched from GitHub or Gmail becomes searchable with search_knowledge and shows up in the graph.
Secrets (env values, headers, the Composio API key) live in ~/.brain/.env with 600 permissions, outside the vault and never committed. The connection list lives in ~/.brain/data/connections.json.
Fact check
The Fact check view verifies claims with a process you can see, instead of a "true/false" button:
The local chat model splits the text into checkable claims and marks opinions, predictions and vague statements as not verifiable.
Each claim is searched in brain first. If nothing relevant is saved, it's old, your notes disagree, there's no primary source or it's a current topic, brain searches the web (if you allow it) and tells you it did.
It runs a neutral query, an evidence query, a counter-evidence query and a primary-source query; opens and reads every page (a page it can't open is marked not fully inspected and doesn't count); types each source (official, academic, fact-checker, news, reference, social, other) by what it is; and groups pages from the same site or with copied text into one line of evidence.
The model says whether each source supports, contradicts or supports with limits, and must quote the exact sentence; a quote that isn't in the page doesn't count.
The verdict comes from fixed rules over independent lines of evidence: never "supported" with a single secondary source, and conflicting evidence is shown as a conflict.
Preferences (level, freshness, primary sources, counter-evidence, claim types, high-risk topics with extra rigor, regions, languages, source types, search engine, blocked domains) are set once in the view.
FACT-CHECK.md (at the root of the vault, next to FORMAT.md) is the same method written for any AI: when to leave brain and search the web, what counts as a source, how to quote and what verdict to give, and how to answer. Its Preferences block rewrites itself whenever you change them in the view, so every agent follows the same rules. Agents are told to read it (server instructions, fact_check and search_knowledge when it finds nothing), and the chat gets a reminder in every answer and the full guide with /factcheck or automatic checking on.
Nothing is saved to your vault unless you click Save to brain. It also works from the chat (/factcheck) and for agents (fact_check, which always applies your preferences). Turn on Let the chat and all your agents check facts that aren't in brain and every connected agent gets that instruction, and search_knowledge suggests fact_check when it finds nothing. For health, law, finance or safety it reminds you it's informational, not professional advice.
How it works
flowchart LR
subgraph Agents
A1[Claude Desktop]
A2[ChatGPT]
A3[Claude Code / Cursor / …]
end
subgraph brain["brain (your Mac)"]
S1[server.py<br/>one process per agent]
V[(vault/<br/>Markdown)]
H[(data/history.sqlite3<br/>versions)]
C[(Chroma<br/>shared HTTP server)]
O[Ollama<br/>nomic-embed-text]
P[Playwright<br/>headless Chromium]
D[Dashboard<br/>127.0.0.1:8765]
end
A1 & A2 & A3 -- MCP over stdio --> S1
S1 --> V
S1 --> H
S1 -- embeddings --> O
S1 -- chunks --> C
S1 -- JS sites --> P
S1 -- MCP client --> X[Your connections<br/>GitHub · Notion · Composio…]
D --> V & H & C
D -. starts/stops .-> C & OPieces:
MCP server (
server.py). Each agent launches its own process and talks to it over stdio (MCP's standard for local servers). It exposes the tools and tells the model to readBRAIN.md, your profile and your memory first. With remote access on, the dashboard also runs one copy over streamable HTTP (server.py --http,127.0.0.1:8770) behind a tunnel (Tailscale Funnel, ngrok or Cloudflare).Vault (
~/.brain/vault/). Markdown files with YAML frontmatter:BRAIN.md: the root and short index the agent reads first. Everything comes out of it:FORMAT.md(the vault's structure, note types, fields and how to connect notes),FACT-CHECK.md(what to do when the vault isn't enough),profile.mdand the base folders. brain keeps a block at its top with those links; the rest is yours.profile.md: your profile.memory/: one file per category ("Work", "Preferences"…) with one fact per bullet.projects/andskills/: your notes and reusable instructions.knowledge/sources/: the full text of every saved URL.Every note carries
type(Project, SubProject, File, Memory, Skill, Source…; insideprojects/, a project's main note is a Project, a subfolder's main note a SubProject and everything else a File, and the graph links each part to its project),createdandupdated, filled in by brain on every write: a small profile of the Open Knowledge Format, so any AI can tell what a note is and how current it is.FORMAT.mdat the root of the vault explains the structure, every type and field, where a new note goes and how to connect it (a project and its files share the project's tag) to your agents. Links can be[text](path.md)or[[name]].Core files are yours.
BRAIN.md,FORMAT.md,FACT-CHECK.mdand the base folders can't be written, moved or deleted through the tools (the chat included): agents read them and ask you for changes, and you edit them in the graph. When you changeFORMAT.mdorFACT-CHECK.md, brain stops updating them on new versions (managed: user).
History (
data/history.sqlite3). Every write stores the file's previous and new content. A cross-process file lock makes writes atomic, so Claude, ChatGPT and the dashboard can write at the same time without clobbering each other.Chroma. The vector database behind semantic search. It runs as a single HTTP server on
127.0.0.1:8055, so every process shares it without fighting over the disk.Ollama. Computes embeddings on your machine with
nomic-embed-text, using the prefixes the model expects (search_document:when indexing,search_query:when searching).
What happens when you save a URL (save_url):
trafilatura downloads the page and extracts clean text.
If it gets fewer than 30 words (typical of JavaScript-built sites) or the download fails, it renders the page in headless Chromium with Playwright and extracts again.
It splits the text into chunks of up to ~500 words (50-word overlap) that follow its structure: a heading stays with its first paragraph, lists, tables and code blocks aren't cut, and a chunk that starts mid-section carries the section title, which also goes into the chunk's metadata.
It embeds each chunk with Ollama and stores it in Chroma, with metadata pointing back to the source
.md. The same chunks go into a keyword index (SQLite FTS5,data/search.sqlite3), which catches proper names, IDs and exact numbers that embeddings miss.If a chat model is installed in Ollama, it adds a short
abstract(pages over 800 words) and theentitiesit names (people, places, organizations, projects) to the frontmatter. Both are optional: without the model the page is saved the same way.It writes
knowledge/sources/<slug>.mdwith the full text, its chunk ids,type: Source,title,resource(the URL) and, when the page shows them,authorandpublished. Saving the same URL again updates it instead of duplicating it.
Search (search_knowledge) runs the semantic search and the keyword search, and merges both lists with reciprocal rank fusion. If Chroma or Ollama is down, keyword search keeps working and the answer says so.
Memory over time: each fact carries the date it was saved (an HTML comment at the end of the bullet, invisible when reading). When a fact changes, add_memory(new, supersede=old) moves the old one to a ## Historial section with the date it stopped being true, so agents only see what's current and the past isn't lost.
Entities in the graph: notes in knowledge/ and memory/ get an entities list. Two notes that name the same person or project end up connected through a shared entity node, even if nobody linked them.
Reflect (Profile tab) reviews what's stored and suggests fixes: facts duplicated across categories, facts that probably contradict each other, and recent notes without entities. It never writes anything; each suggestion shows the tool call that would apply it.
How memory import works: the dashboard's prompt asks the chatbot for its memory grouped as ## Category / - fact. The parser also accepts plain lists, bold labels, numbered lists and JSON. It deduplicates, strips date prefixes, and when a memory mentions one of your projects by name, links them in the graph.
MCP tools
Tool | What it does |
| Lists vault files with their description |
| Reads a file |
| Creates or replaces a file |
| Appends to a file |
| Targeted replace ( |
| Changes metadata (description, tags, related…) without touching the content; |
| Deletes a file (recoverable) |
| A file's versions |
| Restores a file to an earlier version (also brings back deleted files) |
| Moves or renames a note (recoverable). Not for |
| What's messy in the vault: loose notes, notes with no links or no description, tag variants, similar names |
| Proposes adding or removing |
| Read-only: the neighbors of some notes and why they're linked |
| Saves a fact about you to your memory, without duplicates and with the date it was saved. If it replaces an older fact (you moved, changed jobs…), pass the old one in |
| Facts that were superseded in a memory category |
| Skills: reusable instructions in |
| Gathers everything brain has on a topic (search hits, memories, sources) so the agent can write a skill from it with |
| Scrapes, indexes and saves a URL (long pages also get a short |
| Hybrid search over what you saved: semantic + exact keyword (names, IDs, dates), merged with reciprocal rank fusion |
| Rebuilds the keyword index from the |
| Every saved URL, with its |
| Re-downloads one saved source (or all); keeps the last good copy if it fails |
| Reads a web page without saving it (e.g. an MCP server's docs) |
| Searches the web with brain's built-in search engine (Fact check's: DuckDuckGo, your own SearXNG, Brave or a Connections tool): title, URL, snippet, date and source type. Doesn't read the pages or save anything; not exposed in read-only remote access |
| Searches Lumina's knowledge base (your meetings, files and notes) when Lumina is running on your computer. Read-only; not exposed in read-only remote access |
| Searches the pages of OpenBlocks (your local notes app) through |
| Verifies claims: brain first, the web if needed, a verdict by rules with sources and quotes. Saves nothing |
| Proposes adding an MCP server to Connections. It doesn't add it: you approve it with one click |
| Your connections, whether they're active, and their tools |
| Re-discovers the tools of every active connection |
| Any tool from an active connection, proxied (and captured to memory if enabled) |
Every write validates the note's YAML frontmatter. If an agent writes a value that breaks it (typically an unquoted : in a description), brain quotes it automatically; if it can't be repaired, the write is rejected with a clear error, so metadata never silently disappears from the graph.
The brain command
brain opens the dashboard and starts Ollama and Chroma
brain --port 8766 dashboard on another port
brain --no-autostart don't start Ollama/Chroma automatically
brain --no-browser don't open the browser
brain app opens the desktop app (menu bar / tray, notifications, notch)
brain app-update downloads the latest release's app and reopens it
brain update updates to the latest version (Settings → Update and restart does it from the dashboard)
brain path shows where it's installed
brain uninstall removes the command and the desktop app (keeps your data)
brain help helpData, privacy and security
Everything is local. Your data lives in
~/.brain/vault/and~/.brain/data/. Both folders are in.gitignore, so they're never uploaded anywhere, not even if you fork the repo.No external services by default. Embeddings are computed with Ollama on your machine. brain only goes online when you save or refresh a URL, use a connection that talks to a remote service, checks GitHub for a new version (it only reads the latest release number), runs a Fact check that needs the web (the claims go as queries to the search engine you chose, and the result pages are opened; never pages on your machine or local network), or keeps the tunnel (Tailscale, ngrok or Cloudflare) open if you turn on remote access. Composio, if you use it, keeps your app tokens in its cloud.
The dashboard only accepts requests from your own machine. It listens on
127.0.0.1, rejects requests with any otherHost(DNS-rebinding protection), and its actions require a custom header browsers won't send from other pages. No website you have open can start processes or write to your vault.Remote access is opt-in and locked with a token. The URL carries a secret token (regenerate it any time), can be set to read-only, and the server behind it listens only on
127.0.0.1. The token is in~/.brain/data/remote.json(600).Agents can't leave the vault. The tools reject paths with
.., absolute paths, hidden files and symlinks that point outside. Inside it,BRAIN.md,FORMAT.md,FACT-CHECK.mdand the base folders are read-only for them.Secrets stay out of the vault and the repo. Connection tokens and API keys are in
~/.brain/.env, and OAuth sign-ins in~/.brain/data/oauth.json(both permissions600, gitignored); the dashboard never shows them back, and backups leave them out unless you ask.Agents can propose, not install. An agent (or the chat's
/add-mcp) can only propose a new connection; nothing runs until you click Add and see the exact command or URL. The same goes for graph changes: nothing changes until you approve the image.Everything can be undone. Any write can be reverted with
file_history+restore_file, and Settings → Backup keeps full copies you can restore.
The website's privacy policy covers the site too (its chat assistant is provided by DokBot).
To start from scratch: close the dashboard and your agents, and delete ~/.brain/vault and ~/.brain/data. They're recreated empty on the next start.
Troubleshooting
Problem | Fix |
The app window says "brain could not start" | brain isn't installed where the app looks ( |
No icon in the tray on Linux | GNOME needs the AppIndicator extension ( |
Notifications don't appear (app) | Allow notifications for brain in your system settings (macOS: Settings → Notifications), and check Settings → Notifications inside the app. |
"Ollama isn't running" | Turn on the Ollama switch in the Dashboard, or open the Ollama app. |
Search finds nothing for a name you know is saved | Sources saved before v0.02.5 aren't in the keyword index yet: click Rebuild keyword index in the Knowledge tab (or ask an agent to run |
Sources have no | Those need a chat model in Ollama: |
"The Chroma server isn't running" | Open the dashboard ( |
Composio returns | Check the key type: a consumer key ( |
An app returns | You used "Connect to a URL". Use Run a command with the values from Apps with an "Add MCP server" form. |
brain doesn't show up in Claude Desktop | Connect it from Connect agent and restart Claude. Check My connections. |
brain doesn't show up in ChatGPT | Use Codex or ChatGPT Work mode and go to Settings → MCP servers → Restart. Regular chat doesn't use local servers. |
The chat says there's no chat model | Click Download llama3.2 in the Chat tab, or run |
The chat answers but can't save or edit anything | Open the actions under the answer to see what failed. Very small models sometimes don't follow the tool format; try a larger one (for example |
"Couldn't extract text from that URL" | The site may be paywalled or require a login. Try Force JS rendering. |
| Open a new terminal. If it persists, add |
Port 8765 is taken |
|
Uninstalling
In the dashboard, Connect agent → disconnect your agents (or remove the
brainentry from their config).brain uninstallremoves the command and the desktop app (on Windows, uninstall the app from Settings → Apps).rm -rf ~/.braindeletes the app and your data.
Development
CLAUDE.md: technical guide for agents working on the repo (architecture, conventions and gotchas).CHANGES.md: the log of every change and decision. New changes are appended at the end.BUILD.md: the original spec.docs/: the website, published with GitHub Pages.
git clone https://github.com/Lautaro005/brain && cd brain
uv sync && ./brain.shThe dashboard UI is available in English and Spanish; the internal docs (CLAUDE.md, CHANGES.md, BUILD.md) are in Spanish.
License
MIT with the Commons Clause © 2026 Lautaro Silva.
You can use, study, modify and share brain for free, including at work. The Commons Clause adds one restriction: you may not sell it, meaning you can't charge third parties for a product or service (hosting, support or consulting included) whose value comes entirely or substantially from brain. It applies to every version of brain.
Both parts are in LICENSE: the Commons Clause condition first, then the MIT text. GitHub only auto-detects standard license templates, and MIT + Commons Clause isn't one, so the sidebar shows "View license" instead of a license name. That is expected: the only way to get an "MIT" label would be to drop the condition, and plain MIT would allow selling it.
Security
To report a vulnerability, see SECURITY.md. Please don't open a public issue for it.
Available Tools
31 toolsadd_memoryA
Guarda un hecho duradero sobre el usuario en memory/.md (sin duplicar), con la
fecha en que se guardó. Ej: add_memory("Prefiere respuestas cortas", "Preferencias").
Si este hecho reemplaza a uno anterior (cambió de dirección, de trabajo, etc.), pasá el texto
del hecho viejo en supersede — no se borra, queda marcado como superado con fecha en el
mismo archivo (sección ## Historial).
Inputs: fact (required), category, supersede. Returns: result
append_fileB
Agrega contenido al final de un archivo del vault (lo crea si no existe). Queda en el historial.
Inputs: path (required), content (required). Returns: result
delete_fileB
Borra un archivo del vault. Recuperable con file_history + restore_file.
Inputs: path (required). Returns: result
distill_skillA
Junta todo lo que brain tiene sobre topic (fuentes, memoria, notas de conexiones) para
que el agente redacte un skill a partir de esto y lo guarde con write_file en
skills/.md. Esta tool NO escribe el skill sola — devuelve el material.
Inputs: topic (required). Returns: result
fact_checkA
Verifica afirmaciones con un proceso visible: las separa, busca primero en brain y, si lo guardado no alcanza (y el usuario lo permite en Fact check), busca en internet con consultas a favor y en contra, lee cada página, agrupa las fuentes que no son independientes y da un veredicto por reglas (respaldada, probablemente respaldada, mixta, no concluyente, probablemente falsa, falsa, no verificable) con citas, fechas y limitaciones. No guarda nada en el vault. Tarda: usala cuando el usuario pida verificar algo o cuando haga falta comprobar un dato que no está en brain. Usa las preferencias de Fact check del usuario (nivel, actualidad, fuentes, buscador…). search_web=False: solo brain. Las reglas completas (cuándo salir a internet, qué fuentes cuentan, cómo citar y responder) están en FACT-CHECK.md.
Inputs: text (required), search_web. Returns: result
file_historyA
Versiones de un archivo del vault, la más nueva primero (id, fecha, operación). El id sirve para restore_file.
Inputs: path (required). Returns: result
get_skillA
Devuelve el contenido de un skill por nombre (ej. 'mi-skill' o 'mi-skill.md').
Inputs: name (required). Returns: result
inspect_graph_regionA
Solo lee: para cada nota pedida (nombre o ruta, hasta 10), sus vecinos en el grafo y por qué están unidos (link en el texto, related, tag, entidad…), además de su related y tags. Sirve para entender una zona del grafo antes de proponer un cambio con propose_graph_change.
Inputs: nodes (required). Returns: result
list_connectionsA
Conexiones configuradas (otros servers MCP que brain re-expone): nombre, si están activas y sus tools.
Inputs: no named parameters. Returns: result
list_skillsA
Lista los skills disponibles (skills/*.md) con su description, para decidir cuál aplica.
Inputs: no named parameters. Returns: result
list_sourcesA
Lista todas las fuentes scrapeadas (url, cuándo se bajó el contenido actual, cuándo se revisó por última vez, el error de la última actualización si falló, path del .md, título y, si es larga, un resumen corto en 'abstract' para decidir si leerla entera con read_file).
Inputs: no named parameters. Returns: result
list_vaultA
Lista archivos .md del vault (path + description del frontmatter). prefix opcional, ej. 'projects'.
Inputs: prefix. Returns: result
lumina_searchA
Busca en la base de Lumina (la app de notas de reuniones y archivos del usuario, en su compu): sus reuniones (transcripciones y resúmenes), archivos y notas. Devuelve fragmentos con título, fecha, tipo y puntaje. scope: all, documents, meetings o notes. Solo lee. Requiere que Lumina esté corriendo (127.0.0.1:47770); si no, devuelve un error claro. Para responder con ellos, citá el título y la fecha.
Inputs: query (required), limit, scope. Returns: result
memory_historyC
Hechos superados de una categoría de memoria (los que se reemplazaron con add_memory(..., supersede=...)), con la fecha en que dejaron de valer y qué los reemplazó.
Inputs: category. Returns: result
move_fileA
Mueve o renombra una nota del vault (ej. move_file("idea.md", "projects/idea.md")). Recuperable con file_history + restore_file. No mueve BRAIN.md, FORMAT.md, FACT-CHECK.md, profile.md, memory/ ni knowledge/sources/ (los maneja brain), ni carpetas. Si otras notas la linkean por path, actualizá esos links.
Inputs: dst (required), src (required). Returns: result
openblocks_searchB
Busca en las páginas de OpenBlocks (la app de notas local del usuario, con su vault de Markdown): devuelve
las páginas que coinciden con su título, ruta y un fragmento. Solo lee (abre openblocks mcp --read-only) y no
hace falta que la app esté abierta, solo instalada. Para responder, nombrá la página.
Inputs: query (required), limit. Returns: result
propose_connectionA
Propone agregar un server MCP a las Conexiones de brain. NO lo agrega: el usuario lo aprueba con un click (en el chat o en Conexiones) viendo el comando o la URL. - Server remoto: url="https://…/mcp" (si pide login, el usuario inicia sesión al aprobar). - Server local: command + args, ej. command="npx", args=["-y", "@modelcontextprotocol/server-github"] o command="uvx", args=["mcp-server-fetch"]. env/headers: claves que pide (ej. {"GITHUB_TOKEN": "…"}). note: una línea que explique qué hace. Si falta un dato (una API key), pediselo al usuario antes.
Inputs: name (required), env, url, args, +3 more. Returns: result
propose_graph_changeA
Propone cambiar conexiones del grafo (el related de las notas). NO cambia nada: valida el pedido,
arma una imagen con los cambios marcados y el usuario la aprueba o la rechaza con un click.
changes: [{"type": "add_link" | "remove_link", "source": "", "target": "", "label"?: "usa"}]
(nombre, ruta o nombre de archivo de cada nota; hasta 10 cambios). reason: una línea con el porqué.
Usala en vez de set_frontmatter(related) cuando el usuario pida conectar o desconectar notas.
Inputs: changes (required), reason. Returns: result
read_fileA
Devuelve el contenido completo de un archivo del vault (path relativo, ej. 'BRAIN.md').
Inputs: path (required). Returns: result
read_urlA
Lee una página web y devuelve su texto, SIN guardarla en el vault (para guardarla, save_url). Sirve para leer la documentación de un server MCP antes de proponerlo.
Inputs: url (required), max_chars. Returns: result
refresh_connectorsA
Vuelve a descubrir las tools de todas las conexiones activas (después de conectar una app nueva).
Inputs: no named parameters. Returns: result
refresh_sourcesA
Vuelve a bajar una fuente guardada (path de knowledge/sources/…) o todas si no pasás path. Si la página cambió, actualiza el .md y los índices; si falla, conserva la última copia buena y anota el error. Puede tardar si son muchas.
Inputs: path. Returns: result
reindex_keyword_searchA
Reconstruye el índice de búsqueda por palabra desde los .md de knowledge/ (sources, connections, composio). Sirve para fuentes guardadas antes de que existiera la búsqueda híbrida; no re-scrapea ni vuelve a calcular embeddings.
Inputs: no named parameters. Returns: result
restore_fileA
Vuelve un archivo a como quedó en la versión version_id (ver file_history). La restauración también queda en el historial, así que se puede deshacer.
Inputs: path (required), version_id (required). Returns: result
save_urlA
Scrapea una URL, la chunkea, la indexa en Chroma y crea/actualiza su .md en knowledge/sources/. Si la URL ya estaba guardada, la actualiza (no duplica). Si el fetch normal no saca texto útil (sitio con mucho JS), renderiza solo con Playwright; render_js=True fuerza ese camino directo.
Inputs: url (required), render_js. Returns: result
search_knowledgeB
Búsqueda híbrida en las fuentes scrapeadas y lo capturado de conexiones: semántica (sentido) + por palabra exacta (nombres propios, IDs, fechas, números). Devuelve chunks con url, source_md_path, score (similitud semántica, None si solo matcheó por palabra) y match.
Inputs: query (required), top_k. Returns: result
set_frontmatterA
Cambia campos del frontmatter (description, tags, related, name…) sin tocar el contenido. Ej: set_frontmatter("projects/brain.md", {"description": "App de memoria local"}). null borra el campo. Preferila a reescribir el archivo cuando solo cambia un metadato.
Inputs: path (required), fields (required). Returns: result
str_replace_fileC
Reemplazo puntual: 'old' debe aparecer exactamente una vez en el archivo. Queda en el historial.
Inputs: new (required), old (required), path (required). Returns: result
vault_overviewA
Panorama del vault para ordenarlo: carpetas, notas sueltas, sin conexiones o sin descripción, tags repetidos o con variantes y nombres parecidos. No cambia nada.
Inputs: no named parameters. Returns: result
web_searchA
Busca en internet con el buscador incorporado de brain (el de Fact check: DuckDuckGo, tu SearXNG propio, Brave o una tool de tus Conexiones, según Ajustes → Fact check). Devuelve título, url, fragmento, fecha y tipo de fuente de cada resultado, sin leer las páginas ni guardar nada: para leer una, read_url; para guardarla, save_url; para comprobar un dato, fact_check. freshness: any, day, month o year. Respeta el interruptor de internet y los dominios bloqueados de Fact check.
Inputs: query (required), freshness, max_results. Returns: result
write_fileA
Crea o REEMPLAZA ENTERO un archivo del vault. Queda en el historial (file_history). No puede tocar BRAIN.md, FORMAT.md ni FACT-CHECK.md (los edita el usuario). Antes de crear una nota, leé FORMAT.md.
Inputs: path (required), content (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Despite many search-ish tools (web_search, search_knowledge, openblocks_search, lumina_search, fact_check, read_url), each targets a clearly distinct source or action and descriptions explicitly cross-reference when to use which (read_url vs save_url, fact_check vs web_search). A few pairs like read_url/save_url and search_knowledge/openblocks_search could still be misread at a glance, keeping it just below perfect clarity.
Names are uniformly snake_case and mostly verb_noun (save_url, read_file, list_sources, add_memory, refresh_sources). Minor deviations exist in noun-first or ambiguous forms like web_search, fact_check, memory_history, and vault_overview, but the convention remains predictable overall.
31 tools is on the heavy side (25+), with several near-clustered search/URL/file variants. The app genuinely spans vault, knowledge, memory, skills, graph, and connections, so most tools earn their place, but the surface is borderline unwieldy for a single server.
File lifecycle (read/write/append/str_replace/set_frontmatter/move/delete/history/restore) and memory (add_memory/memory_history with supersede) are well covered, plus search, sources, skills, and graph. Minor gaps remain: no explicit remove/disconnect connection tool (only list/refresh/propose) and no memory deletion, but these are workable.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
One memory for you and your AI agents, shared by ChatGPT, Claude, Gemini, Grok, Codex and Cursor.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceLocal-first, multi-user shared memory for AI agents with semantic search, offline support, and team synchronization.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search and retrieve memories from your Mac, including screen captures, meeting transcripts, and browsing history, all locally and privately.1Elastic 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to store and retrieve persistent project and cross-project memories via semantic search, so decisions, preferences, error patterns, and guidelines survive across sessions. Optionally supports autonomous task execution built on the same local-first knowledge store.-

Make0 Brainofficial
AlicenseAqualityBmaintenanceGives every AI agent you use one shared, versioned memory in a local SQLite file, so a fact saved from one app is found by all the others. Runs fully offline with no API key, records which agent wrote each change, and keeps every prior version so nothing is silently overwritten.7760 npm15MIT