Second Brain
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Second Brainsearch my notes about machine learning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ Second Brain
A personal AI-powered knowledge base. Ingest your PDFs, notes, bookmarks, code files, and YouTube videos β then chat with them using Claude.
What it does
Ingest any document: PDFs, Markdown, DOCX, code files, web URLs, YouTube transcripts, Notion pages
Search using hybrid retrieval β semantic vector search + keyword search, merged with a real ML re-ranker
Chat with your documents through a web UI, answers come with source citations
Expose your knowledge base as an MCP tool so Claude Desktop can search it mid-conversation
Related MCP server: Knowledge Base MCP Server
Quick start
1. Clone and install
git clone https://github.com/MBA009/RAG-MCP-system.git
cd RAG-MCP-system
pip install -r requirements.txt2. Set up environment variables
Create a .env file in the project root:
ANTHROPIC_API_KEY=sk-ant-api03-...
EMBEDDING_BACKEND=localEMBEDDING_BACKEND=local uses a free offline model (recommended to start).
If you have an OpenAI key and want higher quality embeddings:
EMBEDDING_BACKEND=openai
OPENAI_API_KEY=sk-...Optional:
NOTION_TOKEN=secret_...3. Ingest your documents
# Single file
python cli.py ingest ~/Documents/notes.pdf
# Entire folder (recursive)
python cli.py ingest ~/Documents/notes/
# Web page
python cli.py ingest-url https://en.wikipedia.org/wiki/Retrieval-augmented_generation
# YouTube video (fetches transcript automatically, no API key needed)
python cli.py ingest-youtube https://www.youtube.com/watch?v=VIDEO_ID
# All Notion pages (requires NOTION_TOKEN in .env)
python cli.py ingest-notion4. Start the web UI
python cli.py webOpen http://localhost:8000 in your browser.
Web UI features
Chat with your documents β answers include clickable source citations
Add sources from the sidebar: URL, YouTube, file upload, or Notion sync
Hover over any source and click β to remove it
Header shows total docs and chunks indexed
All CLI commands
Command | What it does |
| Ingest a file or directory |
| Ingest a web page |
| Ingest a YouTube transcript |
| Sync all Notion pages |
| List all ingested sources |
| Delete a source by its hash |
| Show total sources and chunks |
| Watch inbox folder and auto-ingest new files |
| Terminal chat interface |
| Start the web UI |
| Start the MCP server for Claude Desktop |
Claude Desktop integration (MCP)
Add to your Claude Desktop config:
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"second-brain": {
"command": "python",
"args": ["cli.py", "serve"],
"cwd": "C:\\path\\to\\second-brain"
}
}
}Restart Claude Desktop. Claude can now call search_brain, add_document, list_sources, and delete_source as tools mid-conversation.
Key configuration (config.py)
Setting | Default | Description |
|
|
|
|
| Tokens per chunk |
|
| Results returned per query |
|
| Claude model used for chat |
Supported file types
PDF, DOCX, Markdown, plain text, Python, JavaScript, TypeScript, Go, Rust, C, C++, Java, HTML, web URLs, YouTube, Notion, Obsidian vaults
Tech stack
Tool | Role |
Local vector database | |
Full-text keyword search | |
Embeddings + cross-encoder re-ranking | |
Web API | |
Language model | |
Claude Desktop tool integration |
This server cannot be deployed
Maintenance
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local-first MCP server that enables semantic search over PDF and DOCX documents using structure-aware parsing and vector storage. It allows users to query their local knowledge base through Claude Code without cloud dependencies or GPU requirements.-
- AlicenseNot gradedqualityDmaintenanceA zero-dependency MCP server that provides a persistent personal knowledge base for Claude using local JSON file storage. It enables users to manage notes through tools for adding, searching, and indexing content built entirely with Node.js built-ins.7 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA personal memory MCP server for Claude Code that stores and retrieves memories via natural language, supporting text, images, files, and secrets with vector search.-
- AlicenseNot gradedqualityBmaintenanceA local document search MCP server that indexes personal files and enables hybrid search (BM25 + semantic) for Claude to find and cite internal materials.MIT