FastOCR

io.github.fastocr-org由 GitHub 帳號 fastocr-org 發布v0.3.0更新於 Nov 7, 2026

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

發布方自己的服務:Fastio

概覽

AI 產生的概覽

FastOCR 讓助理對本機掃描版 PDF 與圖片進行 OCR、產生可搜尋 PDF,並把銀行對帳單轉成 Excel、CSV 或 QuickBooks 檔案。

可以做什麼
  • 對本機 PDF 或圖片進行 OCR,回傳文字,或在原檔旁儲存可搜尋 PDF
  • 查詢文件狀態與頁數,或再次取得已完成的結果
  • 列出帳戶中最近的文件,並刪除已儲存的文件
  • 把銀行對帳單擷取為 xlsx、csv、json、qbo、quickbooks_csv、qfx 或 ofx,並回傳餘額摘要
  • 查詢帳戶剩餘頁數
適用情境
當磁碟上有掃描檔或圖片,想直接取得文字、可搜尋副本,或結構化的銀行對帳單匯出時適用。也適合在批次處理前查看剩餘 OCR 頁數。
執行需求
透過 uvx fastocr-mcp(或 pip install fastocr-mcp)以 stdio 在本機執行;需要 Python 3.10 以上版本,並在 FASTOCR_API_KEY 中提供 FastOCR 帳戶的 API 金鑰。需要連線至 FastOCR API 的網路;可用 FASTOCR_BASE_URL 覆寫端點位址。
安裝前請注意
會把選取的本機檔案上傳到 FastOCR API,文件內容會離開本機。用量以頁計費:每月 20 頁免費,之後需購買 Page Pack,銀行對帳單頁數為獨立餘額。delete_document 會刪除 FastOCR 上的文件及其儲存檔案。銀行對帳單擷取工具標示為 beta。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 FastOCR,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

An MCP server that lets your client OCR a local scanned PDF or image over stdio; files go only to the FastOCR API.

Quickstart

  1. Create an API key in the developer console.
  2. Add the server to Claude Code:
bash
claude mcp add fastocr -e FASTOCR_API_KEY=your_api_key -- uvx fastocr-mcp
  1. Ask: "OCR ~/Scans/contract.pdf".

With uv there is nothing to install; the client runs uvx fastocr-mcp. Prefer pip? Run pip install fastocr-mcp and use the command fastocr-mcp. Python 3.10 or newer.

Other clients

Every client needs the same command, uvx fastocr-mcp, and your key in FASTOCR_API_KEY.

Claude Desktop

Add this to claude_desktop_config.json (Settings > Developer > Edit Config), then restart Claude Desktop:

json
{  "mcpServers": {    "fastocr": {      "command": "uvx",      "args": ["fastocr-mcp"],      "env": { "FASTOCR_API_KEY": "your_api_key" }    }  }}
Cursor

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

json
{  "mcpServers": {    "fastocr": {      "type": "stdio",      "command": "uvx",      "args": ["fastocr-mcp"],      "env": { "FASTOCR_API_KEY": "your_api_key" }    }  }}
VS Code

Add this to .vscode/mcp.json in your workspace. VS Code uses servers, not mcpServers:

json
{  "servers": {    "fastocr": {      "type": "stdio",      "command": "uvx",      "args": ["fastocr-mcp"],      "env": { "FASTOCR_API_KEY": "your_api_key" }    }  }}

If you installed with pip, use "command": "fastocr-mcp" and "args": [].

Examples

Ask your client in plain language:

  • "OCR ~/Downloads/scanned-contract.pdf and summarize the termination clause."
  • "Read the text in /Users/me/Desktop/receipt.jpg."
  • "Make a searchable copy of /Users/me/archive/1998-letters.pdf."
  • "List my last five FastOCR documents."
[An MCP client calls ocr_file on a scanned letter and gets back its text]

The text above is the unedited output FastOCR returned for a scanned page.

Tools

ToolWhat it does
ocr_file(path, output="text", output_path=None)Uploads a local PDF or image, runs OCR and waits up to 45 seconds; a larger document returns its id for get_document. output="text" returns the text (text over 20,000 characters is cut, and the full text is saved to output_path or <file>.ocr.txt next to the input file). output="pdf" saves a searchable PDF to output_path or <file>.searchable.pdf.
ocr_pdf(path, output="text", output_path=None)The same tool as ocr_file under its earlier name, kept so existing setups keep working.
get_document(document_id, output="status", output_path=None)Status and page counts of a document; with output="text" or "pdf", waits up to 45 seconds and fetches the finished result. Fetching a result again costs no pages.
list_documents(limit=20)The most recent documents in the account, newest first.
extract_bank_statement(path, format="xlsx", output_path=None, account=None, transactions=10)Beta. Uploads a bank statement (PDF, PNG, JPG, JPEG or WebP), waits up to 45 seconds, saves the file (xlsx, csv, json, or the accounting files qbo, quickbooks_csv, qfx, ofx; one file per account) beside the input as <file>.transactions.<ext>, and returns the bank, each account's balances and whether they reconcile, needs_review, the transaction count and the first transactions.
get_bank_statement(statement_id, format="xlsx", output_path=None, account=None, transactions=10)Waits up to 45 seconds for a statement that extract_bank_statement did not finish, then saves the file and returns the same summary. Fetching again costs no pages.
get_balance()The pages left on the account: free pages (they reset monthly), contract pages if any, and Page Packs, plus the link to buy more. Costs no pages.
delete_document(document_id)Deletes a document and its stored files on FastOCR. Local files are not touched.

What you get back

You getHow
The text of the documentocr_file(path), or get_document(id, output="text")
A searchable PDFocr_file(path, output="pdf"), saved beside the input
Status and page countsget_document(id)
A bank statement as Excel, CSV, JSON or QuickBooks files, with a summaryextract_bank_statement(path)
Your recent documentslist_documents()

Languages and files

  • 100+ languages, detected automatically. No language setting is needed.
  • PDF files up to 1 GiB, and PNG, JPG, JPEG, GIF, WebP and BMP images up to 20 MiB. An image counts as one page.
  • Built on the official fastocr-sdk and the official MCP Python SDK.

Pages and pricing

Any signed-in FastOCR account can create an API key and start right away. Every account gets 20 free pages a month, shared with PDFs on the website; an image is one page. When you need more, buy a Page Pack on the pricing page. Packs and the page balance are the same on the website and in the API; ask your agent to run get_balance to see what is left. Bank statement pages are a separate balance (statement_pages_remaining in get_balance), shared with the website's bank statement converter; new accounts start with some free statement pages. Accounts process 2 documents at once, or 10 with an API contract or 10,000 or more pages bought. You accept the API terms with your first key.

Errors and configuration

Tool errors are written for the agent to act on: a rejected key, an account out of pages (buy_pages), too many documents processing at once (concurrency_limit), a missing file, or an unsupported file type. Each message says what to do next. A document that runs out of pages fails with buy_pages; the tool says so and links to the pricing page. Error codes are listed in the API docs.

VariablePurpose
FASTOCR_API_KEYRequired. Your API key.
FASTOCR_BASE_URLOptional. Overrides https://api.fastocr.org.

Support and license

Questions: [email protected]. Bugs and requests: GitHub issues. Python SDK: fastocr-python. MIT license; see LICENSE. Made by FastOCR.

來源:README.md,提交 727f2fb

工具

8

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; an image is one page. Large documents take longer: then this returns a document id, and get_document with the same output fetches the result. Never call ocr_file again for that file, which bills it again.

輸入參數path必填outputoutput_path

ocr_pdf

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

輸入參數path必填outputoutput_path

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.

輸入參數outputdocument_id必填output_path

list_documents

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

輸入參數limit

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.

輸入參數document_id必填

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 account's statement balance (50 free pages for new accounts); never run it twice on the same file. A long statement returns a statement id: call get_bank_statement with it. Beta.

輸入參數path必填formataccountoutput_pathtransactions

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.

輸入參數formataccountoutput_pathstatement_id必填transactions

版本歷史

3
  1. v0.3.0最新Nov 7, 2026
  2. v0.2.0Oct 25, 2026
  3. v0.1.1Oct 25, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Fast 整合