Skip to main content
Glama
uuina

Mistral OCR MCP Server

by uuina

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MISTRAL_API_KEYNoSingle Mistral API key (compatibility mode).
MISTRAL_API_KEYSNoComma-, semicolon-, or newline-separated Mistral API keys for automatic fallback.
MISTRAL_OCR_OUTPUT_DIRNoDirectory to save OCR Markdown outputs. Defaults to 'outputs/' next to server.py.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
set_api_keyC

Set one Mistral API key for this running MCP server.

set_api_keysC

Set one or more Mistral API keys for this running MCP server.

Args:
    api_keys: Comma-, semicolon-, or newline-separated API keys.
health_checkA

Check MCP configuration, key validity, output directory, and model name.

list_pagesB

Return basic local file information and PDF page count when available.

ocr_from_urlB

从公开的文档或图片 URL 中提取 Markdown 文本。

默认使用 "mistral-ocr-latest" 模型。
默认不提取图片。若需提取,需设置 include_images=True。

可调参数:
- url (str): 必填,目标文件或图片的公网 URL 地址。
- pages (str, 默认 ""): 指定需要提取的页码范围(如 "0-3"),为空表示提取所有页面。
- table_format (str, 默认 "markdown"): 表格输出格式。可选 "markdown"、"html" 或 None。
- include_images (bool, 默认 False): 是否提取图片。若开启,将返回图片信息。
- extract_header (bool, 默认 False): 是否专门解析并提取页眉。
- extract_footer (bool, 默认 False): 是否专门解析并提取页脚。
- image_limit (int, 默认 0): 限制单次提取的最大图片数量。
- image_min_size (int, 默认 0): 设置提取图片的最小尺寸限制(像素)。
ocr_from_fileA

从本地文件或图片中提取 Markdown 文本并以字符串形式返回。

默认使用 "mistral-ocr-latest" 模型。
默认不提取图片。若需提取,需设置 include_images=True。

可调参数:
- file_path (str): 必填,本地文档(如 PDF, PPTX, DOCX)或图片文件的绝对路径。
- pages (str, 默认 ""): 指定需要提取的页码范围(如 "0-3"),为空表示提取所有页面。
- table_format (str, 默认 "markdown"): 表格输出格式。可选 "markdown"、"html" 或 None。
- include_images (bool, 默认 False): 是否提取图片。若开启,将返回图片信息。
- extract_header (bool, 默认 False): 是否专门解析并提取页眉。
- extract_footer (bool, 默认 False): 是否专门解析并提取页脚。
- image_limit (int, 默认 0): 限制单次提取的最大图片数量。
- image_min_size (int, 默认 0): 设置提取图片的最小尺寸限制(像素)。
ocr_to_markdown_fileA

OCR 本地文件并将生成的 Markdown 保存至磁盘。

默认使用 "mistral-ocr-latest" 模型。
默认不提取图片。若需提取,需设置 include_images=True。
非常适用于 PDF 或较长文档的 OCR,以避免因结果过大而超出模型上下文窗口限制。

可调参数:
- file_path (str): 必填,本地文档(如 PDF, PPTX, DOCX)或图片文件的绝对路径。
- pages (str, 默认 ""): 指定需要提取的页码范围(如 "0-3"),为空表示提取所有页面。
- output_dir (str, 默认 ""): 指定保存 Markdown 文件的目录路径,若为空则使用默认输出目录。
- table_format (str, 默认 "markdown"): 表格输出格式。可选 "markdown"、"html" 或 None。
- include_images (bool, 默认 False): 是否提取图片。若开启,将返回并保存图片信息。
- extract_header (bool, 默认 False): 是否专门解析并提取页眉。
- extract_footer (bool, 默认 False): 是否专门解析并提取页脚。
- use_cache (bool, 默认 True): 是否启用缓存,已处理过的内容直接返回缓存路径。
- image_limit (int, 默认 0): 限制单次提取的最大图片数量。
- image_min_size (int, 默认 0): 设置提取图片的最小尺寸限制(像素)。
ocr_url_to_markdown_fileA

OCR 公网 URL 指向的文件并将生成的 Markdown 保存至磁盘。

默认使用 "mistral-ocr-latest" 模型。
默认不提取图片。若需提取,需设置 include_images=True。

可调参数:
- url (str): 必填,目标文件或图片的公网 URL 地址。
- pages (str, 默认 ""): 指定需要提取的页码范围(如 "0-3"),为空表示提取所有页面。
- output_dir (str, 默认 ""): 指定保存 Markdown 文件的目录路径,若为空则使用默认输出目录。
- table_format (str, 默认 "markdown"): 表格输出格式。可选 "markdown"、"html" 或 None。
- include_images (bool, 默认 False): 是否提取图片。若开启,将返回并保存图片信息。
- extract_header (bool, 默认 False): 是否专门解析并提取页眉。
- extract_footer (bool, 默认 False): 是否专门解析并提取页脚。
- use_cache (bool, 默认 True): 是否启用缓存,已处理过的内容直接返回缓存路径。
- image_limit (int, 默认 0): 限制单次提取的最大图片数量。
- image_min_size (int, 默认 0): 设置提取图片的最小尺寸限制(像素)。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 8 tools

Disambiguation4/5

Most tools have distinct purposes: health_check, list_pages, and API key management are clearly separate. The four OCR tools form two pairs (from_file vs from_url, and return string vs save to file), which are distinguishable by source and output, but could cause confusion if an agent overlooks the output difference.

Naming Consistency3/5

Naming uses a mix of patterns: 'ocr_from_file' vs 'ocr_to_markdown_file' use different prepositions for source vs destination, while 'set_api_key' and 'set_api_keys' are consistent. Overall, the names are readable but not perfectly consistent.

Tool Count5/5

8 tools cover the essential functions: health check, file listing, two OCR sources, two output options, and API key management. This is well-scoped for an OCR server without being excessive.

Completeness4/5

The tool set covers all core OCR operations (from file and URL, output as string or file) plus configuration and key management. Minor gaps exist, such as no direct model selection or cache clearing, but the main workflow is complete.

Maintenance

ActivityInactive
ResponsivenessNo issues