SuperAPI AI Directory

mistral-mcp

Use Mistral AI for chat, OCR, audio, vision, agents, embeddings, moderation, classification, files and batch jobs, with French/English prompts.

Open website

About this tool

Purpose

mistral-mcp is an MCP (Model Context Protocol) server whose core purpose is to convert documents such as invoices, contracts, and identity documents into typed JSON. It extracts fields such as vendor, total amount, line items, and due dates through Mistral chat models, and validates the response schema. For PDF and image inputs, Mistral OCR can optionally be used.

Main Capabilities

  • Six-tool core: Provides six tools by default, including chat, vision, transcription, code completion, and more.
  • Document extraction: Supports the process_document tool, which can extract structured data from text, Markdown, document URLs, base64 images, or uploaded file IDs.kind parameter supports auto(default),invoice、contract、id_document、generic.
  • OCR support: Optional Mistral OCR processes PDF, PNG, JPEG, and WebP files, with a maximum of 20 MiB per file.
  • Configuration profiles: Select one of five profiles via MISTRAL_MCP_PROFILE , with the default core used for Mistral Cloud; when customizing MISTRAL_BASE_URL , it is inferred as self-hosted unless a profile is explicitly set.
  • Caching mechanism: Cache files store extracted content,MISTRAL_MCP_CACHE_DIR sets the location, andMISTRAL_MCP_CACHE_TTL_HOURS defaults to 168 hours. Identity documents bypass the cache by default.

Usage

Environment Requirements

Requires Node.js 20+, npm, and a Mistral API key with access to the corresponding models and quota.

Installing into an MCP Client

For clients using mcpServers JSON, configure the stdio server and run npx -y mistral-mcp@1.0.0. Restart the client and refresh the tool catalog. The server reads environment variables provided by the client and does not automatically load the .env file.

Quick Start (Text or Markdown Invoice)

The example script and fixtures are source examples and are not included in the npm package. Check out the release tag from the repository root and build:

  1. Set the key and chat model in the environment or in a local .env file.
  2. The example uses dotenv to load .env. Keep the key out of version control.
  3. Choose a chat model with quota in your account; the default model quota may be zero.

The script reads text locally and calls process_documentthrough the local server's core profile, with the parameters source: { type: "text", text: "..." }、kind: "invoice" and options.cache: "bypass". The text must contain non-whitespace content and must not exceed 60,000 UTF-16 code units. Markdown and whitespace characters are preserved as-is.

When --output is not used, the validated JSON is printed; when it is used, a new file is written and the path is printed. Existing files are not overwritten. The output path is reserved before the API call and may remain empty after a failure.

OCR Routing

For PDFs or images, use the OCR route: upload the file, call process_document, and attempt to delete the uploaded content in a finally block (including after extraction failure). Requires Files, OCR, and chat access permissions and quota. Known limitation: the test account's HTTP 429 / zero OCR quota prevented live OCR verification.

Use cases

  • Extract structured data such as vendor, total, line items, and due date from text or Markdown invoices.
  • Handle automatic classification and typed extraction of contracts and identification documents.
  • MCP integration scenarios requiring chat, vision, audio transcription, and code completion.

Limitations

  • Schema validation only checks the structure and types of the response; it does not verify factual accuracy, invoice arithmetic, tax handling, or accounting correctness. Extracted fields must be reviewed against the source document before use.
  • Text must contain non-whitespace content and must not exceed 60,000 UTF-16 code units.
  • Typed extraction rejects OCR text exceeding 60,000 UTF-16 code units; split the document or use generic。
  • options.maxPages and options.minOcrConfidence apply only to OCR sources. The default 0.3 is unmeasured; OCR confidence does not establish extraction accuracy.
  • Local MCP hosting still sends extraction requests to Mistral. By default requests go to Mistral Cloud; local hosting does not localize document inference.
  • Model access and free quota depend on the account; check limits before calling.
  • Custom MISTRAL_BASE_URL does not include OCR or process_document.
  • No integrated OAuth is provided.
  • The text tests and CLI examples from 2026-09-28 used ministral-3b-latest succeeded only via chat, verifying a synthetic invoice, and are not a general accuracy or reliability rating.

Version notes

Version 1.0.0 has breaking changes from 0.11.0: the core now exposes six tools; existing orchestration clients must choose an explicit profile. Documentation results require extraction_source,ocr_confidence / page_count may be null.

Other information

  • License: MIT, copyright Dayan Decamp.
  • Provides npx -y mistral-mcp@1.0.0 --doctor reports the local profile and tool list without making API calls.
  • mistral://capabilities resources report the active endpoint, tool families, and reasons for omitted tools.