# Vision OCR MCP (`accelerationengg/vision-ocr-mcp`) Actor

Extract text from images instantly. Turn receipts, invoices, documents, and handwritten notes into structured data.

- **URL**: https://apify.com/accelerationengg/vision-ocr-mcp.md
- **Developed by:** [Acceleration](https://apify.com/accelerationengg) (community)
- **Categories:** MCP servers, AI
- **Stats:** 16 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Vision OCR MCP Server

A Model Context Protocol server for extracting text from images. This server enables LLMs to read invoices, receipts, and documents in 100+ languages while preserving the original script.

**About this MCP Server:** To understand how to connect to and utilize this MCP server, please refer to the official Model Context Protocol documentation at [mcp.apify.com](https://mcp.apify.com).

***

### Connection URL

MCP clients can connect to this server at:

```
https://accelerationengg--vision-ocr-mcp.apify.actor/mcp
```

***

### Client Configuration

To connect to this MCP server, use the following configuration in your MCP client:

```json
{
  "mcpServers": {
    "vision-ocr": {
      "url": "https://accelerationengg--vision-ocr-mcp.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

**Note:** Replace `YOUR_APIFY_TOKEN` with your actual Apify API token. You can find your token in the [Apify Console](https://console.apify.com/account/integrations).

***

### Claude Desktop Configuration

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop settings:

**Location:** `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)

```json
{
  "mcpServers": {
    "apifyVisionOCR": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://accelerationengg--vision-ocr-mcp.apify.actor/mcp",
        "--header",
        "Authorization: Bearer YOUR_APIFY_TOKEN"
      ]
    }
  }
}
```

**Steps:**

1. Open Claude Desktop configuration file at the location above
2. Add the configuration with your Apify API token (replace `YOUR_APIFY_TOKEN`)
3. Save the file
4. Restart Claude Desktop
5. The `vision_ocr` tool will now be available in your conversations

***

### Available Tools

**`vision_ocr`** - Extracts structured data from images with language detection and price extraction.

**Parameters:**

- `images` (array, required) - List of image URLs, file paths, or base64 strings (max 15)
- `output_format` (string, optional) - `"json"` (default) or `"toon"` for compact output

**Returns:**

```json
{
  "language_detected": "ur",
  "description_text": "رسید | تاریخ: ۲۰۲۶-۰۱-۰۴ | چائے",
  "price_1": "₨۵۰",
  "price_2": "₨۱۲۵"
}
```

***

### Features

✅ **Multilingual OCR** - Urdu (اردو), Arabic (العربية), English, Chinese (中文), and 100+ languages\
✅ **Price Detection** - Automatically extracts prices from invoices/receipts\
✅ **Layout Preservation** - Maintains tables and columns with "|" separators\
✅ **Batch Processing** - Process up to 15 images in parallel\
✅ **Fast** - 12-15 seconds per image

***

### Supported Formats

**Images:** PNG, JPG, JPEG, WEBP (GIF not supported)\
**Languages:** 100+ including Urdu, Arabic, English, Chinese, Hindi, Spanish, French, German

### Output Formats

The server supports two output formats optimized for different use cases:

#### JSON Format (Default)

Standard structured output - easiest to parse and integrate with applications.

**Example Output:**

```json
{
  "model": "Qwen/Qwen3-VL-30B",
  "image_count": 1,
  "total_time_seconds": 3.91,
  "results": [
    {
      "index": 0,
      "data": {
        "language_detected": "ar",
        "description_text": "TURKISH CORNER Date:6/10/2019 Time:6:56 PM Table:B12 Ticket No:243 -1Homus حمص 1-Mutabel متبل 1-Baba Ghanouj بابا غنوج 1-Fatoush فتوش 1-Olive Salad سلطة زيتون 1-Green Salad سلطة خضراء 1-Grapes Leaves ورق عنب 1-Tabouleh تبولة 1-Vegetable with Youghurt Salad سلطة خضار باللبن 1-Hot Salad سلطة حارة Total: 8.00 Cash 8.00 THANK YOU",
        "price_1": "8.00",
        "price_2": "8.00"
      },
      "processing_time": 3.91
    }
  ]
}
```

#### TOON Format (Token-Efficient)

Compact notation that **saves ~30% tokens** - ideal for LLM processing and cost optimization.

**Example Output:**

```
model: Qwen/Qwen3-VL-30B-A3B-Instruct
image_count: 1
total_time_seconds: 3.76
results:
  [1]{index,data,processing_time}:
    0,{'language_detected': 'ar', 'description_text': 'TURKISH CORNER Date:6/10/2019 Time:6:56 PM Table:B12 Ticket No:243 -1Homus حمص 1-Mutabel متبل 1-Baba Ghanouj بابا غنوج 1-Fatoush فتوش 1-Olive Salad سلطة زيتون 1-Green Salad سلطة خضراء 1-Grapes Leaves ورق عنب 1-Tabouleh تبولة 1-Vegetable with Youghurt Salad سلطة خضار باللبن 1-Hot Salad سلطة حارة Total: 8.00 Cash 8.00 THANK YOU', 'price_1': '8.00', 'price_2': '8.00'},3.76
```

**When to use each format:**

- **JSON**: Standard API integration, automated parsing, strict schema validation
- **TOON**: Sending to LLMs for analysis, reducing token costs, human-readable logs

***

### Use Cases

- **Financial documents**: Invoices, receipts, bills
- **Multi-column tables**: Spreadsheets, reports
- **Multilingual documents**: Documents with Arabic, Urdu, Chinese, and other scripts
- **Form extraction**: Structured data from forms

***

### Python API Usage

#### Installation

```bash
pip install apify-client
```

#### Basic Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

## Extract text from image
run_input = {
    "images": ["https://example.com/receipt.jpg"],
    "output_format": "json"  # or "toon"
}

run = client.actor("accelerationengg/vision-ocr-mcp").call(run_input=run_input)

## Get results
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    text = item['results'][0]['data']['description_text']
    language = item['results'][0]['data']['language_detected']
    print(f"Language: {language}\nText: {text}")
```

#### Batch Processing

```python
## Process multiple images
run_input = {
    "images": [
        "https://example.com/invoice1.jpg",
        "https://example.com/invoice2.jpg",
        "https://example.com/invoice3.jpg"
    ],
    "output_format": "json"
}

run = client.actor("accelerationengg/vision-ocr-mcp").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    for result in item['results']:
        print(f"Image {result['index']}: {result['data']['description_text'][:100]}...")
```

#### TOON Format for LLM Processing

```python
## Use TOON format to save ~30% tokens
run_input = {
    "images": ["https://example.com/receipt.jpg"],
    "output_format": "toon"
}

run = client.actor("accelerationengg/vision-ocr-mcp").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    toon_output = item['content']
    
    # Send directly to Claude for analysis
    # Uses ~30% fewer tokens than JSON
    # response = claude.messages.create(
    #     model="claude-3-5-sonnet-20241022",
    #     messages=[{
    #         "role": "user",
    #         "content": f"Analyze this receipt:\n{toon_output}"
    #     }]
    # )
```

***

### Example Usage

#### Single Image

```
Extract text from this receipt:
https://example.com/receipt.jpg
```

#### Multiple Images

```
Process these invoices:
- https://example.com/invoice1.jpg
- https://example.com/invoice2.jpg
- https://example.com/invoice3.jpg
```

***

**Built with Qwen-VL, FastMCP, Apify**

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("accelerationengg/vision-ocr-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("accelerationengg/vision-ocr-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call accelerationengg/vision-ocr-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,accelerationengg/vision-ocr-mcp"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/SGkuL4VPnU1b0jBFu/builds/NrulQmsboREiWkWsl/openapi.json
