Mistral OCR
STDIOMCP server providing OCR capabilities using Mistral AI's API for images and PDFs.
MCP server providing OCR capabilities using Mistral AI's API for images and PDFs.
An MCP server that provides OCR capabilities using Mistral AI's OCR API. This server can process both local files and URLs, supporting images and PDFs.
MISTRAL_API_KEY
: Your Mistral AI API keyOCR_DIR
: Directory path for local file processing. Inside the container, this is always mapped to /data/ocr
To install Mistral OCR for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @everaldo/mcp/mistral-crosswalk --client claude
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
pip install uv
uv venv source .venv/bin/activate # On Unix # or .venv\Scripts\activate # On Windows
uv pip install .
Add this configuration to your 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" } } } }
Process a file from the configured OCR_DIR directory.
{ "name": "process_local_file", "arguments": { "filename": "document.pdf" } }
Process a file from a URL. Requires explicit file type specification.
{ "name": "process_url_file", "arguments": { "url": "https://example.com/document", "file_type": "image" // or "pdf" } }
OCR results are saved in JSON format in the output
directory inside OCR_DIR
. Each result file is named using the following format:
{original_filename}_{timestamp}.json
{url_filename}_{timestamp}.json
or url_document_{timestamp}.json
if no filename is found in the URLThe timestamp format is YYYYMMDD_HHMMSS
.