FastOCR

v0.3.0
io.github.fastocr-org/fastocr-mcp Checked 1 day ago Published 26 days ago

OCR scanned PDFs and extract bank statements to Excel, CSV and QuickBooks with FastOCR.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ocr_file

OCR a local PDF or image with FastOCR and return its text or save a searchable PDF. Uploads the file, runs OCR and waits up to 45 seconds. With output='text' the text is returned; text longer than 20,000 characters is cut, and the full text is written to output_path or to <file>.ocr.txt next to the input file. With output='pdf' the searchable PDF is saved to output_path or to <file>.searchable.pdf next to the input file. Either default file replaces an earlier result with the same name. Each processed page uses one page of the account's balance;…

ParameterTypeDescription
path *stringAbsolute path to a local PDF, PNG, JPG, JPEG, GIF, WebP or BMP file.
outputstring'text' returns the extracted text; 'pdf' saves a searchable PDF with a text layer.
output_pathOptional absolute path for the result file. An existing file there is replaced.

ocr_pdf

The same tool as ocr_file, kept under its earlier name. Prefer ocr_file.

ParameterTypeDescription
path *stringAbsolute path to a local PDF, PNG, JPG, JPEG, GIF, WebP or BMP file.
outputstring'text' returns the extracted text; 'pdf' saves a searchable PDF with a text layer.
output_pathOptional absolute path for the result file. An existing file there is replaced.

get_document

Get a FastOCR document's status, and optionally its text or searchable PDF. Statuses: awaiting_upload, processing, completed, partial (the account ran out of pages partway), failed. With output='text' or 'pdf' this waits up to 45 seconds; if the document is still processing, call it again. Fetching a result again costs no pages. Without output_path, long text and PDFs are saved in the system temp directory.

ParameterTypeDescription
document_id *stringThe document id returned by ocr_file or list_documents.
outputstring'status' (default) returns the status at once; 'text' or 'pdf' waits for the document to finish and fetches the result.
output_pathOptional absolute path for the result file. An existing file there is replaced.

list_documents

List the most recent documents in the FastOCR account with their status and page counts.

ParameterTypeDescription
limitintegerHow many documents to return, newest first (1 to 100).

get_balance

Get how many pages the FastOCR account can still process. Costs no pages. Documents spend free pages first (they reset monthly), then contract pages, then Page Packs. pages_remaining counts the Page Packs only, so add the free and contract pages for the total. contract_* are omitted without an API contract. statement_pages_remaining is a separate balance that OCR does not spend. Check this before OCRing a large PDF; buy_pages_url is where to add pages.

delete_document

Permanently delete a FastOCR document and its stored files (original, text, searchable PDF). A document that is still processing cannot be deleted. Local files are not touched.

ParameterTypeDescription
document_id *stringThe document id returned by ocr_file or list_documents.

extract_bank_statement

Extract the transactions of a bank statement with FastOCR and save them as a file. Uploads the statement, waits up to 45 seconds, saves the file (default <statement>.transactions.xlsx beside the input, replacing an earlier one) and returns JSON: the bank, each account with opening and closing balance, totals and whether the printed balances reconcile with the transactions, needs_review, the transaction count and the first transactions. needs_review true means some figures should be checked by a person. Each statement page uses one page of the ac…

ParameterTypeDescription
path *stringAbsolute path to a local bank statement: PDF, PNG, JPG, JPEG or WebP.
accountFor qbo, quickbooks_csv, qfx and ofx: save only this account (1 is the first). Default: one file per account.
formatstringFile to save: xlsx (default), csv, json (full structured data), or an accounting file: qbo, quickbooks_csv, qfx, ofx.
output_pathOptional absolute path for the result file. An existing file there is replaced.
transactionsintegerHow many of the first transactions to include in the reply (0 to 50).

get_bank_statement

Wait up to 45 seconds for a bank statement to finish, then save its file and return its summary. Use it after extract_bank_statement returned a statement id. Fetching again costs no pages. If the statement is still processing, call it again with the same arguments. Without output_path the file is saved in the system temp directory.

ParameterTypeDescription
statement_id *stringThe statement id returned by extract_bank_statement.
accountFor qbo, quickbooks_csv, qfx and ofx: save only this account (1 is the first). Default: one file per account.
formatstringFile to save: xlsx (default), csv, json (full structured data), or an accounting file: qbo, quickbooks_csv, qfx, ofx.
output_pathOptional absolute path for the result file. An existing file there is replaced.
transactionsintegerHow many of the first transactions to include in the reply (0 to 50).