How to integrate Mistral ai MCP with OpenCode

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: Via Composio Connect MCP Via the Composio CLI

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.

54 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,000+ 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.

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 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.

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 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 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 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.

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 Conversations

List all created conversations (Beta).

List Files

Tool to list all files available to the user.

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.

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.

Start Conversation

Tool to start a new conversation with a Mistral AI agent or base 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 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