A local-first multi-source RAG MCP server — search across Obsidian vaults, Git repos, and PDFs from Claude / Cursor / Claude Desktop.
Project description
Bobrain
Bob, your pocket second brain.
A local-first multi-source RAG MCP server — search across multiple Obsidian vaults and the Markdown docs in your code repositories from Claude, Cursor, Claude Desktop, and any other MCP-compatible client.
Status: early prototype. Markdown-only today; PDF and code-AST chunking are on the roadmap. APIs and storage layout may change.
Landing page: https://0916shokichi-blip.github.io/bobrain/ — also browsable locally via
python3 -m http.serverfrom the repo root →http://localhost:8000/docs/.
What it is
Bobrain indexes multiple local directories into a single hybrid search layer (BM25 + dense embeddings, combined via Reciprocal Rank Fusion) and exposes a search_docs MCP tool so your AI client can retrieve relevant chunks across all of your personal knowledge sources at once.
Unlike existing RAG servers that focus on a single directory tree or require cloud embeddings, Bobrain:
- runs fully local with in-process ONNX embeddings (
multilingual-e5-large) - supports multiple independent root directories with namespace isolation
- ships Japanese-aware BM25 out of the box (MeCab via
fugashi + unidic-lite) - is designed for people whose knowledge lives in more than one place — an Obsidian vault and the README/docs folder of every active repo
Killer use case
Ask your AI:
"Where did I write about MCP chunking strategies — either in my notes or the code?"
and get a single ranked list spanning your Obsidian vault and your ~/code/ directory, cited by file path.
Install
Requires Python 3.12+.
# Recommended: install once, run from anywhere
pipx install git+https://github.com/0916shokichi-blip/bobrain
# (after PyPI release: pipx install bobrain)
# Or run a one-shot without installing (uv 0.5+)
uvx --from git+https://github.com/0916shokichi-blip/bobrain bobrain --help
# (after PyPI release: uvx bobrain --help)
Or clone and develop locally:
git clone https://github.com/0916shokichi-blip/bobrain.git
cd bobrain
uv sync
First indexing run downloads the
multilingual-e5-largeONNX weights (~2.2 GB) into the fastembed cache. Subsequent runs reuse it.
Quickstart
# index a directory under a namespace
bobrain index ~/Documents/notes -n notes
# index a second namespace (they live side by side)
bobrain index ~/code/my-project -n code
# quick CLI search (BM25 + vector hybrid)
bobrain search "how did I chunk markdown" -k 5
# cross-namespace filter
bobrain search "mcp server" --ns notes --ns code
# keep the index live while you edit (Ctrl+C to stop)
bobrain watch ~/Documents/notes -n notes
(If you cloned the repo instead of installing, prefix every command with uv run.)
MCP client setup
Point your MCP client at the stdio server. If you installed via pipx:
{
"mcpServers": {
"bobrain": {
"command": "bobrain",
"args": ["serve"]
}
}
}
The bobrain command on PATH works the same way whether you installed from PyPI or from the git URL above.
Or, from a local clone:
{
"mcpServers": {
"bobrain": {
"command": "uv",
"args": ["run", "bobrain", "serve"],
"cwd": "/absolute/path/to/bobrain"
}
}
}
Then from Claude / Cursor / Claude Desktop you can call the search_docs tool directly.
Roadmap
- Japanese-aware BM25 via MeCab (fugashi + unidic-lite)
- Upgrade embeddings to
multilingual-e5-large(query/passage prefix aware) - Incremental indexing with
watchdog(bobrain watch) - Indexing progress + per-phase wall times (
scan / embed / db-write / bm25) - PDF chunker via
pymupdf(dependency already in) - Markdown heading-aware chunker (today: fixed character window)
- Code AST-aware chunker (tree-sitter)
- LLM Wiki auto-detection (directories containing
CLAUDE.md + log.md + index.md) - Reranker integration (Voyage / Cohere)
- Pro tier with cloud sync and team sharing
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bobrain-0.1.0.tar.gz.
File metadata
- Download URL: bobrain-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d72c99e0273a25052e4fc91a990e024751b8ffacbca1309dfc93b8577d382e8d
|
|
| MD5 |
2c1c47cf32fbcd3ec376fc1f389ca116
|
|
| BLAKE2b-256 |
c80b6307ae6551c3050f346e9b58a9e841d4f3a4690b53858f6bd70d00724442
|
File details
Details for the file bobrain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bobrain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b469bb2064ef0a4f2c16418cecc23b5a2454484cf487bd675a1d89622666e8cf
|
|
| MD5 |
6b8a9d97b84d3aeee8fc9a16856d7dc1
|
|
| BLAKE2b-256 |
405cee4599ab49fc4a774b2d7495d72d8f9432c23091363be097c861a9114c3d
|