RapidOCR MCP Server
High-performance OCR MCP server supporting multiple input modes (path, base64, URL, upload), batch processing, and output formats like plain, JSON, and Markdown.
README
RapidOCR MCP Server
High-performance OCR MCP Server.
Features
- Multi-mode: MCP stdio, FastAPI HTTP, streamable-http
- Multi-input: Path, Base64, URL, File upload
- Batch OCR: Process multiple images in one request
- Output formats: Plain, JSON, Markdown, Structured
- Image preprocessing: Auto-enhance, rotate, binarize
- Security: Path whitelist, API key, CORS, audit logging
- Monitoring: Prometheus metrics, OpenTelemetry tracing
- Production-ready: Docker, CI/CD, tests
Quick Start
Global Installation
# Install globally with uvx (recommended)
uvx rapidocr-mcp
# Or install globally with pip
pip install rapidocr-mcp
Local Development
# Install dependencies
uv sync
# Run MCP server (stdio mode)
uv run rapidocr-mcp
# Run FastAPI server
uv run rapidocr-mcp --mode fastapi --port 8080
Configuration
Set environment variables with RAPIDOCR_ prefix:
export RAPIDOCR_LANG=ch
export RAPIDOCR_LOG_LEVEL=INFO
export RAPIDOCR_API_KEY=your-key
MCP Configuration
Available Tools
| Tool | Description |
|---|---|
ocr_by_path |
OCR for local image file by path |
ocr_by_content |
OCR for Base64 encoded image |
ocr_by_url |
OCR for image from HTTP/HTTPS URL |
ocr_batch |
Batch OCR for multiple images |
Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"rapidocr": {
"command": "uvx",
"args": ["rapidocr-mcp"]
}
}
}
Or with local installation:
{
"mcpServers": {
"rapidocr": {
"command": "uv",
"args": ["--directory", "/path/to/rapidocr-mcp", "run", "rapidocr-mcp"]
}
}
}
Other MCP Clients
For other MCP clients that support stdio mode, configure the command as:
uvx rapidocr-mcp
# or
rapidocr-mcp
Docker
docker-compose -f docker/docker-compose.yml up
API Endpoints
GET /health- Health checkPOST /ocr/path- OCR by file pathPOST /ocr/base64- OCR by base64POST /ocr/url- OCR by URLPOST /ocr/upload- OCR by file uploadGET /metrics- Prometheus metrics
Sponsoring
If you find this project helpful, consider buying me a coffee!
<a href="https://ko-fi.com/bitfarer" target="_blank"> <img src="https://img.shields.io/badge/Ko--fi-Buy%20me%20a%20coffee-FF5E5B?logo=ko-fi&logoColor=white&style=for-the-badge" alt="Ko-fi" /> </a>
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.