mistral-mcp
v1.0.0Mistral MCP server: extract invoices and documents from text, Markdown or OCR into typed JSON.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mistral_chat Mistral chat completion
Generate a chat completion using a Mistral model. When to use: - Drafting French (or any European-language) content where Mistral shines. - Codestral for code-specific generation/review. - Ministral for cheap / low-latency classification. Returns structured content with the assistant text and token usage. Does NOT stream — use mistral_chat_stream for long outputs with progress updates.
| Parameter | Type | Description |
|---|---|---|
messages * | array | Chat messages in role/content form. |
max_tokens | integer | Maximum number of tokens to generate. Input tokens plus this limit must fit within the model's context length. |
model | string | Chat model. Default: mistral-medium-latest (override with MISTRAL_DEFAULT_MODEL). |
reasoning_effort | string | Reasoning effort; supported values depend on the selected model. |
response_format | Force a structured output: `{type:"json_object"}` for JSON mode, `{type:"json_schema", json_schema:{...}}` for strict schema mode. | |
seed | integer | Random seed for deterministic sampling. Maps to Mistral's `random_seed`. |
temperature | number | Sampling temperature: higher values make output more random; lower values make it more focused. Prefer adjusting this or top_p, not both. |
top_p | number | Nucleus sampling probability mass: 0.1 considers tokens in the top 10% of probability mass. Prefer adjusting this or temperature, not both. |
codestral_fim Codestral fill-in-the-middle completion
Fill-in-the-middle code completion with Codestral. Given `prompt` (code preceding the cursor) and `suffix` (code after the cursor), Codestral writes the middle. Use for editor autocomplete scenarios, code-patching agents, or structured refactors where you know the target boundaries. Default stop tokens: [] — let the model decide. Override with `stop` if needed.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Code preceding the cursor. |
suffix * | string | Code after the cursor. Can be empty string. |
max_tokens | integer | Maximum number of tokens to generate. Input tokens plus this limit must fit within the model's context length. |
model | string | FIM (fill-in-the-middle) model identifier. Any identifier your endpoint serves is accepted — read mistral://models for the live catalog. Known Mistral aliases: codestral-latest. |
seed | integer | Random seed for deterministic sampling. Maps to Mistral's `random_seed`. |
stop | array | Stop generation when any of these text sequences is encountered. |
temperature | number | Sampling temperature: higher values make output more random; lower values make it more focused. Prefer adjusting this or top_p, not both. |
top_p | number | Nucleus sampling probability mass: 0.1 considers tokens in the top 10% of probability mass. Prefer adjusting this or temperature, not both. |
mistral_vision Mistral multimodal chat (vision)
Chat completion with multimodal input: text + image_url parts. Requires a vision-capable model. Accepted: - pixtral-large-latest - pixtral-12b-latest - mistral-large-latest - mistral-medium-latest - mistral-small-latest Each message's `content` is either a plain string (pure text) or an array of parts `{ type: 'text', text }` / `{ type: 'image_url', imageUrl }`. The image URL can be an https URL or a data: URI base64 payload. Returns the assistant text + token usage. For non-visual requests, prefer `mistral_chat`.
| Parameter | Type | Description |
|---|---|---|
messages * | array | Chat messages. Pure-text requests are accepted, but this tool is intended primarily for multimodal prompts containing image parts. |
max_tokens | integer | Maximum number of tokens to generate. Input tokens plus this limit must fit within the model's context length. |
model | string | Vision-capable Mistral model. Default: pixtral-large-latest. |
seed | integer | Random seed for deterministic sampling. Maps to Mistral's `random_seed`. |
temperature | number | Sampling temperature: higher values make output more random; lower values make it more focused. Prefer adjusting this or top_p, not both. |
top_p | number | Nucleus sampling probability mass: 0.1 considers tokens in the top 10% of probability mass. Prefer adjusting this or temperature, not both. |
mistral_ocr Mistral OCR (document to markdown)
Run Mistral OCR on a PDF or image, returning structured markdown per page. Input `document` is one of: - { type: "document_url", documentUrl: "https://...pdf" } - { type: "image_url", imageUrl: "https://..." | "data:image/..." } - { type: "file", fileId: "<id-from-files-api>" } Options: - `pages`: array of 0-indexed page numbers or string like "0-5,7". - `tableFormat`: 'markdown' (default) or 'html'. - `extractHeader` / `extractFooter`: include page header/footer when present. - `includeImageBase64`: embed extracted image bytes as base64 in the response. - `document_annotatio…
| Parameter | Type | Description |
|---|---|---|
document * | Document to process, supplied as a document URL, an image URL or data URI, or an uploaded file ID. | |
bbox_annotation_format | object | JSON Schema for structured annotations of each extracted bounding box or image. |
confidence_scores_granularity | string | Confidence granularity. 'block' also fills pages[].blocks[].confidence_scores and requires OCR 4.1 (mistral-ocr-4-1) or newer. |
document_annotation_format | object | JSON Schema for a structured annotation extracted from the entire document. |
document_annotation_prompt | string | Instructions for whole-document structured extraction. Requires document_annotation_format. |
extractFooter | boolean | Extract each page footer into its footer field and remove it from the page markdown. |
extractHeader | boolean | Extract each page header into its header field and remove it from the page markdown. |
imageLimit | integer | Maximum number of images to extract from the document. |
imageMinSize | integer | Minimum height and width of an image to extract. |
includeBlocks | boolean | Return paragraph-level blocks (bounding box + type) per page. Requires OCR 4 (mistral-ocr-4-0) or newer. |
includeImageBase64 | boolean | Include base64-encoded data for extracted images in the response. |
model | string | OCR model. Default: mistral-ocr-latest. |
pages | Zero-based page numbers to process, as an array or comma-separated numbers and ranges such as "0-5,7". | |
tableFormat | string | Format for extracted tables: Markdown or HTML. |
voxtral_transcribe Voxtral speech-to-text
Transcribe an audio file to text using Mistral Voxtral. Accepted models: - voxtral-mini-latest - voxtral-small-latest Audio source is one of: - { type: "file_url", fileUrl: "https://..." } (public URL) - { type: "file", fileId: "<id-from-files-api>" } Options: - `language`: ISO-639-1 hint (e.g. 'fr', 'en'). Boosts accuracy when known. - `temperature`: sampling temperature. - `diarize`: return per-speaker segments (default false). - `timestampGranularities`: ['segment'] to return per-segment timestamps. - `contextBias`: list of phrases/terms that should bias the decoder.…
| Parameter | Type | Description |
|---|---|---|
audio * | Audio to transcribe, supplied as a public URL or an uploaded file ID. | |
contextBias | array | Words or phrases to favor when decoding the audio. |
diarize | boolean | Identify speakers in the returned transcription segments. Defaults to false. |
language | string | ISO-639-1 language hint (e.g. 'fr', 'en'). |
model | string | STT model. Default: voxtral-mini-latest. |
temperature | number | Sampling temperature for transcription. |
timestampGranularities | array | Only 'segment' is currently supported. |
process_document Process a business document end-to-end
Single-call pipeline: provided text/Markdown or Mistral OCR → classify (if kind=auto) → typed extraction → validation. source.type=text skips OCR and Files uploads. Text with kind=generic makes no API calls; classification and typed extraction use Mistral chat. Results expose extraction_source. Provided text has null ocr_confidence and page_count; ocr_text contains the supplied text unchanged. Replaces the manual chain of mistral_ocr + mistral_chat + JSON parsing. Kinds: contract | invoice | id_document | generic. Use kind=auto to let the server classify. Returns a discriminated union â…
| Parameter | Type | Description |
|---|---|---|
source * | Already extracted text/Markdown, or an OCR source: remote URL, uploaded file ID, or inline image. | |
kind | string | Extraction task. auto classifies the document; generic returns text without typed extraction. Text source with generic makes no API calls. |
options | object | Page selection, OCR confidence floor and local cache policy. |