mcp
v0.3.12Passport, ID and MRZ recognition via doc.cheap – Free: 100 documents every month, then $0.01 each
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scan_document Recognise a passport or ID document
Recognise a passport, national ID card or driver's licence from a photo or scan and return what is printed on it as structured JSON. Inputs: the image as image_base64 (always available), image_path (a local file, and only inside the directory DOC_CHEAP_IMAGE_ROOT names) or image_url (https, on a public address); plus the optional expect_country, return_portrait, retain_hours, reference and idempotency_key. Output: a Scan object – meta (id, status, billed, confidence, timing), document (kind, issuing country, number, series, date of issue, date of expiry, whether it has expired and how many d…
| Parameter | Type | Description |
|---|---|---|
expect_country | string | ISO 3166-1 alpha-3 country you expect, or omit for any. |
idempotency_key | string | Makes a retried scan return the first result instead of charging again. |
image_base64 | string | The document image as base64 (a data: URL is also accepted). |
image_path | string | Path to a local image file, inside the directory named by DOC_CHEAP_IMAGE_ROOT. Disabled unless that variable is set; send image_base64 instead. |
image_url | string | https: URL of an image on a public internet address, which the server fetches (25 MB maximum). |
reference | string | Your own correlation string, echoed back in the result. |
retain_hours | integer | Hours the result stays readable via GET /v1/scans/{id} (0 = store nothing). Omit it to use the account's own history-retention setting. |
return_portrait | boolean | Whether to include the holder photograph crop, images.main_photo (default true). |
check_balance Check remaining credits
Return how many credits are left on the account and what the current period has used: the balance, split into this month's free credits (100 every month, drawn first) and the paid credits, the credits spent, and the scan counters broken down by status (recognized, unreadable, no document found, unsupported document, rejected). Takes no arguments and calls GET /v1/usage; under the public sandbox key it answers without calling anything. One recognised document draws one credit, at $0.01; scans that recognised nothing are counted and never charged. Needs a real API key – under the public sandbo…
search_docs Search the doc.cheap API documentation
Full-text search over the doc.cheap API documentation – endpoints, request options, every response field, the error codes and what to do about each, MRZ rules, retention and pricing. Takes a query and an optional limit (1 to 20, default 5), and answers with the matching sections: title, a snippet, and a link to the page. It reads a copy of the documentation shipped beside this server, so it makes no network call and works offline. Use it before guessing at a field name, an error code or a scan option – what it returns is the published contract rather than a recollection of it.
| Parameter | Type | Description |
|---|---|---|
query * | string | What to search the documentation for. |
limit | integer | Maximum number of results (default 5). |
list_scans List stored scans
List the account's stored scans, most recent first, one page at a time. Inputs: the optional limit (1 to 100 rows, default 20) and cursor (the next_cursor of the previous page; omit it for the first page). Output: scans – one row per scan with id, status (recognized, unreadable, no_document_found, unsupported_document or rejected), billed, duration_ms, reference (your own string from the scan) and created_at – and next_cursor, which is null on the last page. A row holds no extracted data; call get_scan with its id for the full result. Calls GET /v1/scans; it never charges a credit. Only sc…
| Parameter | Type | Description |
|---|---|---|
cursor | string | next_cursor from the previous page; omit it for the first page. |
limit | integer | Rows per page, 1 to 100 (default 20). |
get_scan Fetch a stored scan
Fetch the full result of one stored scan by its id, as it was returned when the document was recognised. Input: scan_id – meta.id of a scan_document result, or id of a list_scans row. Output: the same Scan object scan_document returns (meta, document, holder, fields, mrz and the rest) plus a one-line summary, with two differences: the image crops are never stored, so every images slot is null, and quality reads not_checked. Calls GET /v1/scans/{id}; it never re-runs recognition and never charges a credit. Only scans made with a live key under a non-zero retention window are stored for the ac…
| Parameter | Type | Description |
|---|---|---|
scan_id * | string | The scan's id: meta.id of the scan_document result, or id of a list_scans row (a lower-case UUID). |
delete_scan Delete a stored scan
Permanently delete one stored scan now, before its retention window would end. This cannot be undone: the stored result, its history row and its thumbnail are removed, and the scan can no longer be listed, fetched or replayed through its idempotency_key. The credit it drew is not refunded, and this period's usage counters still count it. Input: scan_id – meta.id of a scan_document result, or id of a list_scans row. Output: { id, deleted: true }. Calls DELETE /v1/scans/{id}. Only scans made with a live key under a non-zero retention window are stored for the account, and only until that windo…
| Parameter | Type | Description |
|---|---|---|
scan_id * | string | The scan's id: meta.id of the scan_document result, or id of a list_scans row (a lower-case UUID). |