RM

rjn32s/mcp-ocr

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

40 stars 10 forks 品質 76 トレンド 4MIT

rjn32s/mcp-ocr は [https://github.com/rjn32s/mcp-ocr.] からインポートされた MCP サーバーの候補です

概要

rjn32s/mcp-ocr は [https://github.com/rjn32s/mcp-ocr.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

MCP (Model Context Protocol) を使用して構築された OCR サーバーは、シンプルなインターフェイスで OCR 機能を提供します。

##特徴

  • Tesseract OCRを使用して画像からテキストを抽出する
  • 複数の入力タイプのためのサポート:
  • ローカルイメージファイル
  • 画像URL
  • 未加工イメージのバイト
  • 自動Tesseractの取付け
  • 多言語対応
  • 生産準備のエラー処理

インストール

Tesseract はサポートされているプラットフォームで自動的にインストールされます。

  • macOS(Homebrew経由)
  • Linux(apt、dnf、またはpacman)
  • Windows (提供される手動インストール手順)

使用法

##MCP サーバーとして

  1. サーバーを始めて下さい:

  2. デスクトップ用のClaudeの設定: ~/Library/Application Support/Claude/claude_desktop_config.json に追加します。

利用可能なツール

###実行 ocr 画像からテキストを抽出:

###get supported languages####get supported languages######get supported languages#######get supported languages######get supported languages#######get supported languages#######get supported languages#########get supported languages##########get supported languages########get supported languages########################################get supported language######get language################################################################ 利用可能な OCR 言語のリスト:

開発

  1. リポジトリのクローン化:

  2. 開発環境をセットアップして下さい:

  3. テストを実行して下さい:

投稿

  1. リポジトリをフォークする
  2. 機能ブランチを作成する([git checkout -b feature/amazing-feature])
  3. 変更をコミット([git commit -m 'Add amazing feature')

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

GitHub で README 全文を見る

インストール

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"] } } }