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 "Install 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 Serverextract 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 识别结果
| Name | Required | Description | Default |
|---|---|---|---|
| rotate | No | ||
| binarize | No | ||
| image_paths | Yes | ||
| auto_enhance | No | ||
| output_format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses processing behaviors such as auto_enhance, rotate (based on EXIF), and binarize, and mentions returns, but it doesn't describe limitations, error handling, or performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a well-structured docstring with clear Args and Returns sections, front-loaded purpose, and no unnecessary prose. Every sentence contributes useful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides a good overview but lacks a detailed return structure (no output schema) and doesn't explain how the returned results are organized. Additionally, it doesn't position the tool relative to its siblings, leaving some usage context unclear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The Args section explains all five parameters with meaningful descriptions despite 0% schema description coverage. For example, output_format lists allowed values (plain/json/markdown/structured) and rotate specifies EXIF-based rotation. This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states '批量 OCR - 对多张图像执行 OCR 识别' (Batch OCR - perform OCR on multiple images), using a specific verb and resource with batch scope. This distinguishes it from the sibling tools ocr_by_path, ocr_by_content, and ocr_by_url, which are likely for single images.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for multiple images but does not explicitly state when to use this tool vs alternatives. It lacks a clear 'when not to use' or mention of sibling tools for single-image scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ocr_by_contentA
对 Base64 编码的图像执行 OCR 识别。
Args:
image_base64: Base64 编码的图像(支持 data:image/... 前缀)
output_format: 输出格式 (plain/json/markdown/structured)
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
OCR 识别结果
| Name | Required | Description | Default |
|---|---|---|---|
| rotate | No | ||
| binarize | No | ||
| auto_enhance | No | ||
| image_base64 | Yes | ||
| output_format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavior. It does explain the effects of parameters like auto_enhance ('automatically enhance contrast and sharpness'), rotate ('based on EXIF'), and binarize, which adds some behavioral context. However, it does not disclose limitations (e.g., image size, supported formats), error handling, or whether the image is stored or transmitted beyond the operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and begins with a clear one-sentence summary. The parameter list is structured and each item is explained concisely. It does repeat parameter names already present in the schema, but adds necessary semantic value, so the length is justified. The Returns section is brief but present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 5 parameters, no annotations, and no output schema. The description covers all parameters and states the return type as 'OCR 识别结果', but this is vague. It does not specify the exact structure of the result (especially for output_format=json or structured), nor does it mention input constraints or error scenarios. Given the absence of an output schema, more detail about the return value would be valuable, so completeness is only moderate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameter descriptions (coverage 0%), so the description must compensate. It does so thoroughly: image_base64 is described as Base64 encoded with support for data:image/ prefix, output_format lists the valid values (plain/json/markdown/structured), and auto_enhance, rotate, and binarize each have plain-language meanings. This fully explains the parameters beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: '对 Base64 编码的图像执行 OCR 识别' (perform OCR on Base64-encoded images). It specifies both the action (OCR) and the resource (Base64 image), and the name 'by_content' distinguishes it from sibling tools like ocr_by_path and ocr_by_url.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus the alternatives. The description does not mention ocr_by_path, ocr_by_url, or ocr_batch, nor does it explicitly state that this tool is for Base64 input as opposed to file paths or URLs. The name implies the distinction, but the description itself offers no usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ocr_by_pathA
对本地图像文件执行 OCR 识别。
Args:
image_path: 图像文件的绝对路径或相对路径
output_format: 输出格式 (plain/json/markdown/structured)
auto_enhance: 自动增强图像对比度和锐度
rotate: 自动旋转图像(基于 EXIF)
binarize: 二值化图像
Returns:
OCR 识别结果
| Name | Required | Description | Default |
|---|---|---|---|
| rotate | No | ||
| binarize | No | ||
| image_path | Yes | ||
| auto_enhance | No | ||
| output_format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It explains the operation on local files and details the preprocessing options (auto_enhance, rotate, binarize), but it does not mention error behavior, access requirements, or the nature of the return value beyond 'OCR 识别结果'. This is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a concise one-line purpose followed by a bulleted Args list and a Returns line. Every sentence earns its place, and there is no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential elements: purpose, all parameters, and the return value. With no output schema and no annotations, it handles complexity reasonably well. It could be improved by mentioning supported image formats or error handling, but the core usage is adequately specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully compensates by explaining each parameter: image_path (absolute/relative path), output_format (plain/json/markdown/structured), auto_enhance (enhance contrast/sharpness), rotate (based on EXIF), and binarize. This adds significant meaning beyond the bare schema titles and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: '对本地图像文件执行 OCR 识别' (perform OCR on local image files). This specifies both the verb (perform OCR) and the resource (local image files), and the 'local' qualifier effectively distinguishes it from sibling tools like ocr_by_url and ocr_by_content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly indicates the tool is for local image files, giving context for when to use it. However, it does not explicitly mention alternatives or state when NOT to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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 识别结果
| Name | Required | Description | Default |
|---|---|---|---|
| rotate | No | ||
| binarize | No | ||
| image_url | Yes | ||
| use_cache | No | ||
| auto_enhance | No | ||
| output_format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses behavioral traits like rotation based on EXIF, binarization, and auto-enhancement, which adds value. However, it does not mention potential side effects, error handling, redirect behavior, or details of the return result beyond a vague 'OCR recognition result.'
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently organized as an Args list, with each line earning its place. It is front-loaded with the main purpose and avoids redundant filler, maintaining a compact and scannable format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the parameter details are solid, the absence of an output schema means the description should clarify return value structure or formats. It only states 'OCR recognition result' without explaining differences between output formats or error cases, leaving some contextual gaps for a 6-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description fully compensates by explaining each parameter's purpose, including enumerating output_format options (plain/json/markdown/structured). This goes well beyond the schema's bare types and defaults, adding meaningful context for correct invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Perform OCR recognition on URL images' using a specific verb and resource. It distinguishes from sibling tools like ocr_by_path and ocr_by_content by explicitly targeting URL-based images.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied via the tool name and description (use for images accessible via URL), but there is no explicit guidance on when to prefer this over alternatives or any exclusions. It lacks the explicit alternative naming seen in high-quality examples.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
ocr_batch - First observed
ocr_by_content - First observed
ocr_by_path - First observed
ocr_by_url
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
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.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
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.17MIT
- AlicenseNot gradedqualityDmaintenanceHigh-performance OCR server using native Tesseract (C++) for text extraction from images, integrable with ChatGPT Desktop and other MCP clients.11MIT
- AlicenseNot gradedqualityBmaintenanceA 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.2MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitfarer/rapidocr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server