get_contextLABSCO SUMMARY
The vault maintains itself so recall stays cheap.
The interesting design choice is forgetting: notes you stop reading get compressed rather than kept at full length, which is what stops a growing library from eating a growing share of every context window. Everything stays plain Markdown, so leaving costs you nothing. One practical note from the README itself — PyPI lags the source tree, so the newest build comes from the repository rather than from pip install.
What it is
A local knowledge base an AI agent can read, write and maintain. Notes are plain Markdown on your disk — syncable over Drive, iCloud or git, portable between agents — with a rebuildable index alongside them for search. The vault is the source of truth; the index can be regenerated at any time.
What you get
- One command that ingests anything:
save_articletakes a URL or a PDF, converts it to Markdown, OCRs every figure, embeds it, and auto-links it to related notes - Search over both text and images — hybrid BM25 plus semantic over note text, and a separate figure search that returns the exact panel across the whole library —
search_notes,search_figures - Note authoring that files itself: create, update or append, with filing, indexing and wikilinking handled for you —
new_note,update_note,append_to_note - A session-start call that reloads goals, top-ranked notes and accumulated rules, so a new conversation begins from a dense checkpoint rather than blank —
get_context - Compression that runs on the vault itself: Ebbinghaus ranking pushes stale notes down and
vault_sleepcompresses the low-activity ones, keeping recall cheap as the library grows - A filing manual served to any agent on request, so every agent files things the same way without being taught again —
get_agent_instructions - Setup and maintenance calls:
init_vaultto verify a fresh install,sync_indexto rebuild the index from the Markdown - The README names these as core; it points at a full reference covering 30+ tools
Requirements
No account and no key for the default setup. Python ≥ 3.11. Install mcp-second-brain from PyPI, then playwright install chromium for the page fetching, and point SECOND_BRAIN_PATH at the directory you want the vault in — it and the templates are created on first run. The module launches as python -m mcp_second_brain over stdio (version 0.2.0). The index is DuckDB by default and entirely offline; Postgres with pgvector is the alternative when you want one central vault across machines. Figure OCR uses Claude Vision, and search falls back to BM25 when nothing external is reachable.
Setup effort
One command — pip install mcp-second-brain
USE CASES
Filing a paper you will want in six months
Hand over the URL or PDF once and let it convert, OCR the figures, embed and link — instead of downloading it into a folder you will never open again.
Finding the figure, not the paper
Search for what the panel shows rather than what the paper is called, and get the specific figure back from across the whole library.
Starting a session already up to speed
Open with the context call so goals, the highest-ranked notes and the rules extracted from what you read most are loaded before the first question.
Keeping several agents filing consistently
Let each agent pull the filing manual from the vault itself, so the conventions live in one place instead of in each agent's prompt.
11 tools
Listed in project docs. Your client may show a different list.
save_articlesearch_notessearch_figuresnew_noteupdate_noteappend_to_notevault_sleepget_agent_instructionsinit_vaultsync_indexBEFORE YOU INSTALL
What to know first
Tools you get
11 tools named in the project's documentation.
Requires
python on PATH
INSTALLATION
Connect your client
Server setup
pip install mcp-second-brainMCP Clients
Claude Code
claude mcp add --scope user second-brain \
--env SECOND_BRAIN_PATH=~/second-brain \
-- python -m mcp_second_brain