Skip to main content
FastOCR

OCR any scanned PDF or image from Claude, Cursor and other MCP clients.

CI PyPI Python License: MIT

Website · Docs · Get an API key

FastOCR reads a scanned page in English, Arabic and Hindi and returns its text

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:
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:

{
  "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):

{
  "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:

{
  "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

Tool What 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 get How
The text of the document ocr_file(path), or get_document(id, output="text")
A searchable PDF ocr_file(path, output="pdf"), saved beside the input
Status and page counts get_document(id)
A bank statement as Excel, CSV, JSON or QuickBooks files, with a summary extract_bank_statement(path)
Your recent documents list_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.

Variable Purpose
FASTOCR_API_KEY Required. Your API key.
FASTOCR_BASE_URL Optional. Overrides https://api.fastocr.org.

Support and license

Questions: support@fastocr.org. Bugs and requests: GitHub issues. Python SDK: fastocr-python. MIT license; see LICENSE. Made by FastOCR.

Metadata

Release files for fastocr-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastocr-mcp 0.3.0
File Size Uploaded Provenance Actions
fastocr_mcp-0.3.0.tar.gz 22.7 kB With provenance Details for fastocr_mcp-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastocr-mcp 0.3.0
File Interpreter ABI Platform Actions
fastocr_mcp-0.3.0-py3-none-any.whl Python 3 none any Details for fastocr_mcp-0.3.0-py3-none-any.whl

Total release size: 35.9 kB

Release files / fastocr_mcp-0.3.0.tar.gz

Download URL fastocr_mcp-0.3.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
10624751f65ea07f0c71b815f8fa98ccb94c90c5074d4e19a87db1516fb869ad
BLAKE2b-256 checksum
How to use checksums
1fd40ddfa012dc679d12e445dc43d056caf4eb7686128738de1c50a26f3ab1fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / fastocr_mcp-0.3.0-py3-none-any.whl

Download URL fastocr_mcp-0.3.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe6d9236705d76b577ef3e850eba4484b8132d462b0bb22b24aebea7eff75145
BLAKE2b-256 checksum
How to use checksums
25463db0ecfa69da36654fb5a9d963f68d336cf20bc4925569d1bf504f7758e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for fastocr-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fastocr_mcp-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page