RapidOCR MCP Server
Provides OpenTelemetry tracing for distributed monitoring and observability of the OCR server.
Exposes Prometheus metrics for monitoring server performance and OCR operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RapidOCR MCP Server extract text from screenshot.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: mcp-ocrspace
Quick Start
Global Installation
# Install globally with uvx (recommended)
uvx rapidocr-mcp
# Or install globally with pip
pip install rapidocr-mcpLocal Development
# Install dependencies
uv sync
# Run MCP server (stdio mode)
uv run rapidocr-mcp
# Run FastAPI server
uv run rapidocr-mcp --mode fastapi --port 8080Configuration
Set environment variables with RAPIDOCR_ prefix:
export RAPIDOCR_LANG=ch
export RAPIDOCR_LOG_LEVEL=INFO
export RAPIDOCR_API_KEY=your-keyMCP Configuration
Available Tools
Tool | Description |
| OCR for local image file by path |
| OCR for Base64 encoded image |
| OCR for image from HTTP/HTTPS URL |
| 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-mcpDocker
docker-compose -f docker/docker-compose.yml upAPI 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!
License
MIT
Available Tools
4 toolsocr_batchA
批量 OCR - 对多张图像执行 OCR 识别。
Args:
image_paths: 图像文件路径列表
output_format: 输出格式 (plain/json/markdown/structured)
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
所有图像的 OCR 识别结果
Inputs: image_paths (required), rotate, binarize, auto_enhance, +1 more.
ocr_by_contentA
对 Base64 编码的图像执行 OCR 识别。
Args:
image_base64: Base64 编码的图像(支持 data:image/... 前缀)
output_format: 输出格式 (plain/json/markdown/structured)
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
OCR 识别结果
Inputs: image_base64 (required), rotate, binarize, auto_enhance, +1 more.
ocr_by_pathA
对本地图像文件执行 OCR 识别。
Args:
image_path: 图像文件的绝对路径或相对路径
output_format: 输出格式 (plain/json/markdown/structured)
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
OCR 识别结果
Inputs: image_path (required), rotate, binarize, auto_enhance, +1 more.
ocr_by_urlA
对 URL 图像执行 OCR 识别。
Args:
image_url: 图像的 HTTP/HTTPS URL
output_format: 输出格式 (plain/json/markdown/structured)
use_cache: 是否使用 URL 缓存
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
OCR 识别结果
Inputs: image_url (required), rotate, binarize, use_cache, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct input source: local file path, base64 content, URL, and batch of paths. The descriptions clearly differentiate the tools, and the batch tool's multi-image purpose avoids confusion with single-image processing.
Three tools follow the 'ocr_by_<source>' pattern clearly, but 'ocr_batch' deviates by omitting 'by'. This is a minor inconsistency that does not harm readability.
Four tools are well-scoped for an OCR server, covering the primary input methods (file, content, URL, batch) without unnecessary redundancy. The count feels complete and focused.
The tool surface covers the core OCR workflows for local files, base64 data, URLs, and batch processing. There are no obvious gaps for a typical OCR use case, making the set comprehensive.
Maintenance
Related MCP Connectors
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
OCR.space MCP — wraps the OCR.space API (ocr.space) for image/PDF → text OCR.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides OCR capabilities using the EasyOCR library, supporting over 80 languages and GPU acceleration. It enables processing images from base64 strings, local files, or URLs with options for text-only or detailed coordinate and confidence output.2Apache 2.0
- AlicenseNot gradedqualityCmaintenanceOCR.space MCP server that enables image and PDF text extraction via the OCR.space API.167 npmMIT
- AlicenseNot gradedqualityDmaintenanceHigh-performance OCR server using native Tesseract (C++) for text extraction from images, integrable with ChatGPT Desktop and other MCP clients.11MIT
- AlicenseCqualityDmaintenanceA local OCR MCP server that extracts text from images using PP-OCRv6 for fast text extraction and VL-1.6 for document structure analysis, with automatic model routing and GPU detection.32MIT