Skip to main content
Glama

little-librarian

.epubファイルをインデックス化し、pplx-embed-context-v1(レイトチャンキング)とQdrantをバックエンドとしたセマンティック検索ツールを提供するローカルMCPサーバー。

MCP client (Claude Desktop, Claude Code, …)
     │
     ▼  tool calls via MCP
 server.py
  pplx-embed-context-v1-0.6b  +  Qdrant (local)

ファイル

ファイル

役割

server.py

MCPサーバー — epubの取り込み、埋め込み、検索、Qdrantストレージ

code_librarian.py

コード用の独立したMCPサーバー(ASTベースのチャンキング)


Related MCP server: ragi

なぜ pplx-embed-context-v1 なのか

レイトチャンキングを使用しています。章内のすべてのチャンクが単一のフォワードパスを通過するため、各チャンクの埋め込みは推論時にドキュメントプレフィックスを必要とせず、ドキュメント全体のコンテキストを保持します。ConTEBで81.96 nDCG@10を記録しています。


クイックスタート

# 1. install
pip install -e .

# 2. ingest your library (runs embedding, then exits)
HF_HUB_OFFLINE=0 python server.py --index ./library

# 3. start the MCP server
python server.py

# optional: preload the model at startup
python server.py --preload

MCPツール

ツール

説明

search(query, top_k)

セマンティック検索。スコア付きのトップk個のパッセージを返します

search_groups(query, group_by, limit, group_size)

"book"または"chapter"でグループ化して検索 — ボリュームをまたいだ調査に最適

get_passage(book, chapter, max_chars)

書籍/章の全文を取得

list_books()

インデックス化されたすべての書籍と章の数を一覧表示

collection_stats()

Qdrantコレクション情報(ポイント数、ベクトルサイズ)

library_stats()

コンテンツの完全な内訳:書籍、章、書籍ごとのチャンク数、平均チャンク長

get_device()

埋め込みに使用されているデバイス(CPU/GPU)を表示


Claude Desktopの設定

{
  "mcpServers": {
    "little-librarian": {
      "command": "python",
      "args": ["/path/to/server.py"]
    }
  }
}

ハードウェアガイダンス

セットアップ

最小VRAM

CPUのみ

0 GB

GPU (pplx-embed-0.6b)

~2 GB

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Local MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Local-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.
    3
    13 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server for local RAG over personal notes, PDFs, and documents, enabling plain-English querying and hybrid search with multi-hop context expansion.
    MIT