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.
Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.
Configure — either paste the key into your MCP client (see below) or run once in a terminal:
pip install clichefactory # if you don't have the CLI yet
clichefactory configure
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
Tool
Description
extract
Extract structured JSON from a document using a schema
to_markdown
Convert a document to markdown text
doctor
Check configuration, dependencies, and system binaries
extract
The main tool. Pass a document file and a JSON schema — get structured data back.
Supports all extraction modes:
Mode
Description
Requires
(default)
OCR + LLM extraction
Service API key (recommended)
fast
Fastest pipeline
Service API key
trained
Trained pipeline artifact
Service + artifact_id
robust
Two-stage extract + verify
Service only
robust-trained
Trained extract + verification
Service + artifact_id
The schema can be provided as:
File path: absolute path to a .json schema 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). Requires pip install "clichefactory-mcp[local]" (~2 GB of parsing/OCR dependencies) plus system binaries (tesseract, LibreOffice). Quality depends on your local setup.
MCP tools are typically called one-at-a-time by the LLM. For multiple documents, the LLM calls extract in sequence. Batch support may be added in a future version.
configure
Interactive prompts don't work in MCP. Use env vars or run clichefactory configure in a terminal.
--output / -o flag
MCP tools return results directly to the LLM rather than writing to files.
allow_partial
Not exposed as a tool parameter in v1.
OCR engine selection
Uses the SDK defaults (RapidOCR). Configure via ~/.clichefactory/config.toml or pass parsing options through the SDK if needed.
Development
# Install in development mode
uv sync
# Run the server directly (stdio transport, for testing with MCP clients)
uv run clichefactory-mcp
# Inspect available tools (requires mcp CLI)
uv run mcp dev cliche_mcp/server.py
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Fragen
Wie installiere ich ClicheFactory Document Intelligence?
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
Benötigt ClicheFactory Document Intelligence einen API-Schlüssel?
Der Herausgeber nennt diese Umgebungsvariablen: CLICHEFACTORY_API_KEY, CLICHEFACTORY_API_URL, LLM_MODEL_NAME, LLM_API_KEY, OCR_MODEL_NAME, OCR_API_KEY.
Welchen Transport verwendet ClicheFactory Document Intelligence?
ClicheFactory Document Intelligence läuft lokal über stdio.
Wann wurde ClicheFactory Document Intelligence zuletzt geprüft?
Zuletzt geprüft: 2026-11-16. Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.