RM

rjn32s/mcp-ocr

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

40 stars 10 forks Качество 76 Тренд 4MIT

rjn32s/mcp-ocr - кандидат на сервер MCP, импортированный из https://github.com/rjn32s/mcp-ocr.

Обзор

rjn32s/mcp-ocr - кандидат на сервер MCP, импортированный из https://github.com/rjn32s/mcp-ocr.

Обзор (машинный перевод)

Сервер OCR производственного уровня, построенный с использованием MCP (Model Context Protocol), который обеспечивает возможности OCR через простой интерфейс.

Особенности

Извлекать текст из изображений с помощью Tesseract OCR Поддержка нескольких типов ввода:

  • Локальные файлы изображений
  • URL изображения Сырые байты изображений
  • Автоматическая установка Tesseract Поддержка нескольких языков
  • Готовая к производству обработка ошибок

##Установка

Tesseract будет автоматически установлен на поддерживаемых платформах:

  • macOS (через Homebrew) Linux (через apt, dnf или pacman) Windows (ручные инструкции по установке)

Использование

###Как MCP-сервер

1.Запустите сервер:

2.Настройка Claude для рабочего стола: Добавить [[Т0]]:

Доступные инструменты

####Perform ocr Извлечь текст из изображений:

get supported языки

Список доступных языков OCR:

##Развитие

  1. Клонировать хранилище:

  2. Создание условий для развития:

  3. Проведите тесты:

# Вклад

  1. Вилка хранилища
  2. Создайте свою ветвь функций git checkout -b feature/amazing-feature
  3. Соблюдайте изменения ([T2])

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

MCP OCR Server

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

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "ocr": { "command": "python", "args": ["-m", "mcp_ocr"] } } }