Skip to main content
Glama
second-brain-mcp

second-brain-mcp

by liorsolomon

second-brain-mcp

One shared, people-first second brain for every Claude you use.

An open-source MCP server that turns an Obsidian vault into memory shared across Claude.ai (web, desktop, mobile), Claude Code on any computer, and Claude Desktop. Notes stay plain Markdown, so you can still read and edit them in Obsidian.

flowchart LR
  A["Claude.ai: web, desktop, phone"] -->|HTTPS + OAuth| S
  B["Claude Code, any computer"] -->|HTTPS + OAuth| S
  S["second-brain-mcp<br/>Railway"] --> F[("S3: your vault<br/>private, KMS, versioned")]
  O["Obsidian"] <-->|Remotely Save| F

Why

  • People first. People, organizations, meetings, and how people connect to each other are built in. Connections are written on both people's notes. Every conversation is logged on each attendee, with last_contact and follow-ups tracked.

  • One brain, everywhere. Every Claude session reads from and writes to the same vault, so context carries across chats, devices and /compact.

  • Your data stays yours. Plain .md files in your own S3 bucket. No hard deletes; every version is kept.

  • Secure by default. HTTP mode won't start without OAuth, and only allowlisted, verified Google accounts get in. See SECURITY.md.

Related MCP server: Obsidian Nexus

Tools

Notes

People

context

session start: rules, Home, relevant notes, follow-ups

person

full profile, connections, log, meetings, mentions

search

keywords over names, frontmatter and content

upsert_person

create/update; matches aliases to avoid duplicates

read

one or more notes

log_interaction

Meeting note + each attendee's Log + Daily

capture

quick note to the Inbox

connect

relationship, written both ways (reports_to ↔ manages, …)

write / patch

create / targeted edit

who_knows

people at an org; connection path to someone

link

link two notes both ways

follow_ups_due

overdue and upcoming follow-ups

daily

append to today's note

people_graph

nodes + edges, filter by org/context

archive

the only "delete": moves to Archive/

health

broken links, orphans, inbox, stale projects

activity

what occupied your time: trends in topics, notes, people, projects

Activity stats

With a Postgres database configured, the server records one small event per tool call: which notes were touched, and the tags, projects, people and organizations in their frontmatter. Never note contents. Ask Claude for a retrospective ("what took my time this quarter?") and it calls activity, which returns aggregates only: a weekly or monthly time series, top topics/notes/people/projects with the trend against the previous period, new notes, interactions by person, and what went quiet. Each bucket also splits its score across the period's top topics (by_topic), ready for a stacked "where my attention went" chart.

The retrospective prompt turns that into a one-click visual report: KPI cards, the stacked timeline, top topics/projects/people/notes with trends, what went quiet, 3–5 insights and reflection questions, and an offer to save a summary to Reviews/ in the vault. In Claude.ai it shows up in the prompt menu; in Claude Code it's /mcp__second-brain__retrospective 90d.

Repeated reads of the same note within 30 minutes count once, and routine calls (context, health, follow_ups_due) aren't recorded. On by default when a database is configured; SB_STATS=off turns it off. See SECURITY.md for what's stored.

Vault format

PARA folders plus People/, Organizations/, Meetings/, Daily/ and 00-Inbox/. YAML frontmatter on every note, and [[wikilinks]] by bare name. See examples/vault (all fictional): copy it to start your own vault, and edit its CLAUDE.md to change the rules Claude follows.

Quick start (local)

git clone https://github.com/liorsolomon/second-brain-mcp && cd second-brain-mcp
uv sync
claude mcp add second-brain -e SB_VAULT_PATH="$PWD/examples/vault" -- uv --directory "$PWD" run second-brain-mcp

Deploy to the cloud

  1. AWS setup: Terraform for the bucket, KMS key, least-privilege IAM user and CloudTrail

  2. Deploy to Railway and connect Claude

  3. Sync Obsidian with the S3 vault (Remotely Save, desktop and mobile)

  4. Make every Claude use it: read the vault at the start of every chat and log new topics as they come up, on every device

Roadmap

  • Activity stats: what occupies your time, as aggregates Claude can chart

  • Semantic search: heading-level chunks, pgvector + full-text, merged by rank, with frontmatter filters

  • /brain skill and MCP prompts for the session routine, weekly review and retrospectives (see always-on.md)

  • Persistent OAuth client storage (survives restarts)

  • Optional field-level encryption for contact details

Development

uv sync
uvx pre-commit install
uv run ruff check . && uv run pyright && uv run pytest -q

Inspired by Vasallo94/obsidian-mcp-server, sweir1/obsidian-brain, neverprepared/mcp-obsidian-second-brain and hess0ul/second-brain.

MIT

Available Tools

17 tools
archiveArchiveA
Idempotent

Move a note to Archive/ (there is no hard delete; history is kept).

Inputs: name (required). Returns: object

captureCaptureB

Drop a quick note in the Inbox to be filed later.

Inputs: text (required), title. Returns: object

connectConnectA

Record how two people are connected. Writes both sides (inverse relation on B).

Inputs: a (required), b (required), rel (required). Returns: object

contextContextA
Read-only

Start-of-session context: the vault rules (CLAUDE.md), Home, and notes relevant to a topic.

Inputs: topic. Returns: object

dailyDailyB

Append an entry to today's Daily note.

Inputs: entry (required), section. Returns: object

follow_ups_dueFollow Ups DueC
Read-only

People whose follow-up date is overdue or within N days.

Inputs: within_days. Returns: result

healthHealthB
Read-only

Vault health: missing frontmatter, broken links, orphans, unfiled inbox, stale projects.

Inputs: no named parameters. Returns: object

log_interactionLog InteractionB

Log a conversation: Meeting note, a line in each attendee's Log, last_contact, and the Daily note.

Inputs: summary (required), attendees (required), date, orgs, +7 more. Returns: object

patchPatchA

Edit an existing note: append (optionally under a section), replace exact text, or set frontmatter.

Inputs: name (required), find, append, replace, +2 more. Returns: object

people_graphPeople GraphC
Read-only

The people graph (nodes and connection edges), optionally filtered by org or context.

Inputs: org, context. Returns: object

personPersonB
Read-only

Everything about a person: profile, org, connections, recent log, meetings, mentions.

Inputs: name (required). Returns: object

readReadB
Read-only

Read one or more notes (frontmatter + body).

Inputs: names (required). Returns: result

upsert_personUpsert PersonA

Create or update a person. Matches existing names and aliases to avoid duplicates. Only store email/phone when the user explicitly gives them to be stored.

Inputs: name (required), met, org, role, +8 more. Returns: object

who_knowsWho KnowsC
Read-only

Who do I know at an organization, and/or how am I connected to someone.

Inputs: org, target. Returns: object

writeWriteA

Create a new note. Fails if a note with that name already exists (use patch instead).

Inputs: body (required), name (required), folder (required), tags, +3 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools target clearly distinct actions (capture/write/patch/read/search/archive for notes, connect/log_interaction/who_knows/upsert_person for people). A few overlap: 'person' (everything about a person), 'people_graph', and 'who_knows' all touch the people graph and could be confused, and 'capture' vs 'write' are close. Descriptions mostly disambiguate these boundaries.

    Naming Consistency4/5

    All names are consistently lowercase snake_case, so there is no casing chaos. However the forms are mixed: some are verbs (archive, search, read, capture, patch, connect), some are nouns (context, health, person, people_graph), and some are verb_noun (upsert_person, log_interaction, follow_ups_due), so the pattern isn't fully predictable.

    Tool Count4/5

    17 tools is on the heavier end but justified by a broad domain spanning note CRUD, a people/relationship CRM, daily logs, and vault maintenance. Each tool maps to a distinct workflow, so few feel redundant, though it sits right at the boundary of 'heavy'.

    Completeness4/5

    Lifecycle coverage is strong: notes have capture/write/read/patch/search/archive/link, people have upsert/person/connect/who_knows/log_interaction/follow_ups_due, plus health and context helpers; delete is intentionally omitted. Minor gaps exist (no rename/move of notes, no unlink or inbox-filing operation), but agents can work around them via patch.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects Claude Desktop to Obsidian vaults to enable reading, writing, searching, and intelligent organization of markdown notes. It features pre-configured structures for personal and family data management through natural conversation.
      2
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables users to create, link, tag, search, explore, and synthesize atomic notes through Claude and other MCP-compatible clients. Notes are stored as readable Markdown files with a SQLite index, supporting semantic link types and graph-based discovery of connected ideas.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables creating, linking, searching, and synthesizing atomic notes stored as human-readable Markdown files with a rebuildable SQLite index, forming a navigable knowledge graph through typed semantic relationships, tags, and distinct note types. It lets Claude and other MCP-compatible clients capture fleeting ideas, explore linked notes across domains, and surface central, similar, or orphaned notes for further synthesis.
      -