secondbrain-mcp

secondbrain-mcp

Enables AI agents to list, search, read, and append to Markdown notes through MCP tool calls, making it easy to interact with a second brain folder.

Category
Visit Server

README

secondbrain-mcp

A tiny Model Context Protocol server that exposes a folder of Markdown notes to an AI agent. Instead of pasting files into the prompt, the model can list, search, read, and append to your notes through real tool calls.

I built this because most "second brain" setups (Obsidian, a Drive folder of Markdown, Notion exports) are just files on disk. The useful question is how an agent reads and writes them reliably without you babysitting the context window. MCP is the clean answer: the notes become a typed tool surface the model can call.

What MCP is, in one line

MCP is an open protocol that lets an LLM client (Claude Desktop, Claude Code, ...) discover and call external tools and data over a simple JSON-RPC channel — wire a capability in once, and any MCP-aware client can use it.

Tools

Tool What it does
list_notes Every note with its title and size
search_notes(query) Full-text search; returns the lines that match
read_note(name) Full text of one note
append_note(name, text) Append-only write — never silently rewrites

Run it

pip install -r requirements.txt
python server.py          # serves over stdio

Notes live in ./notes. Point it elsewhere with SECONDBRAIN_DIR=/path/to/vault.

Connect it to Claude

Drop this into Claude Desktop's claude_desktop_config.json or a project .mcp.json for Claude Code:

{
  "mcpServers": {
    "secondbrain": {
      "command": "python",
      "args": ["/abs/path/to/server.py"],
      "env": { "SECONDBRAIN_DIR": "/abs/path/to/your/vault" }
    }
  }
}

Then ask "search my notes for the deployment runbook" and the model calls search_notes instead of guessing.

How it fits together

flowchart LR
    A["Claude Desktop / Claude Code"] -- "MCP · JSON-RPC over stdio" --> B["secondbrain server"]
    B --> C[("notes/*.md")]
    B -. "list · search · read · append" .-> A

Design notes

  • Append-only writes. append_note adds; it never overwrites. An agent can capture a thought without ever silently destroying a note.
  • Plain Markdown is the source of truth. No database, no lock-in — the same folder works in Obsidian or a Git repo.
  • stdio transport, so it drops into any local MCP client with zero network setup.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured