Skip to main content

Fast PaddleOCR MCP server - Extract text from images using PaddleOCR with optimized performance

Project description

PaddleOCR-MCP

PaddleOCR MCP (Model Context Protocol) server that extracts text from images and outputs results in markdown format. Optimized for fast inference with GPU auto-detection.

Installation

Using uvx (Recommended - No Installation Needed)

# Run MCP server directly
uvx fast-paddleocr-mcp

Or Install from PyPI

pip install fast-paddleocr-mcp
fast-paddleocr-mcp

MCP Server Configuration

MCP Tool: ocr_image

The server provides a single tool called ocr_image that:

  • Input: image_path (string) - Path to the input image file
  • Output: Returns the path to the generated markdown file containing OCR results

Integration with MCP Clients

To use this server with an MCP client (like Cursor, Claude Desktop, etc.), configure it in your MCP settings:

{
  "mcpServers": {
    "paddleocr": {
      "command": "uvx",
      "args": ["fast-paddleocr-mcp"]
    }
  }
}

MCP Request/Response Example

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ocr_image",
    "arguments": {
      "image_path": "test_image.png"
    }
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "test_image.png.md"
      }
    ]
  }
}

Default Optimization Settings

The MCP server uses optimized default settings for fast inference:

  • Fast mode enabled: Disables textline orientation classification (skips one model)
  • PP-OCRv4: Uses faster mobile models (PP-OCRv4_mobile_det, PP-OCRv4_mobile_rec)
  • 640px image size limit: Faster processing (vs default 960px)
  • Auto GPU detection: Automatically uses GPU if available, falls back to CPU
  • Document preprocessing disabled: Skips unnecessary preprocessing steps

Output Format

The generated markdown file contains:

  • Source image path
  • List of detected text (one per line)

Example output (test_image.png.md):

# OCR Result

**Source Image:** `test_image.png`

---

- HelloPaddleOcR
- 10000C

Requirements

  • Python >= 3.8
  • PaddleOCR
  • PaddlePaddle
  • Pillow

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_paddleocr_mcp-0.1.5.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_paddleocr_mcp-0.1.5-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file fast_paddleocr_mcp-0.1.5.tar.gz.

File metadata

  • Download URL: fast_paddleocr_mcp-0.1.5.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fast_paddleocr_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 bd6932a53602d4b7a61db0d5cd4addbe905186227f472d2b7daf99f56381a8d8
MD5 e015b53032c4af8eedf3ae83169818ca
BLAKE2b-256 0afd7ac44f8fc1db8ff0d26562f2d0d9d46a99cb4913eb58a18e70b234356a99

See more details on using hashes here.

File details

Details for the file fast_paddleocr_mcp-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_paddleocr_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6e23b0b5d195005af0de7a7120271a64daf0ae57a4269af1fc5d4e100f6e4e
MD5 b1473c6414e36454f13cfb790ffbc374
BLAKE2b-256 b7d58b85daf72feb18aa0b2932ae22722602d408d5e4eee98c7aaf89c1f2787f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page