Skip to main content
Glama

glowfic-rag

glowfic.com コンテンツに対するセマンティック検索。Claude CodeおよびCursor向けのMCPサーバーとして公開されています。

ChromaDBに保存された GTE-Large 埋め込みを使用します。事前構築されたインデックスは、以下の約65万8000件の投稿をカバーしています。

  • planecrash (ボード 215) — 1万9000件の投稿、28スレッド

  • Sandboxes (ボード 3) — 63万9000件の投稿、2,214スレッド

  • trainwreck (ボード 277) — 595件の投稿、7スレッド

ボード構造の取得 (src/render.py, src/auth.py) は、Roger Curley 氏および Alyssa Riceman 氏による rocurley/glowfic-dl から派生したものです。

クイックスタート

Python 3.10以上が必要です (mcpパッケージで必要となるため)。

git clone https://github.com/keenanpepper/glowfic-rag.git
cd glowfic-rag

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Download the pre-built vector database (~2GB compressed, ~5GB on disk)
./setup_data.sh

Related MCP server: MCP Codebase RAG Server

Claude Codeでの使用

リポジトリにはClaude Codeが自動検出する .mcp.json が含まれています。リポジトリディレクトリから以下を実行します。

claude

Claudeは search_glowfic および list_indexed_continuities ツールにアクセスできるようになります。

Cursorでの使用

クローンへの絶対パスを指定して .cursor/mcp.json を作成します。

{
  "mcpServers": {
    "glowfic-search": {
      "command": "/path/to/glowfic-rag/.venv/bin/python3",
      "args": ["-m", "rag.mcp_server"],
      "cwd": "/path/to/glowfic-rag"
    }
  }
}

その後、Cursorウィンドウをリロードしてください。

CLI検索

コマンドラインから検索することも可能です。

python -m rag.search "Keltham explains expected utility" -k 5
python -m rag.search "vampire meets werewolf" --continuity Sandboxes
python -m rag.search "dath ilan" --author Iarwain

コンティニュイティの追加

ボードをJSONL形式でスクレイピングし、インデックスに追加します。

# Scrape (supports --resume for interrupted runs)
python -m rag.scrape https://glowfic.com/boards/277

# Index (adds to existing collection, doesn't rebuild)
python -m rag.index data/trainwreck.jsonl

# Or reindex everything from scratch
python -m rag.index --reset

スクレイパーは大規模ボードのページネーションを処理し、スロットリングされたリクエストを自動的に再試行します。

パフォーマンスに関する注意点

  • 初回クエリ: 約10秒 (モデルの読み込み + インデックスのウォームアップ)

  • 2回目以降のクエリ: 1秒未満

  • メモリ: モデルとインデックスの読み込み時に約3〜5GB

  • ディスク: ChromaDBインデックス用に約5GB

Related MCP Connectors

Related MCP Servers