Second Brain

An MCP server that converts Claude Code sessions into structured Markdown notes with session capture, search, and weekly reporting.
  • typescript

0

GitHub Stars

typescript

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You run an MCP server that turns your Claude Code sessions into structured, searchable Markdown notes. It automatically captures commands, file changes, summaries, and code snippets, then organizes everything by project so you can quickly review what you built and why.

How to use

You interact with the MCP server through your Claude Code conversations. Once configured, you can create and manage session notes using three focused tools: capture_session_note, search_notes, and generate_weekly_report. The notes are saved in a centralized folder and organized by project, making it easy to review progress, track changes, and discover patterns across sessions.

Basic workflow examples you can try in Claude Code:

```text
Please capture this session with the summary:
"Implemented user authentication with JWT tokens"
Please capture this session note:

Summary: "Implemented user authentication system with JWT tokens and refresh token rotation"

Project: "my-web-app"

Topic: "authentication"

Commands executed:
- npm install jsonwebtoken bcrypt
- npm run test

File changes:
- Created: src/auth/jwt.ts - JWT token generation and validation
- Modified: src/server.ts - Added authentication middleware
- Created: src/auth/routes.ts - Login and registration endpoints

Code snippets:
- The JWT validation middleware (from src/auth/middleware.ts)
- The token generation function (from src/auth/jwt.ts)

Tags: authentication, security, jwt, backend

Working directory: /home/user/projects/my-web-app
Search for notes about "authentication"
Generate a weekly report of my coding sessions

How to install

Prerequisites you need before starting: Node.js and pnpm for building and running the MCP server.

  1. Clone or download the MCP server source
  2. Install dependencies
  3. Build the TypeScript code
git clone https://github.com/VoCoufi/second-brain-mcp.git
cd second-brain-mcp
pnpm install
pnpm run build

Configuration and startup details

Create an MCP configuration entry to run the server locally. The following stdio setup starts the server with Node and points to the compiled build index.

{
  "mcpServers": {
    "second_brain_mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/second_brain_mcp/build/index.js"],
      "env": {
        "SECOND_BRAIN_NOTES_DIR": "/home/username/Documents/my-notes"
      }
    }
  }
}

Notes directory configuration

Notes are saved by default to your home directory under notes, but you can customize this with an environment variable or per-tool parameter.

export SECOND_BRAIN_NOTES_DIR=~/Documents/my-notes

Or in the MCP server config:

{
  "mcpServers": {
    "second_brain_mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/second_brain_mcp/build/index.js"],
      "env": {
        "SECOND_BRAIN_NOTES_DIR": "/home/username/Documents/my-notes"
      }
    }
  }
}

Troubleshooting and tips

If you need to override the default notes directory temporarily, you can pass notesDirectory in a tool call to the MCP client. For example, you can set a temporary path for a single session to keep notes isolated.

Make sure the runtime path to the built index.js is correct in your environment. The build output must be accessible at the path you provide in the args.

Development and testing considerations

The server is designed to run locally without external API keys. It uses JSON metadata files for fast queries and offers flexible configuration so you can store notes wherever you prefer.

Available tools

capture_session_note

Capture and save a detailed session note with analysis, organized into project folders and enriched with metadata.

search_notes

Search notes with advanced filters and similarity-based discovery across sessions.

generate_weekly_report

Create a comprehensive weekly summary of sessions, including pattern and complexity distributions.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational