mcp-ocr
MCP OCR Server
Documentation
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-ocrTesseract 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_ocr2. 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-ocr2. Set up development environment:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .3. Run tests:
pytestContributing
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
Frequently asked questions
What is mcp-ocr?
mcp-ocr is MCP OCR Server
How do I install mcp-ocr?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-ocr open source?
Yes — it is hosted on GitHub at https://github.com/rjn32s/mcp-ocr and has 40 stars.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Automate browser based workflows with AI
Hindsight: Agent Memory That Learns
A privacy-first app that strips AI watermarks from content you own.
Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.
The power of Claude Code / GeminiCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP