REMOTE MCP SERVER

Enterprise Knowledge MCP Server

企業文件知識庫系統:匯入 DOCX / PDF / PPTX,以 Docling 解析、清洗、沿語意邊界切塊, 建立 BGE-M3 + BM25 混合檢索索引,並透過 Model Context Protocol 對 Claude Desktop 等 AI Agent 提供查詢能力。

v0.1.0 · FastAPI + FastMCP · 4 tools · 2 resources

快速入口

連線 MCP Server

將 MCP 客戶端(Claude Desktop / Claude Code)指向以下端點即可使用。 此為 streamable HTTP 端點,無法直接用瀏覽器開啟。

/mcp/

注意:端點結尾必須含斜線 /mcp/;連 /mcp(無斜線)會因 redirect 導致連線失敗。

MCP Tools (4 個)

search_documents

以混合檢索(Dense + BM25,RRF 融合)搜尋最相關的 chunk,回傳內容、中繼資料與分數。

querystringtop_k?integer
list_documents

列出目前已索引的所有文件目錄。

無參數
get_document

回傳文件層級中繼資料(chunk 數、頁碼/投影片範圍)。

document_idstring
get_chunk

依 id 回傳單一 chunk 的完整內容與中繼資料。

chunk_idstring

MCP Resources (2 個)

  • documents://all所有已索引文件的完整目錄。
  • documents://{document_id}單一文件及其所有 chunk。

範例查詢

處理流程

DOCX / PDF / PPTX
   -> Docling Parser (+ RapidOCR 圖片文字)
   -> Cleaning Pipeline (去重複頁首頁尾 / 頁碼 / 純符號雜訊,保留結構)
   -> Metadata-aware Chunking (沿標題 / 頁 / 投影片 / 表格 / 圖片邊界切,禁固定字數)
   -> Hybrid Index (BGE-M3 dense + BM25 sparse, RRF 融合, Chroma)
   -> Remote MCP Server (FastMCP)
   -> Claude Desktop / Claude Code / AI Agent

技術選型

LanguagePython 3.11
Web APIFastAPI (async / ASGI)
ParsingDocling (+ RapidOCR)
Dense RetrievalBGE-M3 (1024-dim, L2)
Sparse RetrievalBM25 (rank-bm25)
FusionReciprocal Rank Fusion (k=60)
Vector DBChroma (embedded, persistent)
MCP FrameworkFastMCP
DeployDocker → Zeabur (Arm Ampere A1, CPU-only)