Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Self-maintaining knowledge vault: figure-level search, auto-wikilinks, and memory compression.

README.md

<!-- mcp-name: io.github.ddmanyes/mcp-second-brain -->

second-brain MCP Server

A self-maintaining personal knowledge base for AI agents — a plain-Markdown vault, powered by MCP.

![CI](https://github.com/ddmanyes/second-brain-mcp/actions/workflows/ci.yml) ![Python ≥ 3.11](https://www.python.org/) ![License: MIT](LICENSE)

📖 English · 繁體中文

---

A local knowledge base your AI agent can read, write, and maintain on its own. Save a paper or note with one command — second-brain converts it to Markdown, OCRs every figure, embeds it for semantic search, and auto-links it to related notes. Notes you stop reading compress themselves over time, so recall stays cheap as the vault grows.

Everything is plain Markdown — sync via Google Drive / iCloud / git, switch agents anytime, zero lock-in.

Highlights

  • One command saves anythingsave_article(url_or_pdf) fetches, converts to Markdown, OCRs figures (Claude Vision), embeds, and auto-links.
  • Figure-level searchsearch_figures("UMAP melanocyte") returns the exact panel across your whole library.
  • Self-organizing — new notes auto-link to related ones; frequently-read notes extract reusable rules.
  • Memory that forgets like a brain — Ebbinghaus ranking; stale notes auto-compress (60–90% fewer tokens).
  • Session continuityget_context() reloads goals + top notes + rules at the start of every session.
  • Pluggable backend — DuckDB (default, offline) or Postgres + pgvector (central, multi-machine). Self-hosted embeddings optional; BM25 fallback when offline.

Quick Start (Claude Code)

pip install mcp-second-brain
playwright install chromium

claude mcp add --scope user second-brain \
  --env SECOND_BRAIN_PATH=~/second-brain \
  -- python -m mcp_second_brain

The vault directory and templates are created on first run. Then tell your agent init_vault to verify.

⚠️ PyPI currently lags the source tree. For the newest build — plus Claude Desktop, Windows, and multi-machine / central-server setups — see NEW_MACHINE_SETUP.md.

Core Tools

| Tool | What it does | | :--- | :--- | | get_context | Session start — goals + top-ranked notes + auto-rules | | save_article | URL / PDF → Markdown + figures + embeddings | | search_notes / search_figures | Hybrid BM25 + semantic search (note text / figure content) | | new_note / update_note / append_to_note | Create & edit notes (auto-filed, auto-indexed, auto-linked) | | vault_sleep | Compress old, low-activity notes | | get_agent_instructions | Serve the full filing SOP (AGENTS.md) to remote agents |

Full tool reference (30+ tools) lives in AGENTS.md.

How It Works

Any source (paper · PDF · web · note)
        │   save_article · new_note
        ▼
Markdown vault  ──►  index  (DuckDB, or Postgres + pgvector)
  00-inbox/            • BM25 + semantic search
  10-projects/         • figure OCR + vision descriptions
  20-areas/            • auto-wikilinks between related notes
  30-resources/        • Ebbinghaus ranking → weekly auto-compression
  decisions/ memory/
        │
        ▼
Your AI agent queries it — search_notes · search_figures · get_context

The vault is the source of truth; the index is rebuildable anytime (sync_index). Filing conventions live in one operating manual — AGENTS.md — served to any agent via get_agent_instructions(), so every agent files things the same way without being re-taught.

Vault Structure

vault/
├── 00-inbox/       Unprocessed captures
├── 10-projects/    Active projects
├── 20-areas/       Ongoing research / coding domains
├── 30-resources/   Papers & articles (save_article writes here)
├── 40-archive/     Auto-compressed originals
├── decisions/      Architecture Decision Records
├── memory/         goals.md · rules.md  (injected every session)
└── templates/      Note templates

Documentation

  • AGENTS.md — filing SOP, naming conventions, full tool reference (single source of truth)
  • NEW_MACHINE_SETUP.md — source install, self-hosting, multi-machine central server, API keys
  • CONTEXT.md — domain model / ubiquitous language

Design Notes

Inspired by biological memory: the Ebbinghaus forgetting curve (access_count / ln(age_days)) for ranking, and sleep-dependent consolidation (weekly LLM compression of low-access notes). Built with MarkItDown · DuckDB · pgvector · FastMCP · Playwright · Claude API.

License

MIT © 2026 Chan Chi Ru. See LICENSE.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.