
ClicheFactory Document Intelligence
io.github.ClicheFactoryPublished by GitHub account ClicheFactoryv0.1.8Updated Oct 25, 2026
Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.
Overview
A local MCP server that lets an assistant extract structured JSON from PDFs, images, Office files and email attachments, or convert them to markdown.
- What you can do
- Extract structured JSON from a document using a JSON schema, with several extraction modes including trained pipelines and two-stage verification. Convert supported documents to markdown text for inspection or analysis. Run diagnostics on configuration, API keys, dependencies and system binaries. Supported inputs include PDF, common image formats, DOCX, DOC, ODT, XLSX, CSV, EML, TXT and MD.
- When to use it
- Useful when you want an assistant to pull fields such as invoice numbers or totals out of documents into JSON, or to read a document as markdown before deciding what to extract. Best suited to one-document-at-a-time workflows rather than batch jobs.
- Requirements
- Runs locally over stdio via uvx or pip; Python 3.12 or newer and uv or pip. Service mode needs a ClicheFactory API key in CLICHEFACTORY_API_KEY and network access to the ClicheFactory cloud. Local mode needs the local extras (about 2 GB of parsing and OCR dependencies), system binaries such as tesseract and LibreOffice, and LLM_API_KEY plus LLM_MODEL_NAME; OCR_API_KEY and OCR_MODEL_NAME are optional.
Installation
In SourceWeft
- Open ClicheFactory Document Intelligence in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit c53d822
Tools
0Version history
1- v0.1.8LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts