Install
TL;DR
# 1. Install the Claude Code plugin/plugin install matts-second-brain
# 2. In any Claude session — runs the wizard/matts-second-brain:install
# 3. Restart Claude Code so the new MCP loadsThe wizard handles everything: backend selection, credential collection (with hidden input), taxonomy seeding, MCP registration. You answer prompts, it does the work.
What the wizard does
- Detects existing setup. If Trilium is already running locally, or you have an Obsidian vault path set, it reuses them.
- Collects credentials safely. ETAPI tokens / Notion tokens go through a hidden-input prompt — never echoed, never in shell history, never in argv.
- Seeds the root taxonomy. Creates Claude Memory with Standards, Decisions, Lessons Learned, Apps, Reviews, Drafts children. Idempotent — safe to re-run.
- Registers the MCP server in your
~/.claude.jsonso thebrain_*tools become available. - Optionally scans transcripts for repeated corrections you can promote to Standards (read-only — never auto-writes).
Manual install (if you’d rather)
If you don’t want to use the wizard, here’s what it actually does:
1. Install the plugin
The plugin lives in the claude-plugins marketplace. From any Claude Code session:
/plugin install matts-second-brain2. Set up your backend
Pick one of:
Trilium (default — self-hosted)
# If you don't have Trilium yet:docker run -d --name trilium -p 127.0.0.1:8787:8787 \ -v trilium-data:/home/node/trilium-data \ triliumnext/notes:v0.95.0In Trilium UI: Options → ETAPI → Create new token. Copy the value.
Obsidian (local markdown vault)
export BRAIN_BACKEND=obsidianexport BRAIN_OBSIDIAN_VAULT="/path/to/your/vault"Notion (cloud)
In Notion: create an integration at https://www.notion.so/profile/integrations, share a root page with the integration. Then:
export BRAIN_BACKEND=notionexport BRAIN_NOTION_TOKEN=secret_xxxxxexport BRAIN_NOTION_ROOT_PAGE=<root-page-id>3. Install the MCP
npm install -g @matthesketh/second-brain-mcpAdd to ~/.claude.json:
{ "mcpServers": { "second-brain": { "type": "stdio", "command": "second-brain-mcp", "env": { "BRAIN_BACKEND": "trilium", "TRILIUM_URL": "http://127.0.0.1:8787", "TRILIUM_ETAPI_TOKEN": "your-token-here" } } }}4. Seed the taxonomy
Restart Claude. In a session, say:
Run
brain_seed_taxonomy.
That’s it.
Multi-user setup
If multiple OS users share one Claude/brain instance, see Multi-user setup.