Skip to main content
Glama
@parserelay/mcp

@parserelay/mcp

Official
by parserelay

@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.

Related MCP server: OCR MCP Server

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.

Available Tools

1 tool
scanScan a documentA

Parse a document (receipt, invoice, form, ID) into structured, confidence-scored fields. Returns the ParseRelay envelope: fields, per-field confidence, needs_review, field_source provenance, and meta (engine, credits, tokens). Set dry_run: true to preview cost without spending.

Inputs: image (required), ocr, model, engine, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no possibility of confusion between overlapping tools. The tool's purpose is clearly defined and distinct.

    Naming Consistency5/5

    The single tool name 'scan' is simple, descriptive, and follows a consistent verb-based naming style. There are no mixed conventions or conflicting patterns.

    Tool Count4/5

    The server has only one tool, which is appropriate for its narrow scope as a document parser. While the count is lower than the typical 3-15 range, the tool covers the core functionality without feeling overly thin.

    Completeness5/5

    The 'scan' tool fully addresses the apparent domain of document parsing, including dry-run support for cost preview. No obvious missing operations are evident from the description.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude and other MCP-compatible agents to process documents, extract structured data, detect PII, and export LLM-ready datasets through natural language tool calls.
      8
      25 PyPI
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude, Cursor, VS Code, and other MCP clients to extract data from INE/IFE voting credentials and create one-time capture links so clients can photograph their document from a phone.
      3
      36 npm
      MIT