Listed from the MCP registry; nobody on Odel publishes it.

MCP server: One MCP server.

ClicheFactory Document Intelligence

@clichefactoryRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.

Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: only reads or looks up information.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

PyPIclichefactory-mcpv0.3.0

Run

uvx clichefactory-mcp

MCP client config

{
  "mcpServers": {
    "clichefactory-document-intelligence": {
      "command": "uvx",
      "args": [
        "clichefactory-mcp"
      ]
    }
  }
}
README7 min read

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.

Service mode uses the ClicheFactory cloud for the best extraction quality. You only need one API key.

  1. Sign up at clichefactory.com — free pages included, no credit card required.

  2. Create an API key in Settings → API Keys (format: cliche-...).

  3. Install the MCP server:

    bash
    pip install clichefactory-mcp
    
  4. Configure — either paste the key into your MCP client (see below) or run once in a terminal:

    bash
    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

ToolDescription
extractExtract structured JSON from a document using a schema
draft_modelDraft a schema from a plain-language list of fields (service mode)
to_markdownConvert a document to markdown text
doctorCheck configuration, dependencies, and system binaries
balanceShow your credit balance and how many pages it still buys (service mode)

extract

The main tool. Pass a document file and a JSON schema — get structured data back.

Supports all extraction modes:

ModeDescriptionRequires
(default)OCR + LLM extractionService API key (recommended)
fastFastest pipelineService API key
trainedTrained pipeline artifactService + artifact_id
robustTwo-stage extract + verifyService only
robust-trainedTrained extract + verificationService + 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"}}})

In service mode, pass include_cost: true to see what the call cost. The output is then {"result": <extracted data>, "cost": {"pages": 3, "credits_used": 30, "credits_per_page": 10}} (credits_used is 0 when free pages covered it). Without it, the output is the extracted data as before.

What the schema can say, and what comes back:

In the schemaIn the output
"type": "string" / "integer" / "number"a JSON string / whole number / number
"type": "boolean"true or false (never "yes" / "no")
"enum": [...] on a stringone of the listed values; anything else is a validation error
pattern, minLength / maxLength, minimum / maximumchecked; a value that breaks one is a validation error naming the field
a field left out of requiredmay be null when the document doesn't have it

draft_model

For when there is no schema yet. Describe the fields in any language ("from vehicle registration photos: the VIN, the owner, the document type, and whether the photo is sharp") and get back:

  • json_schema: pass it to extract as schema, unchanged;
  • model: send it back as current_model with a change ("also the first registration date") to refine the draft;
  • summary and notes: what the draft assumed or could not express. Worth reading before a large batch.

Billed per draft (see balance); a draft that can't be turned into a valid model is not billed and returns the problems.

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.

balance

The credit balance of the account your CLICHEFACTORY_API_KEY belongs to: credits, free extraction pages left, and for each extraction mode (fast, balanced, robust) and to-markdown, how many pages the balance still buys. Useful before a large batch. Service mode only.

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.

Installation

Prerequisites

  • Python ≥ 3.12
  • uv (recommended) or pip

From PyPI

bash
pip install clichefactory-mcp

For local-mode extraction (BYOK, runs on your machine), install with the local extras:

bash
pip install "clichefactory-mcp[local]"

Configuration

Environment Variables

Set these in your MCP client configuration (see below) or in ~/.clichefactory/config.toml via clichefactory configure.

VariableRequiredDescription
CLICHEFACTORY_API_KEYYes (service mode)ClicheFactory API key from Settings → API Keys (cliche-...)
CLICHEFACTORY_API_URLNoOverride the default service URL (https://api.clichefactory.com); useful for local development against a self-hosted ClicheFactory backend
LLM_MODEL_NAMELocal mode onlyModel name, e.g. gemini/gemini-3-flash-preview
LLM_API_KEYLocal mode onlyAPI key for the LLM provider
OCR_MODEL_NAMENoSeparate OCR/VLM model (defaults to main model)
OCR_API_KEYNoAPI key for OCR model (defaults to main key)

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):

json
{
  "mcpServers": {
    "clichefactory": {
      "command": "uvx",
      "args": ["clichefactory-mcp"],
      "env": {
        "CLICHEFACTORY_API_KEY": "cliche-your-key-here"
      }
    }
  }
}

For local development from a git checkout, replace uvx with:

json
"command": "uv",
"args": ["--directory", "/absolute/path/to/cliche-mcp", "run", "clichefactory-mcp"]

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "clichefactory": {
      "command": "uvx",
      "args": ["clichefactory-mcp"],
      "env": {
        "CLICHEFACTORY_API_KEY": "cliche-your-key-here"
      }
    }
  }
}

OpenClaw

Register the MCP server with your OpenClaw agent:

bash
openclaw mcp set clichefactory '{"command":"uvx","args":["clichefactory-mcp"],"env":{"CLICHEFACTORY_API_KEY":"cliche-your-key-here"}}'

Verify with openclaw mcp list. The agent can now use the extract, draft_model, to_markdown, doctor and balance tools in any conversation.

An OpenClaw skill with agent instructions is also available in integrations/openclaw/. To install it into your workspace:

bash
cp -r /path/to/cliche-mcp/integrations/openclaw ~/.openclaw/skills/clichefactory

Or, once published to ClawHub:

bash
openclaw skills install clichefactory

Local mode (advanced)

If you prefer BYOK extraction on your machine, install the local extras and set LLM credentials:

json
{
  "mcpServers": {
    "clichefactory": {
      "command": "uvx",
      "args": ["clichefactory-mcp"],
      "env": {
        "LLM_MODEL_NAME": "gemini/gemini-3-flash-preview",
        "LLM_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

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:

FeatureReason
Batch operations (extract-batch, to-markdown-batch)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.
configureInteractive prompts don't work in MCP. Use env vars or run clichefactory configure in a terminal.
--output / -o flagMCP tools return results directly to the LLM rather than writing to files.
allow_partialNot exposed as a tool parameter in v1.
OCR engine selectionUses the SDK defaults (RapidOCR). Configure via ~/.clichefactory/config.toml or pass parsing options through the SDK if needed.

Development

bash
# 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

License

MIT — Copyright (c) 2026 Urban Susnik s.p.

Similar modules

Browse Document data extraction