/ 目錄 / 演練場 / Kreuzberg
● 社群 kreuzberg-dev ⚡ 即開即用

Kreuzberg

作者 kreuzberg-dev · kreuzberg-dev/kreuzberg

透過Rust核心MCP ,從PDF、Office文件、影像和超過97種其他格式擷取乾淨的文字、表格和中繼資料。

Kreuzberg是一個多語言的文件情報框架。MCP伺服器包裝核心Rust管線: Claude呼叫它從任何文件格式中提取結構化內容,而無需外殼到Unstructured/Tika/pdfplumber。在一次呼叫中處理掃描PDF、表格偵測和中繼資料的OCR。

為什麼要用

核心特性

即時演示

實際使用效果

kreuzberg.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "kreuzberg": {
      "command": "uvx",
      "args": [
        "kreuzberg-mcp"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "kreuzberg": {
      "command": "uvx",
      "args": [
        "kreuzberg-mcp"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "kreuzberg": {
      "command": "uvx",
      "args": [
        "kreuzberg-mcp"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "kreuzberg": {
      "command": "uvx",
      "args": [
        "kreuzberg-mcp"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "kreuzberg",
      "command": "uvx",
      "args": [
        "kreuzberg-mcp"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "kreuzberg": {
      "command": {
        "path": "uvx",
        "args": [
          "kreuzberg-mcp"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add kreuzberg -- uvx kreuzberg-mcp

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: Kreuzberg

從凌亂的PDF中提取表格到乾淨的扣分項目

👤 處理報告PDF的分析師 ⏱ ~10 min beginner

何時使用: 您有一個PDF ,其中包含pdftotext修飾的表格,您不想重新輸入它們。

前置條件
  • 已安裝MCPuvx kreuzberg-mcp —或通過claude mcp add添加
步驟
  1. 提取,抽取,取出
    使用kreuzberg提取/docs/2025-annual-report.pdf。將表格分別作為扣分項目和正文文字提供給我。✓ 已複製
    → 使用保留的標題清理扣分表
  2. 驗證
    對於「按分部劃分的收入」表,請核對欄總計。標記任何OCR誤讀。✓ 已複製
    → 使用標記的儲存格進行算術檢查

結果: 您可以將Markdown表格貼到文件中,而無需重新處理。

注意事項
  • 掃描PDF — OCR錯誤6比8 — 使用OCR置信度輸出並手動重新掃描低置信度儲存格
搭配使用: filesystem

匯入混合格式文件的資料夾,以進行下遊索引

👤 建造抹布管道的工程師 ⏱ ~30 min intermediate

何時使用: 客戶為您提供一個包含PDF、Word文件、PowerPoint的郵遞區號,您需要純文字才能嵌入。

前置條件
  • 檔案系統MCP範圍至資料夾 — 以攝取目錄為根目錄啟動fs MCP
步驟
  1. 租借庫存管理
    列出/ingest/下的所有文件。對於每個項目,請致電kreuzberg.detect_format並回報。✓ 已複製
    → 每個檔案的格式表格
  2. 散裝萃取物
    針對每個檔案,擷取文字+中繼資料。在原始文件旁邊寫入已清除的.txt ,並寫入包含中繼資料的manifest.json。✓ 已複製
    → 已處理的所有檔案;資訊清單包含每個項目
  3. 品質檢查
    List every file where extraction returned <100 chars — those are likely scanned or corrupt. Re-run with OCR forced.✓ 已複製
    → Low-content files identified and retried

結果: 準備嵌入的已清除文本文件的文件夾,包含中繼數據清單。

注意事項
  • Encrypted PDF — Kreuzberg returns an error — decrypt with qpdf or ask for the unlocked copy
搭配使用: filesystem · memory

組合

與其他 MCP 搭配,撬動十倍槓桿

kreuzberg + filesystem

Walk a folder and extract every doc in place

For each PDF under /docs, extract text and save as .md next to it.✓ 已複製
kreuzberg + memory

Ingest extracted content into a knowledge graph

Extract /contracts/*.pdf and store key terms in memory for cross-doc querying.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
extract_text path: str, ocr?: bool Primary extraction call free
extract_metadata path: str Just want metadata without body text free
extract_tables path: str Table-focused extraction free
detect_format path: str Confirm format before extraction free

成本與限制

運行它的成本

API 配額
Unlimited — local
每次呼叫 Token 數
Proportional to doc size; a 20-page PDF ≈ 8k tokens of output
費用
Free (open source)
提示
Use extract_metadata first on large files to avoid processing irrelevant ones

安全

權限、密鑰、影響範圍

憑證儲存: None for local mode
資料出站: None — all processing is local

故障排查

常見錯誤與修復

ModuleNotFoundError: tesseract

Install Tesseract system binary: brew install tesseract / apt install tesseract-ocr

驗證: `tesseract --version`
Empty output on PDF

Likely image-only PDF — re-run with ocr=true

驗證: Check output.metadata.has_text_layer
XLSX tables come out jumbled

Pass sheet name explicitly: tool supports sheet arg

替代方案

Kreuzberg 對比其他方案

替代方案何時用它替代權衡
markdownify-mcpYou want a lighter, Node-based converter without OCRFewer formats, no table preservation
Unstructured.ioYou need enterprise PDF parsing and accept the cloud costPaid; cloud-hosted

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills