clairic-mcp
Provides Cloudflare Workers AI Clairic as an MCP tool for structured extraction from text, public web pages, and images into typed fields with confidence and null probability. It runs as a Cloudflare Worker and can be protected by Cloudflare Access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@clairic-mcpextract due date, total, and PO number from this invoice"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
clairic-mcp
An MCP server that gives you Cloudflare's Clairic model as one tool, extract. It runs as a Worker on your own Cloudflare account, behind Cloudflare Access.
You send extract an input (text, a public web page or up to four images) and a list of fields, each with a name and a type. Clairic gives back one answer per field: a value of that type, or null when the input doesn't settle it. Each answer carries a confidence, the chance the value is right, and a p_null, the chance the input has no value for the field. Text answers also say which line they came from. Clairic answers in one fast pass and doesn't reason step by step, so the assistant calling it picks the fields and does any arithmetic longer than a step or two.
Setup
You need:
a Cloudflare account with a domain on it
a Zero Trust team, which is free, with at least one login method (One-time PIN is enough)
an API token with Access: Apps and Policies Write, used once by
just accessNode 24, pnpm, just, curl and jq
git clone https://github.com/lmarkmann/clairic-mcp && cd clairic-mcp
pnpm install
pnpm exec wrangler login
cp .env.example .env # your account id, domain, team, allowed emails and the API token
just access # creates the Access app and policy, writes ACCESS_AUD to .env
just deploy # runs the checks, then deploys to your domainEverything specific to your deployment lives in .env, which git ignores. The Worker rejects every request until ACCESS_AUD is set, so a deploy without just access serves nothing.
Access sits in front of the whole hostname and acts as the OAuth server: a client registers itself, sends you to your team's login page, and only emails on the clairic-mcp users policy get through.
Related MCP server: web-extractor
Connect
Claude Code:
claude mcp add --transport http clairic https://<your domain>/mcppi:
pi mcp add clairic --url https://<your domain>/mcpThen sign in when the client asks (/mcp in either one). Other clients take the same URL as a remote MCP server with the client ID and secret left empty. Access accepts callbacks on localhost and the hosted callback listed under allowed_uris in the justfile; add any other hosted callback there before you run just access.
Clients keep the tool list from when they connected, so reconnect after an update changes the tool.
Example
The input:
Invoice INV-2291 from Northwind Supply, issued 2026-09-02, net 30.
4 pallets at $250.00 each, shipping $80.00.The fields:
{
"due_date": { "type": "date", "instructions": "Issue date plus the net payment days" },
"total": { "type": "number", "decimals": 2, "unit": "USD", "instructions": "Amount due including shipping" },
"po_number": { "type": "text", "instructions": "Purchase order number" },
"days_to_pay": { "type": "estimate", "min": 0, "max": 120, "step": 1, "instructions": "Days after issue until this invoice is paid" }
}The answers:
due_date: "2026-10-02" (confidence >0.999, p_null <0.001)
total: 1080 USD (confidence >0.999, p_null <0.001)
po_number: null (p_null >0.999; best guess "INV-2291" at confidence >0.999)
days_to_pay: 31 (median 31, 80% interval 24 to 38, mean 31.32)The due date and the total are computed, not copied. The invoice has no purchase order number, so po_number is null; the best guess next to it is what Clairic would say if forced to pick, not an answer. An answer with confidence under 0.9, or a p_null between 0.1 and 0.9, is marked [check], and the tool tells the client to have you verify it.
Field types
Type | You get |
| A piece of the input, quoted as written, with its line number |
| A number, optionally with a unit, fixed decimals or a whole number |
| An ISO value; dates without a year are read relative to the reference date |
| Every match, as text, numbers or dates |
| A median and an 80% interval between the |
| One estimate per step ahead, from a series in the input |
This server cannot be deployed
Maintenance
Related MCP Connectors
Document extraction against a JSON Schema with a calibrated confidence per field; async job status.
Turn documents into verified, structured data: fields, tables, and automatic checks.
PDFs, images and messy text to schema-guaranteed JSON. try_parse runs a real extraction, no key.
Turn any website into structured JSON data matching your custom schema.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables turning any website into a self-healing, typed JSON API with parameterized lookups, automatic drift detection/healing, and MCP-native exposure of sources as typed lookup tools.3MIT
- FlicenseNot gradedqualityBmaintenanceEnables natural language web data extraction into structured JSON via browser automation, supporting field-based and goal-based modes with optional vision.1-
- AlicenseNot gradedqualityBmaintenanceEnables users to extract structured data from specified web pages using a URL and natural-language prompt to describe the desired fields. It exposes this capability as an MCP tool for compatible clients.119 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables agents to extract structured data from web pages by supplying a URL and a natural-language prompt describing the desired data and fields. It exposes this capability as an MCP tool for compatible clients.119 npmMIT