
ClicheFactory Document Intelligence
io.github.ClicheFactory由 GitHub 帳號 ClicheFactory 發布v0.1.8更新於 Oct 25, 2026
Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.
概覽
一個本機 MCP 伺服器,讓助理從 PDF、圖片、Office 檔案與郵件附件擷取結構化 JSON,或轉換成 markdown。
- 可以做什麼
- 依 JSON schema 從文件中擷取結構化 JSON,支援多種擷取模式,包含訓練流程與兩階段驗證。將支援的文件轉換為 markdown 文字,方便檢視或分析。對設定、API 金鑰、相依套件與系統二進位檔執行診斷。支援的輸入包括 PDF、常見圖片格式、DOCX、DOC、ODT、XLSX、CSV、EML、TXT 與 MD。
- 適用情境
- 適合讓助理把發票號碼、總額等欄位從文件中擷取成 JSON,或先把文件讀成 markdown 再決定要擷取什麼。較適合一次處理一份文件的流程,而非批次作業。
- 執行需求
- 透過 uvx 或 pip 以 stdio 在本機執行;需要 Python 3.12 以上版本以及 uv 或 pip。服務模式需要 CLICHEFACTORY_API_KEY 中的 ClicheFactory API 金鑰,並能連線至 ClicheFactory 雲端服務。本機模式需要安裝 local 附加元件(約 2 GB 的解析與 OCR 相依套件)、tesseract 與 LibreOffice 等系統二進位檔,以及 LLM_API_KEY 和 LLM_MODEL_NAME;OCR_API_KEY 與 OCR_MODEL_NAME 為選用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ClicheFactory Document Intelligence,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
clichefactory-mcp
MCP (Model Context Protocol) server for ClicheFactory — structured data extraction from documents.
This server exposes ClicheFactory's extraction and document conversion capabilities as MCP tools, allowing AI assistants in Cursor, Claude Desktop, OpenClaw, and other MCP-compatible clients to extract structured data from PDFs, images, DOCX, XLSX, CSV, EML, and more.
Quick start (recommended — service mode)
Service mode uses the ClicheFactory cloud for the best extraction quality. You only need one API key.
-
Sign up at clichefactory.com — free pages included, no credit card required.
-
Create an API key in Settings → API Keys (format:
cliche-...). -
Install the MCP server:
-
Configure — either paste the key into your MCP client (see below) or run once in a terminal:
The interactive wizard saves credentials to
~/.clichefactory/config.toml, which the MCP server reads automatically.
That's it — one env var (CLICHEFACTORY_API_KEY) or a config file, and you're on hosted extraction.
Tools
extract
The main tool. Pass a document file and a JSON schema — get structured data back.
Supports all extraction modes:
The schema can be provided as:
- File path: absolute path to a
.jsonschema file - Inline dict: the LLM constructs a JSON schema from the conversation (e.g., the user says "extract the invoice number and total" and the LLM builds
{"type": "object", "properties": {"invoice_number": {"type": "string"}, "total": {"type": "number"}}})
to_markdown
Converts any supported document to markdown. Useful for inspecting document contents or feeding them to the LLM for analysis before deciding on an extraction schema.
doctor
Runs diagnostics on the ClicheFactory setup — config file, API keys, Python dependencies, system binaries. Call this when things aren't working.
Execution Modes
The server defaults to service mode (ClicheFactory cloud). Local mode is available for BYOK / air-gapped use.
-
service(recommended) — Uses the ClicheFactory cloud service. Requires a ClicheFactory API key. Supports all extraction modes including trained pipelines and robust verification. Best extraction quality out of the box. -
local(advanced) — Runs extraction on your machine. You bring your own LLM key (BYOK). Requirespip install "clichefactory-mcp[local]"(~2 GB of parsing/OCR dependencies) plus system binaries (tesseract, LibreOffice). Quality depends on your local setup.
Installation
Prerequisites
- Python ≥ 3.12
- uv (recommended) or pip
From PyPI
For local-mode extraction (BYOK, runs on your machine), install with the local extras:
Configuration
Environment Variables
Set these in your MCP client configuration (see below) or in ~/.clichefactory/config.toml via clichefactory configure.
Environment variables take precedence over the config file at ~/.clichefactory/config.toml.
Cursor
Add to .cursor/mcp.json in your project (or global Cursor settings):
For local development from a git checkout, replace uvx with:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
OpenClaw
Register the MCP server with your OpenClaw agent:
Verify with openclaw mcp list. The agent can now use extract, to_markdown, and doctor tools in any conversation.
An OpenClaw skill with agent instructions is also available in integrations/openclaw/. To install it into your workspace:
Or, once published to ClawHub:
Local mode (advanced)
If you prefer BYOK extraction on your machine, install the local extras and set LLM credentials:
Pass mode="local" explicitly in tool calls, or run clichefactory configure --local to set local as the default in ~/.clichefactory/config.toml.
Supported File Types
PDF, PNG, JPG, JPEG, WebP, GIF, BMP, DOCX, DOC, ODT, XLSX, CSV, EML, TXT, MD.
Differences from the CLI
This MCP server covers the core extraction and conversion workflows. The following CLI features are not included in v1:
Development
License
MIT — Copyright (c) 2026 Urban Susnik s.p.
來源:README.md,提交 c53d822
工具
0版本歷史
1- v0.1.8最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分