
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 分