An MCP server for your Obsidian vault and your Git repos.
Obsidian Vault と Git repo を、ひとつの MCP に繋ぐ。
The answer you're searching for —
you already wrote it,
years ago.
探している答えは、
何年か前のあなたが、
もう書いている。
Bobrain indexes your Obsidian vault and your Git repos together, locally. Hybrid BM25 + e5 retrieval, Japanese tokenizer in the default install, MCP-native for Claude / Cursor / Claude Desktop.
Bobrain は Vault と Git repo をひとつのインデックスに統合します。 ハイブリッド BM25 + e5、日本語トークナイザ初期同梱、 Claude / Cursor / Claude Desktop に MCP で接続、すべてローカル。
MIT licensed · Apple Silicon tested · Python 3.12+
MIT ライセンス · Apple Silicon 動作確認済 · Python 3.12+
↑ One query. Two sources. The same CLI also speaks MCP to Claude Desktop and Cursor.
↑ 1 つの質問、2 つのソース。同じ CLI が MCP で Claude Desktop / Cursor からも呼べます。
If any of this is familiar…
こんな経験、ありませんか?
You probably tried RAG before.
たぶん、RAG は一度試したはず。
- You set up something with the OpenAI API, then realized your notes were now sitting in someone else's logs.
- You found a great repo, but the README assumed English-only text and your Japanese notes scored badly.
- You wanted Claude to see both your vault and your code, but each tool only indexed one folder.
- OpenAI に投げる構成にしたら、自分のノートが 他社のログに残ることに気づいて止めた。
- よさそうな repo を見つけたが、英語前提で 日本語ノートがまったくヒットしなかった。
- Claude に Vault と code の両方を見せたかったのに、ツールは片方しか index してくれなかった。
Bobrain is the answer when you've already lived all three.
3 つ全部に心当たりがある人のための Bobrain です。
Four things, done well
4 つだけ、丁寧に
What Bobrain actually does.
Bobrain ができること、できないこと。
Local-first by design
設計からローカル
Your notes never leave your machine. Vector store on disk, embeddings on CPU. No telemetry. No API key.
ノートは手元から出ません。ベクトルストアもローカル、embedding も CPU。テレメトリなし、API キーなし。
lancedb + fastembedHybrid retrieval, RRF-fused
ハイブリッド検索、RRF で融合
BM25 catches exact terms. multilingual-e5-large catches semantics. Reciprocal Rank Fusion combines both for any query.
BM25 が完全一致、e5 embedding が意味検索を担当。Reciprocal Rank Fusion で両者を統合します。
rank-bm25 + intfloat/multilingual-e5-largeJapanese, out of the box
日本語、最初から動く
MeCab tokenizer ships with the default install via fugashi[unidic-lite]. No extra config for Japanese content. English and code work the same way.
fugashi[unidic-lite] 経由で MeCab を標準同梱。日本語ノートでも追加設定なし。英語・コードも同じ精度で扱えます。
fugashi[unidic-lite] · MeCab morphological tokenizerMulti-namespace, MCP-native
マルチ namespace、MCP 標準
Index your vault and a Git repo as separate namespaces. Query across them in one MCP call from Claude Desktop, Cursor, or Claude Code.
Obsidian Vault と Git repo を別 namespace で index。Claude Desktop / Cursor / Claude Code から、一度の MCP 呼び出しで横断検索できます。
mcp (FastMCP) · stdio transport · watchdog for live syncThree commands
コマンドは 3 つ
Get it running in under five minutes.
5 分で動かしてみる。
Install
インストール
First-run downloads ~2.2 GB of the e5-large weights into ~/.cache. One time only.
初回実行時に e5-large の重み(約 2.2 GB)が ~/.cache にダウンロードされます。1 回だけ。
pipx install bobrain
# or, with uv:
uv tool install bobrain
Index your sources
ソースを index
Each --namespace is a logical bucket you can query individually or together.
--namespace は論理的な束ねで、個別にも横断にもクエリできます。
bobrain index --namespace notes ~/Documents/Obsidian\ Vault bobrain index --namespace code ~/repos/myapp bobrain watch # live sync, ~500ms after save
Wire it into your editor
エディタに繋ぐ
Add Bobrain to claude_desktop_config.json or .cursor/mcp.json:
claude_desktop_config.json か .cursor/mcp.json に追加:
{
"mcpServers": {
"bobrain": {
"command": "bobrain",
"args": ["serve"]
}
}
}
Honest numbers
正直な数字
What it does on a real machine.
手元のマシンで、実際どうか。
Measured by the author on Apple Silicon, against the author's own Obsidian vault and Git repos. No synthetic corpora.
作者本人の Vault と repo を、Apple Silicon の手元マシンで計測しました。 合成コーパスではありません。
| Metric | 指標 | Value | 実測値 |
|---|---|---|---|
| Indexed corpus (real-world) | Index 実績 | 1,042 chunks · 4 namespaces | |
| Embedding speed (CPU, M-series) | Embedding 速度(CPU) | 1.4 – 2.4 sec / chunk | |
| Query latency (hybrid, top-5) | 検索レイテンシ(hybrid, top-5) | a few hundred ms | |
| Incremental sync after save | 保存からの増分反映 | ~500 ms | |
| Quality (5 manual queries, 1–5★) | 検索品質(5 クエリ手評価) | ★★★★★×2 · ★★★★×1 · ★★★×1 · ★★×1 |
The ★★ case was a query about a topic Bobrain hadn't been indexed on. The retrieval ran fine; there was no relevant document to find. The full evaluation log lives in the repo's status section.
★★ のケースは、Bobrain にそもそも該当ネタが index されていない クエリでした。検索は正常動作、ヒットすべきドキュメントがなかっただけです。 評価の詳細は repo の status セクションに残してあります。
Why local-first, in 2026
2026 年に、なぜローカルなのか
Privacy as a property of the code path.
「ローカル」は性質ではなく、構造の話。
Cloud RAG is fine when your data is generic. It stops being fine the moment your notes contain client names, half-formed ideas, or that one Slack thread you screenshotted.
A local index doesn't make Bobrain "private by accident." It makes the privacy property hold by construction. The data never crosses your machine boundary because there is no code path for it to cross.
That's the only useful definition of "local-first" we know.
クラウド RAG は、データが汎用的なうちは何の問題もありません。ノートに顧客名や、まだ言葉になっていない思考、撮影してある Slack のスクショが混ざった瞬間、話は変わります。
ローカル実装は「結果として安全」ではなく、構造として安全です。マシンの境界を越えるコードパスが存在しないから、データはそもそも外に出ようがない。
これが私たちの考える「ローカルファースト」の唯一有効な定義です。
FAQ
よくある質問
Things people ask before starring.
Star する前に気になりがちなこと。
How does this compare to Knowledge-RAG / Cognee / Claude Context? Knowledge-RAG / Cognee / Claude Context との違いは?
Will it work without Apple Silicon? Apple Silicon じゃないと動かない?
Does it support languages other than Japanese and English? 日本語・英語以外の言語は?
multilingual-e5-large, so dense retrieval works for any language e5 covers. BM25 tokenization currently optimizes for ja/en — others fall back to whitespace.
multilingual-e5-large なので、e5 がカバーする言語なら dense 検索は機能します。BM25 トークナイズは日英最適化、その他は空白区切りにフォールバックします。