Mistral OCR MCP Server
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., "@Mistral OCR MCP ServerExtract 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
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations; description only names the technology (Mistral OCR) but fails to disclose potential limitations, errors, or side effects (e.g., file size, network dependency).
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?
Short but includes redundant docstring sections (Args, Returns) that don't add value for an agent. Purpose is front-loaded.
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?
No output schema; mentions 'Dictionary containing the extraction results' without details. Lacks error handling, format constraints, or beyond-basic behavior. Incomplete for a production 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?
Adds significant meaning to the file_path parameter: clarifies it's a local path and acceptable file types (PDF or image). Schema has 0% coverage, so this is valuable.
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?
Clearly states verb 'extract', resource 'content from file', and specifies file types PDF or image using Mistral OCR. Distinct and specific.
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 on when to use this tool versus alternatives or when not to use. No mention of prerequisites or context.
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.
1 tool update
v0.1.0- First observed
extract_file_content
TDQS
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
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
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.
OCR and document understanding: extract text from images, then summarize or translate it.
Generate PDFs from templates via AI chat. Works with Claude, ChatGPT, Cursor, and any MCP client.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to extract and read content from PDF documents using Mistral AI's OCR capabilities. Provides intelligent caching and returns clean markdown text for easy integration with AI workflows.21MIT
- 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.-
- AlicenseAqualityBmaintenanceExtracts text and images from PDFs and image files using the Mistral OCR API, with a security sandbox for file writes.4MIT
- AlicenseNot gradedqualityAmaintenanceConverts documents and images to Markdown using Mistral AI's OCR, enabling AI-powered document processing via MCP-compatible clients like Claude Desktop.2742MIT
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/lemopian/mistral-ocr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server