Skip to main content

MCP Server

The wiseocr-mcp package connects WiseOCR to AI assistants through the Model Context Protocol. Once it is added, you can ask Claude, Cursor or any other MCP client to turn receipts and invoices into structured JSON, or to save a whole folder of them to a CSV file.

The server runs locally on your computer, so it reads files and folders straight from your disk. Every document goes through the same API as POST /file and POST /text, and returns the same JSON.

Requirements​

Setup​

Add the server to your MCP client and put your key in place of your-api-key.

claude mcp add wiseocr --env WISEOCR_API_KEY=your-api-key -- npx -y wiseocr-mcp

This adds WiseOCR to the current project. Add --scope user to have it in every project.

To check the connection, ask your assistant: "How many WiseOCR credits do I have left?"

Tools​

Your assistant picks the right tool from what you ask.

ToolInputReturns
extract_receiptsource: absolute local file path or public http(s) URLThe full JSON for one receipt or invoice, with line items
extract_receipt_from_texttext: the text of one receipt or invoiceThe same JSON, with no OCR step (e-mail receipts, order confirmations, pasted text)
extract_receipts_batchpaths: files and/or folders; outputFile: new .csv or .json fileA summary, with the results saved to outputFile (up to 100 documents per call)
get_accountnoneThe account e-mail and remaining credits (pay-as-you-go and subscription)

The three extraction tools also accept skipItems (default false). Set it to true to return only the document metadata, which makes each call faster.

Files and formats​

  • Images: JPG, PNG, WEBP, GIF, BMP, TIFF
  • PDF files
  • .txt files with receipt text
  • Up to 4 MB per file

Batch output​

extract_receipts_batch scans the folders you pass (subfolders are left as they are) and processes the documents three at a time. outputFile is required above 10 documents, and it must be a new file: existing files are never overwritten.

  • .csv: one row per document with the columns file, status, error, documentType, time, vendor, taxNo, documentNo, country, currency, totalNet, totalTax, total and itemCount.
  • .json: the full results, including line items and the tax breakdown.

Example prompts​

  • "Extract every receipt in ~/Documents/receipts/october and put them in a CSV with date, merchant, total and VAT."
  • "Read ~/Desktop/invoice-2041.pdf and tell me the invoice number, the seller's tax ID and the total."
  • "Find my taxi receipts in Gmail from last month and turn them into JSON." (with a Gmail MCP server connected)
  • "How many WiseOCR credits do I have left?"

Configuration​

VariableRequiredDefault
WISEOCR_API_KEYYesnone
WISEOCR_API_URLNohttps://wiseocr.com/api/external/v1

Set WISEOCR_API_URL to point the server at another deployment, for example http://localhost:3000/api/external/v1.

Billing​

Every page uses one credit from the same balance as the API. get_account is free. See pricing.

More examples and copy-ready setup for each app are on the WiseOCR MCP server page.