mcp-mistral-ocr
MCP Mistral OCR
一个使用 Mistral AI 的 OCR API 提供 OCR 功能的 MCP 服务器。该服务器可以处理本地文件和 URL,并支持图像和 PDF。
特征
使用 Mistral 的 OCR 处理本地文件(图像和 PDF)
处理来自具有明确文件类型规范的 URL 的文件
支持多种文件格式(JPG、PNG、PDF等)
结果保存为带有时间戳的 JSON 文件
Docker 容器化
UV包管理
Related MCP server: Mistral OCR MCP Server
环境变量
MISTRAL_API_KEY:您的 Mistral AI API 密钥OCR_DIR:本地文件处理的目录路径。在容器内部,此目录始终映射到/data/ocr
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Mistral OCR:
npx -y @smithery/cli install @everaldo/mcp/mistral-crosswalk --client claude使用 Docker
构建 Docker 镜像:
docker build -t mcp-mistral-ocr .运行容器:
docker run -e MISTRAL_API_KEY=your_api_key -e OCR_DIR=/data/ocr -v /path/to/local/files:/data/ocr mcp-mistral-ocr本地开发
安装 UV 包管理器:
pip install uv创建并激活虚拟环境:
uv venv
source .venv/bin/activate # On Unix
# or
.venv\Scripts\activate # On Windows安装依赖项:
uv pip install .Claude桌面配置
将此配置添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"mistral-ocr": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MISTRAL_API_KEY",
"-e",
"OCR_DIR",
"-v",
"C:/path/to/your/files:/data/ocr",
"mcp-mistral-ocr:latest"
],
"env": {
"MISTRAL_API_KEY": "<YOUR_MISTRAL_API_KEY>",
"OCR_DIR": "C:/path/to/your/files"
}
}
}
}可用工具
1. process_local_file
从配置的 OCR_DIR 目录中处理文件。
{
"name": "process_local_file",
"arguments": {
"filename": "document.pdf"
}
}2. process_url_file
处理来自 URL 的文件。需要明确指定文件类型。
{
"name": "process_url_file",
"arguments": {
"url": "https://example.com/document",
"file_type": "image" // or "pdf"
}
}输出
OCR 结果以 JSON 格式保存在OCR_DIR output目录中。每个结果文件使用以下格式命名:
对于本地文件:
{original_filename}_{timestamp}.json对于 URL:如果在 URL 中未找到文件名,则为
{url_filename}_{timestamp}.json或url_document_{timestamp}.json
时间戳格式为YYYYMMDD_HHMMSS 。
支持的文件类型
图像:JPG、JPEG、PNG、GIF、WebP
文档:PDF 和 Mistral OCR 支持的其他文档格式
限制
最大文件大小:50MB(由 Mistral API 强制执行)
最大文档页数:1000(由 Mistral API 强制执行)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
OCR text from images and scanned PDFs; pay-per-event via your Apify account.
OCR images and PDFs from a link into text, Markdown or structured JSON, and read past jobs
Extract text from images with OCR: plain text plus every line or word with its box
OCR and document understanding: extract text from images, then summarize or translate it.
Related MCP Servers
- AlicenseAqualityDmaintenanceConverts PDF files from local storage or URLs to structured Markdown format using Mistral AI's OCR API, preserving document structure and extracting images.21MIT
- FlicenseAqualityDmaintenanceExtracts text content from PDFs and images using Mistral's OCR API, enabling OCR capabilities in MCP-compatible clients like Cursor and Claude Desktop.18-
- AlicenseAqualityDmaintenanceExtracts text and images from PDFs and image files using the Mistral OCR API, with a security sandbox for file writes.451 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceConverts documents and images to Markdown using Mistral AI's OCR, enabling AI-powered document processing via MCP-compatible clients like Claude Desktop.48 npm2MIT