MCP ExplorerExplorer

Mcp Ocr

@rjn32son 10 months ago
5 MIT
FreeCommunity
AI Systems
MCP OCR Server provides OCR capabilities via a simple interface, supporting multiple input types and languages.

Overview

What is Mcp Ocr

mcp-ocr is a production-grade OCR server built using the Model Context Protocol (MCP) that provides Optical Character Recognition capabilities through a simple interface.

Use cases

Use cases for mcp-ocr include extracting text from scanned documents, processing images from web URLs, and converting images with text into editable formats.

How to use

To use mcp-ocr, install it via pip, start the server with ‘python -m mcp_ocr’, and use the ‘perform_ocr’ function to extract text from images, whether from files, URLs, or raw bytes.

Key features

Key features include text extraction from images using Tesseract OCR, support for multiple input types (local files, URLs, raw bytes), automatic Tesseract installation, multi-language support, and production-ready error handling.

Where to use

mcp-ocr can be used in various fields such as document processing, automated data entry, image analysis, and any application requiring text extraction from images.

Content

MCP OCR Server

PyPI
Downloads

A production-grade OCR server built using MCP (Model Context Protocol) that provides OCR capabilities through a simple interface.

Features

  • Extract text from images using Tesseract OCR
  • Support for multiple input types:
    • Local image files
    • Image URLs
    • Raw image bytes
  • Automatic Tesseract installation
  • Support for multiple languages
  • Production-ready error handling

Installation

# Using pip
pip install mcp-ocr

# Using uv
uv pip install mcp-ocr

Tesseract will be installed automatically on supported platforms:

  • macOS (via Homebrew)
  • Linux (via apt, dnf, or pacman)
  • Windows (manual installation instructions provided)

Usage

As an MCP Server

  1. Start the server:
python -m mcp_ocr
  1. Configure Claude for Desktop:
    Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "ocr": {
      "command": "python",
      "args": [
        "-m",
        "mcp_ocr"
      ]
    }
  }
}

Available Tools

perform_ocr

Extract text from images:

# From file
perform_ocr("/path/to/image.jpg")

# From URL
perform_ocr("https://example.com/image.jpg")

# From bytes
perform_ocr(image_bytes)

get_supported_languages

List available OCR languages:

get_supported_languages()

Development

  1. Clone the repository:
git clone https://github.com/rjn32s/mcp-ocr.git
cd mcp-ocr
  1. Set up development environment:
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .
  1. Run tests:
pytest

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security

  • Never commit API tokens or sensitive credentials
  • Use environment variables or secure credential storage
  • Follow GitHub’s security best practices

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers