Mistral OCR MCP Server
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., "@Mistral OCR MCP Server Extract text from ~/Documents/invoice.pdf"
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.
Mistral OCR MCP Server
A Model Context Protocol (MCP) server that provides OCR (Optical Character Recognition) functionality using Mistral's OCR API. This server allows you to extract text content from PDF files and images through MCP-compatible clients like Cursor and Claude Desktop.
π For more context and practical usage examples, read the related article: How I Use Mistral Document AI to Consolidate My Notes
Usage example flowchart

Related MCP server: Mistral OCR MCP Server
Features
Extract text from PDF files and images (JPG, JPEG, PNG, TIFF, BMP)
Returns structured content with page-by-page breakdown
Integrates seamlessly with MCP clients
Built with FastMCP for optimal performance
Prerequisites
uv package manager
Python 3.10.1 or higher
Mistral API Key : https://console.mistral.ai/api-keys
Installation
Clone the repository:
git clone https://github.com/lemopian/mistral-ocr-mcp.git cd mistral-ocr-mcpInstall dependencies using uv:
uv syncSet up environment variables: Create a
.envfile in the project root:echo "MISTRAL_API_KEY=your_mistral_api_key_here" > .env
Configuration for MCP Clients
Add the following configuration to your MCP client config file:
{
"mcpServers": {
"mistral-ocr": {
"command": "/Users/yourusername/.local/bin/uv",
"args": [
"--directory",
"/path/to/mistral-ocr-mcp",
"run",
"main.py"
]
}
}
}Important: Replace /path/to/mistral-ocr-mcp with the actual path to your cloned repository.
Usage
Once configured, the server provides the following tool:
extract_file_content
Extracts text content from PDF files and images.
Parameters:
file_path(string): Local path to the PDF or image file
Returns:
Extracted text content as a string
Supported formats:
PDF files (
.pdf)Image files (
.jpg,.jpeg,.png,.tiff,.bmp)
Example usage :
Please extract the text from this document: /path/to/your/document.pdfDevelopment
Running the server directly
uv run main.pyProject structure
mistral-ocr-mcp/
βββ mistral_ocr/ # Package directory
β βββ __init__.py # Package initialization
β βββ extractor.py # Mistral OCR functionality
βββ docs/ # Documentation
β βββ flowchart.png # Architecture flowchart
βββ main.py # MCP server implementation
βββ pyproject.toml # Project dependencies and configuration
βββ uv.lock # Dependency lock file
βββ .env # Environment variables (create this)
βββ .gitignore # Git ignore rules
βββ README.md # This fileEnvironment Variables
MISTRAL_API_KEY: Your Mistral API key (required)
Troubleshooting
"MISTRAL_API_KEY must be set" error:
Ensure you've created a
.envfile with your Mistral API keyVerify the API key is valid
"File not found" error:
Check that the file path is correct and accessible
Ensure the file format is supported
MCP connection issues:
Verify the path to
uvis correct in your MCP configurationEnsure the repository path is absolute and correct
Check that all dependencies are installed with
uv sync
Available Tools
1 toolextract_file_contentB
Extract content from a PDF or image file using Mistral OCR.
Args:
file_path: Local path to the file (PDF or image)
Returns:
Dictionary containing the extraction results
Inputs: file_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 1 tool
Only one tool exists, so there is no chance of confusion between tools.
With a single tool, naming consistency is inherently perfect.
A single tool for OCR extraction is well-scoped for a focused server.
The server covers the core OCR task but lacks additional capabilities like batch processing or format listing, making it minimally complete.
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Convert PDF, Word, Excel and scanned documents to Markdown, tables and RAG chunks. OCR.
OCR text from images and scanned PDFs; pay-per-event via your Apify account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables Claude to perform OCR on local files using Mistral AI's document processing capabilities. It converts documents and images into markdown format for seamless analysis and interaction.-
- AlicenseAqualityDmaintenanceExtracts text and images from PDFs and image files using the Mistral OCR API, with a security sandbox for file writes.4MIT
- AlicenseNot gradedqualityBmaintenanceConverts documents and images to Markdown using Mistral AI's OCR, enabling AI-powered document processing via MCP-compatible clients like Claude Desktop.60 npm2MIT
- FlicenseNot gradedqualityDmaintenanceProvides OCR capabilities for images and PDFs using Mistral AI's OCR API, supporting both local files and URLs with output in markdown or JSON format.-