About ParseRelay
ParseRelay provides a single MCP `scan` tool for turning documents into structured fields with per-field confidence scores. It is for MCP hosts that need synchronous document parsing, with optional dry runs to preview paid rescue credits.
Key features
- 01Structured fields from document images
- 02Per-field confidence and review indicators
- 03Selectable schema, document type, and engine
- 04Dry-run estimates for paid rescue credits
Use cases
- 01Extract fields from a document image
- 02Check which parsed fields need review
- 03Estimate credits before a paid scan
MCP support
Provides one synchronous `scan` tool to MCP hosts. Results include fields, confidence, review status, source, and metadata; it supports stdio and streamable HTTP transports.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @parserelay/mcpPARSERELAY_API_KEYSecretParseRelay API key (prl_live_…). Required for stdio.PARSERELAY_BASE_URLAPI base URL. Defaults to https://api.parserelay.app; point at a local worker for testing.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
1Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| ocr | any | No | OCR backend selection. Use backend `passthrough` with `text` to skip OCR. |
| image | string | Yes | The document to scan: an https URL or a base64 data URI (data:image/...;base64,...). |
| model | string|null | No | Pin a specific model, e.g. "claude-haiku-4-5". |
| engine | enum | No | Extraction mode. Default `auto` (deterministic-first, LLM rescues only flagged fields).auto | ocr | ocr+rescue | ocr+check | vision |
| schema | any | No | What to extract, in ONE of two forms: a field-name array, OR a JSON Schema object with a `properties` map. Do NOT pass a flat {"field":"type"} object. Omit for a generic document. |
| dry_run | boolean | No | Preview only: returns which fields WOULD trigger a paid rescue + estimated credits, spends nothing. |
| doc_type | enum | No | Optional document-type hint.receipt | invoice | id | business_card | freeform |
| model_key | string|null | No | Bring your own provider key — you're billed plumbing only; the model bill is on your key. |
Details
From the project README@parserelay/mcp
ParseRelay's scan operation as an MCP tool — so any
MCP host (Claude Desktop, Cursor, …) can parse a document into structured, confidence-scored
fields. Same contract as the REST API and the <DeadSimpleMicroScanner> component; one tool,
scan.
The scan tool
Input mirrors the sync ScanRequest — image (required), plus
schema, doc_type, engine, ocr, dry_run, model, model_key. (relay webhooks are
omitted: a tool call is synchronous, so you get the envelope back inline.) The result is the
full ScanEnvelope as JSON: fields, per-field confidence,
needs_review, field_source, and meta (engine, credits, tokens).
Set dry_run: true to preview which fields would trigger a paid rescue — and the estimated
credits — without spending anything.
Run it
stdio (Claude Desktop, Cursor)
{
"mcpServers": {
"parserelay": {
"command": "npx",
"args": ["-y", "@parserelay/mcp"],
"env": {
"PARSERELAY_API_KEY": "your-key",
"PARSERELAY_BASE_URL": "https://api.parserelay.app" // optional
}
}
}
}
streamable-HTTP (remote / hosted)
PARSERELAY_API_KEY=your-key PORT=8080 node node_modules/@parserelay/mcp/dist/http.js
# → POST http://localhost:8080/mcp
Stateless: a fresh server per request, so it scales horizontally. Auth per request via
Authorization: Bearer <key>, falling back to PARSERELAY_API_KEY for single-tenant setups.
Programmatic
import { createMcpServer } from "@parserelay/mcp";
import { ParseRelayClient } from "@parserelay/client";
const server = createMcpServer(new ParseRelayClient({ apiKey }));
// then wire your own transport: await server.connect(transport)
Config
| Env var | Required | Default | Notes |
|---|---|---|---|
PARSERELAY_API_KEY | stdio: yes | — | HTTP can override per request via Authorization: Bearer. |
PARSERELAY_BASE_URL | no | https://api.parserelay.app | Point at a local worker for testing. |
PORT | no | 8080 | HTTP transport only. |
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.