daevosDev/markitdown-mcp-ocr
3.1
If you are the rightful owner of markitdown-mcp-ocr and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MarkItDown-MCP is a robust Model Context Protocol server designed for document conversion with OCR capabilities, leveraging Tesseract OCR for text extraction.
MarkItDown-MCP with OCR Support
A powerful MCP (Model Context Protocol) server that provides document conversion capabilities with OCR support using Tesseract OCR.
Features
- Document Conversion: Convert various document formats to markdown
- OCR Support: Extract text from images using Tesseract OCR
- Multiple Languages: Support for English and French OCR
- Docker Support: Ready-to-use Docker containers
- SSE Mode: Server-Sent Events support for real-time updates
Quick Start
Using Docker (Recommended)
Basic Docker Image
# Build the basic image
docker build -t markitdown-mcp .
# Run the container
docker run -p 3001:3001 --name markitdown-mcp markitdown-mcp
OCR-Enabled Docker Image
# Build the OCR-enabled image
docker build -f Dockerfile.ocr -t markitdown-mcp-ocr .
# Run the OCR container with volume mounting
docker run -p 3002:3001 -v $(pwd)/TEST:/app/test_files --name markitdown-mcp-ocr markitdown-mcp-ocr
Alternative OCR Configuration
# Build the alternative OCR image
docker build -f Dockerfile.test-ocr-fixed -t markitdown-mcp-ocr-fixed .
# Run with SSE on port 8000
docker run -p 8000:8000 -v $(pwd)/TEST:/app/test_files --name markitdown-mcp-sse markitdown-mcp-ocr-fixed
Manual Installation
Prerequisites
- Python 3.11+
- Tesseract OCR (for OCR support)
Install Dependencies
pip install -r requirements.txt
Run the Server
# Standard HTTP mode
markitdown-mcp --http --host 0.0.0.0 --port 3001
# SSE mode
python server.py
Usage
API Endpoints
- HTTP Mode:
http://localhost:3001/mcp
- SSE Mode:
http://localhost:8000
Testing OCR
- Place test images in the
TEST/
directory - Use the provided test scripts:
python test-ocr-fix.py
Docker Compose
Use the provided docker-compose.yml
for easy deployment:
docker-compose up -d
File Structure
markitdown-mcp/
āāā Dockerfile # Basic Docker configuration
āāā Dockerfile.ocr # OCR-enabled Docker configuration
āāā Dockerfile.test-ocr-fixed # Alternative OCR configuration
āāā docker-compose.yml # Docker Compose setup
āāā requirements.txt # Python dependencies
āāā server.py # SSE server script
āāā test-ocr-fix.py # OCR testing script
āāā TEST/ # Test files directory
ā āāā demo-ocr-test.png
ā āāā test-ocr-fr.png
ā āāā ...
āāā README.md # This file
Configuration
Environment Variables
HOST
: Server host (default: 0.0.0.0)PORT
: Server port (default: 3001 for HTTP, 8000 for SSE)
OCR Languages
The OCR configuration supports:
- English (
eng
) - French (
fra
)
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with Docker
- Submit a pull request
License
This project is licensed under the MIT License.