How to integrate Mistral ai MCP with OpenCode

Connect OpenCode to Mistral ai MCP. Summarize this research paper in simple terms, generate python code for sorting a list, and more using natural language, with authentication handled for you.

Mistral ai logoMistral ai
Api Key

Mistral ai is a research lab offering cutting-edge open-source language models and developer APIs. It empowers teams to add state-of-the-art natural language capabilities to any app or workflow.

105 Tools

How to integrate Mistral ai MCP with OpenCode

This guide explains how to connect Mistral ai MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns.

There are two ways to set this up:

Also integrate Mistral ai with

Why use Composio?

Composio provides a single MCP server or CLI tool that exposes a set of meta-tools, allowing you to:

  • Connect to 1,500+ apps with on-demand tool loading, so you do not fill your LLM context window with unnecessary tool definitions.
  • Use programmatic tool calling through a remote Bash tool, letting LLMs write their own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
  • Handle large tool responses outside the LLM context to keep conversations lean.

Connect Mistral ai with OpenCode

Option 1: Using Composio CLI

1. Install Composio CLI

Install the Composio CLI, authenticate, and initialize your project:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login

During login, you will be redirected to the sign-in page. Finish the flow and you are all set.

Composio CLI authorization screen

2. Authorize Mistral ai

Once the CLI is installed, it is essentially done. Give OpenCode access to your apps with these steps:

  1. Launch OpenCode.
  2. Prompt it to "Authenticate with Mistral ai Composio".
  3. Complete the authentication and authorization flow, and your Mistral ai integration is all set.
  4. Start asking anything you want.

Option 2: Using Composio MCP

You can also connect Mistral ai to OpenCode by adding Composio as an MCP server through the OpenCode CLI.

1. Add the Composio MCP server

bash
opencode mcp add

This launches an interactive prompt.

2. Fill in the fields

FieldValue
Namecomposio
Typeremote
URLhttps://connect.composio.dev/mcp
Require OAuthYes
Have client IDNo
OpenCode MCP server interactive prompt for Composio

Alternatively, you can skip the interactive prompt and paste the configuration directly into your OpenCode config file.

Open your global OpenCode config:

bash
open ~/.config/opencode/opencode.json

Add this under the mcp key and save the file.

bash
{
  "mcp": {
    "composio": {
      "type": "remote",
      "url": "https://connect.composio.dev/mcp",
      "enabled": true
    }
  }
}

3. Authenticate

Authenticate the Composio MCP server you just added:

bash
opencode mcp auth composio

This opens a browser session. Authorize Composio and you are done.

Composio browser authorization for OpenCode MCP

4. Verify installation

bash
opencode mcp list

5. Connect Mistral ai with OpenCode

Now, in the chat, ask the agent to connect to Mistral ai or give it any Mistral ai-related task.

For example, ask it to:

  • "Summarize this research paper in simple terms"
  • "Generate Python code for sorting a list"
  • "Explain the difference between AI and ML"

It will prompt you to authenticate and authorize access to Mistral ai.

That is it. Composio tools are now available in OpenCode, and your Mistral ai account is ready to use.

Way Forward

Now that Mistral ai is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.

  • Connect Calendar to turn threads into scheduled meetings automatically.
  • Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
  • Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
  • Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.

Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

TOOLS

Supported Tools

Every Mistral ai action and event your agent gets out of the box.

Append to conversation

Tool to append new entries to an existing conversation in Mistral AI.

Archive Fine-Tuned Model

Archive a fine-tuned model so it is unavailable until restored.

Count Chat Completion Field Options

Count values of a chat completion field after optional filtering.

Create Agent

Tool to create a new AI agent with custom configuration (Beta).

Create Agents Completion

Tool to generate completions using a Mistral AI agent with specific instructions and tools.

Create Audio Transcription

Transcribe audio files to text using Mistral AI's Voxtral models.

Create Batch Job

Create and queue a Mistral batch inference job.

Create Chat Completion

Generate conversational responses from Mistral AI models.

Create Chat Moderation

Tool to classify chat content for moderation purposes across 9 categories.

Create Embeddings

Tool to generate vector embeddings for input text using Mistral AI embedding models.

Create FIM Completion

Generate code completions using fill-in-the-middle functionality.

Create library

Tool to create a new document library.

Create library share

Create or update sharing permissions for a library.

Create Moderation

Tool to classify text content for moderation purposes across 9 categories.

Create OCR

Extract text and structured data from images and documents using Mistral AI's OCR capabilities.

Create or Update Agent Alias

Tool to create or update an agent version alias.

Create Speech

Generate JSON-encoded speech audio from text without streaming.

Delete agent

Permanently deletes an agent by its ID (Beta feature).

Delete Conversation

Tool to delete a conversation by its ID (Beta).

Delete File

Delete a file by its ID from Mistral AI.

Delete library

Permanently deletes a library and all of its documents from Mistral AI.

Delete library document

Permanently deletes a document from a Mistral AI library.

Delete library share

Remove sharing permissions for a library from a user, workspace, or organization.

Download File

Download the content of a previously uploaded file from Mistral AI.

Get Agent

Tool to retrieve details of a specific Mistral AI agent by its ID.

Get Agent Version

Retrieve a specific version of an agent (Beta).

Get Batch Job

Get details and optionally inline results for a batch job.

Get campaign

Retrieve an observability campaign by its UUID.

Get campaign status

Return the execution status of an observability campaign.

Get Chat Completion Event

Retrieve one observability chat completion event by UUID.

Get Chat Completion Field Options

Get available values for a chat completion field and filter operator.

Get Connector

Get a connector by ID or name without requesting customer data or secrets.

Get Connector Authentication Methods

Get a connector's public authentication methods and required headers.

Get Conversation

Tool to retrieve details of a specific conversation.

Get Conversation History

Retrieve the full history of a conversation in Mistral AI.

Get Conversation Messages

Retrieve all messages from a Mistral AI conversation.

Get dataset

Retrieve an observability dataset by its UUID.

Get dataset import task

Retrieve the status and progress of one dataset import task.

Get dataset record

Retrieve a conversation record from an observability dataset.

Get document extracted text URL

Retrieve a signed URL to download the extracted text from a document in a Mistral AI library.

Get document signed URL

Get a signed URL to download a document from a Mistral AI library.

Get Document Status

Retrieve the processing status of a document in a Mistral AI library.

Get Document Text Content

Retrieve the extracted text content of a specific document from a Mistral AI library (Beta).

Get File Signed URL

Get a time-limited signed URL for downloading a file from Mistral AI.

List Fine Tuning Jobs

List fine-tuning jobs with optional filtering and pagination.

Get Judge

Retrieve a saved observability judge by UUID.

Get library

Retrieve detailed information about a specific library.

Get Library Document

Retrieve metadata for a specific document in a Mistral AI library.

Get Model

Tool to retrieve detailed information about a specific Mistral AI model by its ID.

Get Similar Chat Completion Events

Retrieve observability events similar to a specified event.

Get Voice

Get saved voice metadata without sample audio.

Get Voice Sample

Download a saved voice's sample as a WAV audio file.

Get Workflow

Retrieve a workflow definition and its active-worker status by name or ID.

Get Workflow Deployment

Retrieve a workflow deployment and its registered workers.

Get Workflow Execution

Retrieve the current state and result of a workflow execution.

Get Workflow Execution History

Retrieve the event history for a workflow execution.

Get Workflow Execution OpenTelemetry Trace

Retrieve raw OpenTelemetry trace data for a workflow execution.

Get Workflow Execution Trace Events

Retrieve trace events for a workflow execution.

Get Workflow Execution Trace Summary

Retrieve a hierarchical trace summary for a workflow execution.

Get Workflow Metrics

Retrieve aggregate execution, error, latency, and retry metrics for a workflow.

Get Workflow Registration

Retrieve one workflow registration and its worker availability.

Get Workflow Run

Retrieve a workflow run's status, timing, execution IDs, and result.

Get Workflow Run History

Retrieve the event history for a workflow run.

Judge Chat Completion Event

Evaluate one chat completion event with an inline judge definition.

Judge Conversation

Run a saved observability judge against a supplied conversation.

Judge dataset record

Evaluate one dataset record with a supplied non-durable judge definition.

List agent aliases

Retrieve all aliases for an agent version.

List Agents

Tool to list all configured agents (Beta).

List Agent Versions

List all versions of a specific agent.

List Batch Jobs

Tool to retrieve a list of all batch jobs with optional filtering and pagination.

List campaigns

List observability campaigns, optionally filtering them by a text query.

List campaign selected events

List chat-completion events selected by an observability campaign.

List Chat Completion Fields

List fields and operators available for observability event filtering.

List Connectors

List custom MCP connectors without returning connection secrets.

List Connector Tools

List tools exposed by an MCP connector.

List Conversations

List all created conversations (Beta).

List dataset import tasks

List import tasks associated with an observability dataset.

List dataset records

List conversation records stored in an observability dataset.

List datasets

List observability datasets, optionally filtering them by a text query.

List Files

Tool to list all files available to the user.

List Judges

List saved observability judges with filtering, search, and pagination.

List libraries

List all document libraries accessible to your organization.

List Library Documents

List all documents in a Mistral AI document library.

List library shares

List all sharing permissions for a document library.

List Models

Tool to retrieve all available Mistral AI models including base models and fine-tuned models.

List Voices

List saved voices without sample audio data.

List Workflow Deployments

List workflow worker deployments, optionally filtering to active deployments or a workflow.

List Workflow Events

List durable workflow lifecycle and task events with cursor pagination.

List Workflow Registrations

List workflow registrations with sharing, activity, archival, and cursor filters.

List Workflow Runs

List workflow runs with status, search, and cursor pagination filters.

List Workflow Schedules

List workflow schedules with timing, time zone, and execution policy details.

Query Workflow Execution

Invoke a read-only query handler on a running workflow execution.

Reprocess document

Reprocess a document in a Mistral AI library (Beta).

Restart Conversation

Tool to restart a conversation from a specific point (Beta).

Retrieve File

Retrieve metadata of a file uploaded to Mistral AI.

Search Chat Completion Events

Search observability chat completion events and return previews or only IDs.

Start Conversation

Tool to start a new conversation with a Mistral AI agent or base model.

Unarchive Fine-Tuned Model

Restore an archived fine-tuned model.

Update Agent

Tool to update an existing agent's configuration.

Update agent version

Tool to update the current version of an agent (Beta).

Update Fine-Tuned Model

Update the name or description of a fine-tuned model.

Update library

Tool to update an existing document library's properties.

Update library document

Update the metadata of a document in a Mistral AI library.

Upload File

Upload a file to Mistral AI for use in fine-tuning, batch processing, or OCR.

Upload Library Document

Upload a document to a Mistral AI library for use with RAG-enabled agents.

FAQ

Frequently asked questions

With a standalone Mistral ai MCP server, the agents and LLMs can only access a fixed set of Mistral ai tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Mistral ai and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. OpenCode fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Mistral ai tools.

Yes, absolutely. You can configure which Mistral ai scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Mistral ai data and credentials are handled as safely as possible.

Start with Mistral ai.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Mistral ai tool your agent needs.Free to start.

Start building