A second brain for you and your AI assistants: a 3D map of everything you write and a memory they plug into. 100% local.
pip install brainplug==0.4.0 Copy PIP instructions
Plug your brain into any AI. A second brain for you and for your AI assistants: Brainplug turns your AI chats, notes, documents, mail and messages into a 3D brain you can explore, and into a memory your assistants plug into: they get a short briefing instead of a pasted prompt, look up only what they need, and save what they learn as notes in your Obsidian vault. Nothing is uploaded.
Website and live demo · Make yours in the browser
The animation and the screenshots use invented demo data, not anyone's real writing.
Every new chat starts blank, so you paste the same background again and again. With Brainplug the background lives in one place, as Markdown in your own vault, and every assistant reads from it and adds to it:
uv tool install brainplug # or: pipx install brainplug brainplug brain ~/Documents/MyVault # creates MyVault/Brainplug: "About me" and Memory/ brainplug connect ~/Documents/MyVault # adds it to Claude Desktop, Claude Code, Cursor, Codex… brainplug doctor ~/Documents/MyVault # checks that it answers, end to end brainplug brain ~/Documents/MyVault --draft-about writes a first draft of your "About me" note from what you have written, while it is still empty. Until the first release reaches PyPI, install it from GitHub: uv tool install "brainplug @ git+https://github.com/juanmariarodriguez2-png/brainplug". Add --sessions to connect to include what you typed to Claude Code and Codex, and put export files after the vault to include what you wrote before (… MyVault chatgpt-export.zip).
connect finds the assistants installed on this computer (Claude Desktop, Claude Code, Codex, Cursor, Windsurf, Gemini CLI, VS Code, LM Studio), adds one brainplug entry to each one's settings with an absolute path (desktop apps do not see your terminal's PATH), keeps everything else there, and backs the file up first. --print shows what it would change.
It is a Model Context Protocol server that runs on your computer, so it works with assistants that can start one. It has been used end to end by Codex (context, recall, remember); the read-only tools are marked as such, so assistants can run them without asking each time.
Only your own words go in. The AI's answers and other people's mail and messages are left out, so the map shows what you care about and not what you were told. Word and PDF files are the exception: they are read whole, so add the ones you wrote. PDFs found inside a folder are skipped unless you ask for them (--pdf).
The result is one HTML file that opens offline, in English or Spanish.
Open the app, drop your files and folders, and press the button. The whole analysis runs in that tab (docs/app/engine/, plain JavaScript). Once the page has loaded it needs no connection, so you can switch your wifi off before you add your files, and you can download the result.
For exports of more than about a gigabyte, use the Python version: a browser tab runs out of memory before Python does.
Needs Python 3.10 or later. Works on Windows, macOS and Linux.
Sync rebuilds your brain whenever something changes:
brainplug sync --init ~/Documents/MyVault ~/Downloads/brainplug-capture.json -o my_brain.html brainplug sync # rebuild once brainplug sync --watch # rebuild when a note changes or a new capture file arrives The settings live in brainplug.json, next to where you ran --init. To have the result on several devices, point -o (or --vault) at a folder that already syncs: iCloud, Google Drive, Dropbox, Obsidian Sync. Brainplug has no servers of its own.
your words ─► TF-IDF ─► LSA (SVD) ─► k-means ─► topics and their names │ ├─► nearest neighbours + [[links]] ─► connections, bridges ├─► brain layout (implicit volume, farthest-point sampling, PCA) ├─► galaxy layout (time on the radius, topics on the arms) └─► waves, review and habit statistics │ one HTML file (three.js point shader) Sources. Every format becomes the same Item: a title, a date and the text you wrote. The mbox reader streams messages and strips quoted replies and signatures. Topics. TF-IDF with word pairs → truncated SVD → k-means, with the number of topics chosen by silhouette score. Stop words cover English and Spanish. Connections. Cosine nearest neighbours in the semantic space, plus the links in your notes. An item nearly as close to another topic's centre as to its own is a bridge. Review. Compares the last 60 days with the 60 before, and flags topics with no activity for 90 days or more. Two engines. The Python package uses scikit-learn. The web app runs a dependency-free JavaScript port with its own TF-IDF, randomized SVD and k-means. tests/test_web.py gives both the same files in every supported format and requires identical numbers and matching topics. Project structure brainplug/ the Python package ├── sources.py every export format → Item ├── notion_api.py Notion pages with real creation dates ├── analysis.py topics, connections, layouts, review, statistics ├── brain.py brain and galaxy geometry ├── pipeline.py files → HTML in one call ├── sync.py brainplug.json and --watch ├── memory.py the notes assistants save (Brainplug/Memory, About me.md) ├── agent.py the MCP server: context, recall, remember… ├── connect.py brainplug connect and brainplug doctor ├── export.py Obsidian notes and the redacted dataset ├── app.py local drag-and-drop app ├── render.py, templates/, vendor/ docs/ the website (GitHub Pages) ├── app/ the web app: index.html, worker.js, engine/ (the JavaScript port) extension/ the live-capture browser extension scripts/build_web.py regenerates the files the web app shares with the package tests/ pytest suite; tests/browser/ drives Chrome Tests pip install -e ".[dev]" python -m pytest -q The suite covers every loader, checks that only your own words are kept and that private mode leaks nothing, runs the app, the sync command and the MCP server (including saving and recalling a memory) end to end, and compares the JavaScript engine with the Python one (needs Node.js). tests/browser/ drives the web app and the extension in a real Chrome; see its README.
Everything above is exercised by the tests, but with invented data written in each app's real export format, not with years of anyone's real exports. In particular:
If a real export trips something up, please open an issue with the shape of the file (not its contents).
Inspired by mindcorpus and by the "your Obsidian vault is a galaxy" visualisations. Built with scikit-learn, three.js, fflate, pdf.js, pypdf and the Inter typeface.
MIT © 2026 Juan Rodríguez. Bundled third-party files keep their own licences: three.js (MIT), fflate (MIT), pdf.js (Apache 2.0) and Inter (SIL Open Font License); see the licence files next to each of them.
Both files in this release have provenance metadata.
second brain memory mcp model context protocol obsidian chatgpt claude codex personal knowledge visualization local-first
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




