Skip to main content
Glama
Swih

Mistral MCP — Document Extraction

by Swih

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MISTRAL_API_KEYYesYour Mistral API key. Provider access, usage charges and quotas depend on your account.
MISTRAL_MCP_PROFILENoSix tools by default. Select metier-docs for the former core plus document processing, or admin for all implemented tools.core
MISTRAL_DEFAULT_MODELNoOptional model with access and quota on your account, such as ministral-3b-latest. Used for chat and typed document extraction.

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": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mistral_chatA

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.

codestral_fimA

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.

mistral_visionA

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.

mistral_ocrA

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: "" }

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_annotation_format: JSON schema for whole-document structured extraction.

  • bbox_annotation_format: JSON schema for extracted image / bbox annotations.

  • confidence_scores_granularity: 'page', 'word', or 'block'. 'block' adds per-block content/type confidence under pages[].blocks[].confidence_scores and requires OCR 4.1 or newer.

  • includeBlocks: return paragraph-level blocks (bounding box + type) in reading order — titles, lists, tables, images, equations, captions, code, references, aside text, header, footer, signature. Requires OCR 4 (mistral-ocr-4-0) or newer; older models accept the flag but return an empty blocks array.

Returns pages[].markdown plus optional pages[].hyperlinks, header, footer, images bounding boxes, blocks, annotations, confidence scores, and dimensions.

voxtral_transcribeA

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: "" }

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.

Returns plain text, detected language, optional segments[], and token usage.

process_documentA

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 — switch on kind to access typed fields. Validation checks schema and, for OCR sources, OCR confidence; not factual or accounting accuracy. Typed extraction rejects text longer than 60000 characters rather than truncating it.

Cache keys include source, kind, page limit, endpoint, models and pipeline version. Override location with MISTRAL_MCP_CACHE_DIR. Override mode with options.cache. Default cache mode is 'read_write' EXCEPT for kind=id_document (auto-bypass to avoid persisting PII). Set options.cache='read_write' explicitly to opt in for id documents.

options.maxPages and options.minOcrConfidence apply only to OCR sources. The confidence floor defaults to 0.3. Below the floor the tool returns isError. Missing or partial confidence scores also return isError; use mistral_ocr directly if you need raw OCR without a confidence guarantee. 0.3 is a conservative starting point, not a measured one: calibrate it for your corpus with npm run eval:docs.

Prompts

Interactive templates invoked by user choice

NameDescription
french_invoice_reminderRédige une relance de facture B2B en français avec un ton contrôlé. Retourne une paire de messages (assistant + user) prête à passer dans mistral_chat.
french_meeting_minutesTransforme une transcription brute en compte-rendu structuré en français. Retourne un message utilisateur prêt à passer dans mistral_chat ou voxtral_transcribe→mistral_chat.
french_email_replyRédige une réponse à un e-mail professionnel en français, avec intention et ton contrôlés. Retourne un message utilisateur prêt à passer dans mistral_chat.
french_commit_messageRédige un message de commit git en français au format Conventional Commits à partir d'un diff. Retourne un message utilisateur prêt à passer dans mistral_chat ou codestral_fim.
french_legal_summaryRésume un texte juridique (CGU, contrat, arrêté, décision) en français, ciblé sur une audience. Retourne un message utilisateur prêt à passer dans mistral_chat. Ne constitue pas un conseil juridique.
codestral_reviewReview a diff through Codestral with a focused lens (correctness, perf, security, or API-design). Returns messages for mistral_chat.

Resources

Contextual data attached and managed by the client

NameDescription
mistral-capabilitiesWhat this server instance can actually do: the endpoint it talks to, the active profile, and every tool family with whether it is exposed and why not when it isn't. Read this before concluding a tool is missing — a self-hosted endpoint hides the Mistral-only surface by design.
mistral-modelsLive Mistral model catalog for this API key. Returns the canonical allow-list this server accepts plus the raw list from GET /v1/models. Falls back to the static allow-list if the API call fails.

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct modality/action: code FIM, text chat, OCR, vision chat, document pipeline, and audio transcription. There is minor overlap between mistral_chat and mistral_vision (both chat) and between process_document and mistral_ocr, but the descriptions explicitly steer selection, so confusion is limited.

Naming Consistency3/5

Names mix provider-prefixed conventions (codestral_fim, mistral_chat, mistral_ocr, mistral_vision, voxtral_transcribe) with a plain action name (process_document). The pattern is somewhat readable but not a predictable verb_noun scheme and the provider prefixes fragment consistency.

Tool Count4/5

Six tools is well-scoped for a multimodal Mistral wrapper, with each tool covering a distinct capability rather than redundancy. Slightly broad for a server named 'Document Extraction' since it also includes code completion and chat, but not excessive.

Completeness3/5

Covers OCR, vision, chat, transcription, and a combined pipeline, but several tools reference a Files API (fileId) that is not exposed as a tool, creating a dead-end for uploading files. No model-listing or file-management operations leave workflows partially blocked.

Maintenance

ActivityMaintained
ResponsivenessSlow