# Mistral AI — how to use (mcp.ai)

Connect your Mistral AI account and use 54 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Mistral AI is a research lab building state-of-the-art open-source language models and providing APIs for developers and enterprises to integrate these models into their applications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_mistral_ai?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `mistral_ai_append_to_conversation`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/mistral_ai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/mistral_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/mistral_ai/append/to/conversation` — Tool to append new entries to an existing conversation in Mistral AI. Use when you need to continue a conversation by adding new messages or inputs. This is a beta endpoint.
  - body: { store?: boolean, inputs: string|object[], completion_args?: object, conversation_id: string, handoff_execution?: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/agent` — Tool to create a new AI agent with custom configuration (Beta). Use when you need to create an agent with specific model, name, instructions, and tools.
  - body: { name: string, model: string, tools?: object[], handoffs?: object[], metadata?: object, description?: string, instructions?: string, completion_args?: object }
- `POST https://api.mcp.ai/api/mistral_ai/create/agents/completion` — Tool to generate completions using a Mistral AI agent with specific instructions and tools. Use when you need an agent to process messages and generate responses. Agents can use tools, follow instruct
  - body: { n?: integer, stop?: string|string[], tools?: object[], top_p?: number, stream?: boolean, agent_id: string, messages: object[], metadata?: object, max_tokens?: integer, prediction?: object, prompt_mode?: string, random_seed?: integer, temperature?: number, tool_choice?: string|object, response_format?: object, presence_penalty?: number, frequency_penalty?: number, parallel_tool_calls?: boolean }
- `POST https://api.mcp.ai/api/mistral_ai/create/audio/transcription` — Transcribe audio files to text using Mistral AI's Voxtral models. Use this action to convert speech in audio files to written text. Supports multiple input methods: file upload, file_id from previousl
  - body: { file?: object, model: string, diarize?: boolean, file_id?: string, file_url?: string, language?: string, temperature?: number, context_bias?: string[], timestamp_granularities?: string[] }
- `POST https://api.mcp.ai/api/mistral_ai/create/chat/completion` — Generate conversational responses from Mistral AI models. Supports streaming, function calling, and various model parameters. Use when you need to create chat completions with Mistral AI models for co
  - body: { n?: integer, stop?: string|string[], model: string, tools?: object[], top_p?: number, stream?: boolean, messages: object[], metadata?: object, max_tokens?: integer, prediction?: object, prompt_mode?: string, random_seed?: integer, safe_prompt?: boolean, temperature?: number, tool_choice?: string|object, response_format?: object, presence_penalty?: number, frequency_penalty?: number, parallel_tool_calls?: boolean }
- `POST https://api.mcp.ai/api/mistral_ai/create/chat/moderation` — Tool to classify chat content for moderation purposes across 9 categories. Use when you need to detect harmful content, inappropriate messages, or policy violations in chat conversations.
  - body: { input: object[], model?: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/embeddings` — Tool to generate vector embeddings for input text using Mistral AI embedding models. Use when you need to convert text into numerical vectors for semantic search, similarity comparison, or RAG applica
  - body: { input: string|string[], model: string, output_dtype?: string, encoding_format?: string, output_dimension?: integer }
- `POST https://api.mcp.ai/api/mistral_ai/create/fim/completion` — Generate code completions using fill-in-the-middle functionality. Use when you need to complete code between a prefix and suffix, or continue code from a prompt. Ideal for code completion, function im
  - body: { stop?: string|string[], model?: string, top_p?: number, prompt: string, stream?: boolean, suffix?: string, max_tokens?: integer, random_seed?: integer, temperature?: number }
- `POST https://api.mcp.ai/api/mistral_ai/create/library` — Tool to create a new document library. Use when you need to group documents into a new library. Use after confirming authentication.
  - body: { name: string, description?: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/library/share` — Create or update sharing permissions for a library. Use to grant access to users, workspaces, or organizations. Specify the access level (Viewer or Editor) and the entity to share with. This is a beta
  - body: { level: string, org_id?: string, library_id: string, share_with_type: string, share_with_uuid: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/moderation` — Tool to classify text content for moderation purposes across 9 categories. Use when you need to detect harmful content, inappropriate text, or policy violations in raw text inputs.
  - body: { input: string|string[], model?: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/ocr` — Extract text and structured data from images and documents using Mistral AI's OCR capabilities. Supports PDFs, images, tables, headers, footers, and custom structured extraction. Use when you need to 
  - body: { id?: string, model: string, pages?: integer[], document: object, image_limit?: integer, table_format?: string, extract_footer?: boolean, extract_header?: boolean, image_min_size?: integer, include_image_base64?: boolean, bbox_annotation_format?: object, document_annotation_format?: object, document_annotation_prompt?: string }
- `POST https://api.mcp.ai/api/mistral_ai/create/or/update/agent/alias` — Tool to create or update an agent version alias. Use when you need to assign a version alias (like 'production' or 'staging') to a specific agent version.
  - body: { alias: string, version: integer, agent_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/agent` — Permanently deletes an agent by its ID (Beta feature). Use this tool when you need to remove an agent that is no longer needed. This operation is irreversible - the agent will be permanently removed f
  - body: { agent_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/conversation` — Tool to delete a conversation by its ID (Beta). Use when you need to permanently remove a conversation. This is a beta feature.
  - body: { conversation_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/file` — Delete a file by its ID from Mistral AI. Permanently removes the file and its metadata. Use List Files action first to obtain valid file IDs.
  - body: { file_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/library` — Permanently deletes a library and all of its documents from Mistral AI. Use this tool when you need to remove an entire library including all its documents. This operation is irreversible - the librar
  - body: { library_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/library/document` — Permanently deletes a document from a Mistral AI library. Use this tool when you need to remove a specific document from a library. Both library_id and document_id must be valid UUIDs. This operation 
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/delete/library/share` — Remove sharing permissions for a library from a user, workspace, or organization. Use when you need to revoke access to a library that was previously shared. This is a beta feature.
  - body: { org_id?: string, library_id: string, share_with_type: string, share_with_uuid: string }
- `POST https://api.mcp.ai/api/mistral_ai/download/file` — Download the content of a previously uploaded file from Mistral AI. Returns the raw binary content of the file. Use this when you need to retrieve file data for processing, such as training data files
  - body: { file_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/agent` — Tool to retrieve details of a specific Mistral AI agent by its ID. Returns comprehensive agent information including model, instructions, tools, and configuration. Use when you need to inspect or veri
  - body: { agent_id: string, agent_version?: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/agent/version` — Retrieve a specific version of an agent (Beta). Use when you need to get details about a particular agent version, including its configuration, tools, and metadata.
  - body: { version: string, agent_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/conversation` — Tool to retrieve details of a specific conversation. Use when you need to fetch conversation metadata including timestamps, configuration, and associated model or agent information.
  - body: { conversation_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/conversation/history` — Retrieve the full history of a conversation in Mistral AI. Returns all entries including messages, tool calls, function results, and agent handoffs. Use this to review conversation context or export c
  - body: { conversation_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/conversation/messages` — Retrieve all messages from a Mistral AI conversation. Use when you need to fetch the complete message history for a specific conversation.
  - body: { conversation_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/document/extracted/text/url` — Retrieve a signed URL to download the extracted text from a document in a Mistral AI library. This is a beta endpoint. Note: Only documents that undergo OCR processing (such as PDFs) will have extract
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/document/signed/url` — Get a signed URL to download a document from a Mistral AI library. Returns a temporary URL that provides direct access to download the document content. Use this when you need to retrieve document fil
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/document/status` — Retrieve the processing status of a document in a Mistral AI library. Use this to check if a document has finished processing after upload. Returns the document ID and its current processing status.
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/document/text/content` — Retrieve the extracted text content of a specific document from a Mistral AI library (Beta). Returns the full text content extracted from the document. Use the List Libraries action first to obtain va
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/file/signed/url` — Get a time-limited signed URL for downloading a file from Mistral AI. Use when you need a temporary download link that can be shared or used externally. The URL expires after the specified number of h
  - body: { expiry?: integer, file_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/fine/tuning/jobs` — List fine-tuning jobs with optional filtering and pagination. Use this tool to retrieve all fine-tuning jobs for your organization. Supports filtering by model, status, creation time, and W&B integrat
  - body: { page?: integer, model?: string, status?: string, suffix?: string, page_size?: integer, wandb_name?: string, created_after?: string, created_by_me?: boolean, wandb_project?: string, created_before?: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/library` — Retrieve detailed information about a specific library. Returns complete library metadata including name, description, document counts, size, timestamps, and ownership details. Use List Libraries acti
  - body: { library_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/library/document` — Retrieve metadata for a specific document in a Mistral AI library. Returns detailed information including processing status, size, summary, token counts, and timestamps. Use this to check document sta
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/get/model` — Tool to retrieve detailed information about a specific Mistral AI model by its ID. Returns model metadata including capabilities, context length, and ownership. Use when you need to inspect model spec
  - body: { model_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/agent/aliases` — Retrieve all aliases for an agent version. Use to view and manage version aliases for an agent. Note: This is a beta endpoint.
  - body: { agent_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/agent/versions` — List all versions of a specific agent. Use when you need to view the version history of an agent. Note: This is a beta endpoint.
  - body: { page?: integer, agent_id: string, page_size?: integer }
- `POST https://api.mcp.ai/api/mistral_ai/list/agents` — Tool to list all configured agents (Beta). Use when you need to retrieve a list of agents available in your organization.
  - body: { id?: string, name?: string, page?: integer, sources?: string, metadata?: string, page_size?: integer, deployment_chat?: boolean }
- `POST https://api.mcp.ai/api/mistral_ai/list/batch/jobs` — Tool to retrieve a list of all batch jobs with optional filtering and pagination. Use when you need to view or manage batch processing jobs.
  - body: { page?: integer, model?: string, status?: string, agent_id?: string, metadata?: string, page_size?: integer, created_after?: string, created_by_me?: boolean }
- `POST https://api.mcp.ai/api/mistral_ai/list/conversations` — List all created conversations (Beta). Use to retrieve conversation history or manage existing conversations. Supports pagination and metadata filtering.
  - body: { page?: integer, metadata?: string, page_size?: integer }
- `POST https://api.mcp.ai/api/mistral_ai/list/files` — Tool to list all files available to the user. Use when you need to view or manage uploaded files, supports pagination.
  - body: { after?: string, limit?: integer, order?: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/libraries` — List all document libraries accessible to your organization. Returns library metadata including id, name, description, document counts, and timestamps. Use to discover available libraries before listi
  - body: { limit?: integer, page_token?: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/library/documents` — List all documents in a Mistral AI document library. Returns document metadata including name, processing status, size, summary, and timestamps. Use the List Libraries action first to obtain valid lib
  - body: { page?: integer, page_size?: integer, library_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/library/shares` — List all sharing permissions for a document library. Returns details about who has access to the library, including role, share type, and user/organization identifiers. Use the List Libraries action f
  - body: { library_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/list/models` — Tool to retrieve all available Mistral AI models including base models and fine-tuned models. Use when you need to see what models are available for chat completions, embeddings, or fine-tuning.
- `POST https://api.mcp.ai/api/mistral_ai/reprocess/document` — Reprocess a document in a Mistral AI library (Beta). Use when you need to trigger reprocessing of a document, such as after updating library settings or to refresh document embeddings. Both library_id
  - body: { library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/restart/conversation` — Tool to restart a conversation from a specific point (Beta). Use when you need to branch a conversation or replay it from a particular message. Creates a new conversation starting from the specified e
  - body: { store?: boolean, inputs: string|object[], stream?: boolean, metadata?: object, agent_version?: string|integer, from_entry_id: string, completion_args?: object, conversation_id: string, handoff_execution?: string }
- `POST https://api.mcp.ai/api/mistral_ai/retrieve/file` — Retrieve metadata of a file uploaded to Mistral AI. Returns file details including size, filename, purpose, and creation time. Use List Files action first to obtain valid file IDs.
  - body: { file_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/start/conversation` — Tool to start a new conversation with a Mistral AI agent or base model. Use when initiating a conversational interaction that requires context tracking. Either 'model' or 'agent_id' must be provided. 
  - body: { name?: string, model?: string, store?: boolean, tools?: object[], inputs: string|object[], stream?: boolean, agent_id?: string, metadata?: object, description?: string, instructions?: string, agent_version?: string|integer }
- `POST https://api.mcp.ai/api/mistral_ai/update/agent` — Tool to update an existing agent's configuration. Use when you need to modify an agent's name, description, model, instructions, tools, or other settings.
  - body: { name?: string, model?: string, tools?: object[], agent_id: string, handoffs?: string[], metadata?: object, description?: string, instructions?: string, completion_args?: object, deployment_chat?: boolean }
- `POST https://api.mcp.ai/api/mistral_ai/update/agent/version` — Tool to update the current version of an agent (Beta). Use when you need to switch an agent to a different version from its available versions.
  - body: { version: integer, agent_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/update/library` — Tool to update an existing document library's properties. Use when you need to modify a library's name or description. Note: This is a beta endpoint.
  - body: { name?: string, library_id: string, description?: string }
- `POST https://api.mcp.ai/api/mistral_ai/update/library/document` — Update the metadata of a document in a Mistral AI library. Use this to modify a document's name or add/update custom attributes without re-uploading the file content. This is a beta endpoint.
  - body: { name?: string, attributes?: object, library_id: string, document_id: string }
- `POST https://api.mcp.ai/api/mistral_ai/upload/file` — Upload a file to Mistral AI for use in fine-tuning, batch processing, or OCR. Use this tool to: - Upload .jsonl files for fine-tuning models - Upload files for batch processing requests - Upload docum
  - body: { file: object, purpose?: string }
- `POST https://api.mcp.ai/api/mistral_ai/upload/library/document` — Upload a document to a Mistral AI library for use with RAG-enabled agents. Use this action to add documents to a library that can be accessed by Mistral AI agents. The uploaded document will be proces
  - body: { file: object, library_id: string }

## Example prompts
- "What can I do in Mistral AI?"
- "Show me a summary of my Mistral AI account"

## More
- Page: https://mcp.ai/mistral_ai
- Agent spec (llms.txt): https://mcp.ai/mistral_ai/llms.txt
- Postman collection: https://mcp.ai/mistral_ai/postman.json
