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.4.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.4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fast_paddleocr_mcp-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 c18dff54ce349bee4e85bb1aeaa7ea363bb8ad423bd529ddd3ab5ccaf6600d4f
MD5 09075047f96c829b31d227a904343b04
BLAKE2b-256 dcd7947202c397c0fadac5969dce9060213c6b56907f42c20437f22ffbf9bb18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fast_paddleocr_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 282884fd5b74e26f444dd88cefb63903e3a291297466a2810581ff53231fc68f
MD5 5c8b8bf846319deb73905e6bd470b266
BLAKE2b-256 0d935e01feb4fd4d37b981882b343be0961a404c4327ae1e5dd749d755212373

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