Skip to main content
Glama

BDC Doc RAG

bdc-assist のドキュメント RAG MCP

bdc_doc_mcp/config.py      env-driven embeddings/LLM/Chroma (replaces utils/__init__.set_emb_llm)
bdc_doc_mcp/ingest.py      .pkl/.md/.mdx/.txt/.pdf → embeddings → Chroma (replaces utils/chroma/utils.py)
bdc_doc_mcp/api.py         FastAPI: /health /search
bdc_doc_mcp/mcp_server.py  search_docs MCP tool for AI agents — self-contained, same search as the API
bdc_doc_mcp/preproc/       source-specific preprocessing pipeline
tests/                     self-checks + API / agent notebooks
data/                      preproc output (*.pkl), ingest input

セットアップ

uv sync
cp .env.example .env    # then fill in keys/URLs

ソースリポジトリ

前処理(--sources all)のときだけ必要です。API/MCP サーバーと既存の .pkl ファイルの取り込みは、これらがなくても動作します。このリポジトリの隣にクローンしてください(または環境変数でそれらの場所を指定してください):

git clone https://github.com/stagecc/interim-bdc-website ../interim-bdc-website   # BDC_WEBSITE_DIR
git clone https://github.com/stagecc/bdc-gitbook ../bdc-gitbook                   # BDC_GITBOOK_DIR

モデル

completion には、Azure 上の OpenAI API を使用します(デフォルトは gpt-4o-mini)。

embeddings には、Sterling 上の Ollama を使用します(RENCI VPN 経由で接続)。

kubectl -n ner port-forward svc/ollama 11434:11434

または、ローカル Ollama で groonga/bge-m3-Q4_K_M-GGUF モデルを使用します。

Related MCP server: okfy

取り込み

すべてのソースから完全に再ビルドする場合(ソースリポジトリ 2 つのクローンが必要です — セットアップを参照。data/*.pkl を書き込んでから読み込みます):

uv run python -m bdc_doc_mcp.preproc.pipeline --sources all --ingest --reset

個別のファイルまたはディレクトリ:

uv run python -m bdc_doc_mcp.ingest ./data/docs.pkl --doc-type docs   # BDC_Chatbot preproc .pkl
uv run python -m bdc_doc_mcp.ingest ../interim-bdc-website/src/pages --doc-type page --reset

コレクション内で embedding モデルを交換することはできません。bge-m3 は 1024 次元、text-embedding-3-small は 1536 次元です。モデルを切り替えるには --reset と完全な再取り込みが必要です。

API

uv run uvicorn bdc_doc_mcp.api:app --port 8000     # docs at /docs

エンドポイント

リクエストボディ

戻り値

GET /health

{status, documents}

POST /search

{query, k, mode?, doc_type?, date_from?, date_to?}

ランク付けされたチャンク + メタデータ + スコア

modeembedding(デフォルト。セマンティックな類似度で、スコアは距離のため小さいほど良い)または keyword(リテラルな単語のあいまい一致 — 大文字小文字と句読点を無視し、小さなタイポを許容します。picsure で "PIC-SURE" が見つかります。スコアは一致回数で、大きいほど良い — 正確な名前や頭字語の検索に使用します)。 doc_type は検索するタイプの CSV です(例: page,faq)。省略時は docspagefaqvideo のみが検索対像です。fellowupdateevent を検索するには明示的に指定してださい。 date_desc /date_toYYYY-MM-DD `両を含ん)

あら.

私は質問を省き、正じつまるるる...

Let me rewrite the tail properly.

date_from/date_toYYYY-MM-DD、両端を含む)は日付でフィルタリングします。日付を持つのは eventupdate のドキュメントだけなので、日付フィルターを指定すると暗にこれらのタイプに絞られます。

このサービスは設計上、検索専用です。取り込みは CLI でオフライン実行し(「取り込み」参照)、回答の生成は呼び出し側の仕事 — エージェントが自分の LLM を持ち込みます。

MCP

uv run python -m bdc_doc_mcp.mcp_server           # stdio
uv run python -m bdc_doc_mcp.mcp_server --http    # streamable HTTP, port MCP_PORT (default 8001)

search_docs という 1 つのツールを公開します。API と同じ検索ですが、Chroma に直接問い合わせるため、API サービスの起動は不要です。取り込み済みの .chroma_db と embeddings が必要です。

Stdio クライアント(Claude Desktop/Code、Cursor)はサーバー自身を起動するので、ここで登録してください:

{"mcpServers": {"bdc-doc-mcp": {
  "command": "uv",
  "args": ["--directory", "/path/to/bdc-doc-mcp", "run", "python", "-m", "bdc_doc_mcp.mcp_server"]
}}}

ネットワーククライアントの場合は、代わりに --http を指定して起動し、http://host:8001/mcp を指すようにします。

スモークテスト: uv run python tests/test_mcp.py

前処理

bdc_doc_mcp/preproc/ は移植された BDC_Chatbot パイプラインです:

モジュール

ソース

移植元(BDC_Chatbot)

備考

bdc_repo.py

interim-bdc-website MDX

utils/preproc/proc_BDC_repo.py(ほぼそのまま)

fellows、events、latest-updates、pages

bdc_docs.py

bdc-gitbook markdown

utils/preproc/proc_BDC_docs.py(module-level の LLM 初期化を除去)

見出しの階層でチャンク分割;リポジトリのクローンが必要

freshdesk.py

bdcatalyst.freshdesk.com

utils/preproc/proc_freshdesk.py

ライブスクレイピング

vids.py

Google Sheet + Drive SRT

utils/preproc/proc_BDC_vids.py(GoogleSheetsReader クラスを平坦化)

タイムスタンプ付き URL の動画文字起こし

utils.py

LLM チャンクの文脈化 + 要約

pipeline.py

オー ケスト レーター

--no-contextualize はチャンクごと の LLM 呼出をす キップします(大 幅速で す が、検 索は 弱 くな りま す)。ソース の パ スは BDC_WEBSITE_DIR / BDC_GITBOOK_DIR か ら取 得ま す。

テスト

uv run python tests/test_ingest.py                             # batching + chunk-id logic, no network
uv run python tests/test_keyword.py                            # keyword ranking, pure function, no DB or API
uv run python tests/test_mcp.py                                # starts the server over stdio and exercises its tools; needs .chroma_db + embeddings

各ノート ブック は 空き ポー ト で APİ を 起動 し、最 末 に 停 止 し ま す(ど ち ら も取 込 み ず み の .chroma_db が 必 要)。

  • tests/api_test.ipynb — 単純 な APİ の tub り: /heakth/searchdoc_type filter。ローカル の embeddings だ け必 要。

  • tests/агent_test.ynb — tool-callエー ジェ ント(deepагent):設定された LLM は search_docs を LangChain ツー ル と し て 得、い 呼 ぶ 也 判 断 す る。Completion プ ロ バ ダ に到 達 可 能 な こ と も 必 要。

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides semantic search over markdown documentation using RAG, allowing natural language queries and integration with MCP clients.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to search, read, and traverse documentation bundles in Open Knowledge Format via MCP tools.
    733
    66
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides RAG (Retrieval Augmented Generation) access to technical documentation through MCP, enabling LLMs to search and retrieve relevant documentation on-demand.
    4
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Crawl documentation sites, index them with hybrid search, and expose them as MCP tools so LLM agents can search and retrieve current docs.
    MIT

View all related MCP servers

Related MCP Connectors

  • Agentic search over your Dewey document collections from any MCP-compatible client.

  • Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.

  • Query any docs site via MCP. Submit a URL, ask questions, get cited answers.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bdc-assist/bdc-doc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server