Mistral AI recently introduced MCP connectors and memories in Le Chat , making it incredibly easy to enhance Mistral’s capabilities with external tools and data sources. This means you can integrate your existing applications directly into Mistral’s chat interface.
When combined with Model Context Protocol (MCP) servers hosted on Gram, you can give Mistral access to your APIs and tools in just a few minutes.
This guide will walk you through connecting Mistral to a Gram-hosted MCP server using the example Acme Todo API. You’ll learn how to set up the connection, configure the custom connector, and test it with natural language prompts to manage your todos.
We’ll use the Acme Todo API as our example, it’s a simple Python Flask REST API for managing todo items. You can find the complete OpenAPI specification here: acmetodo.yaml.
In the Gram dashboard , click New Project to start the guided setup flow for creating a toolset and MCP server.
Enter a project name and click Submit.
Gram will then guide you through the following steps.
Step 1: Upload the OpenAPI document
Upload the Acme Todo OpenAPI document acmetodo.yaml, enter the name of your API, and click Continue.
Step 2: Create a toolset
Give your toolset a name (for example, “Acme Todo”) and click Continue.
Notice that the names of the tools that will be generated from your OpenAPI document are displayed in this dialog.
Step 3: Configure MCP
Enter a URL slug for the MCP server (for example, acme-todo) and click Continue.
Gram will create the toolset from the OpenAPI document.
Click Toolsets in the sidebar to view the Acme Todo toolset.
You can edit the individual tools in the toolset by clicking on the tool name and the tool description.
Configuring environment variables
:::note[Server URL]
By default, the server URL is set by the OpenAPI document. The acme-todo openapi document uses a base URL of https://api.ritzademo.com which points to our live demo todo.
If you are using your own MCP server, you will need to set the server URL to the URL of your MCP server. You can either edit the OpenAPI document and skip the step below, or set the server URL in the environment variables.
:::
Environments store API keys and configuration separate from your toolset logic.
In the Environments tab, click the “Default” environment. Click the three dots in the top right corner of the environment card and then Fill for Toolset. Select the Acme Todo toolset and click Fill Variables to automatically populate the required variables.
Set the base URL variable for your API. For example, if your Acme Todo API is deployed at https://acme-todo.example.com, set ACME_TODO_SERVER_URL to that value. Click Update and then Save.
Publishing an MCP server
Let’s make the toolset available as an MCP server.
Go to the MCP tab, find the Acme Todo toolset and click on it to open the MCP details page.
Scroll down to the Hosted URL section and copy the URL.
Connecting Mistral to your Gram-hosted MCP server
Mistral supports a Custom Connector that you can configure to connect to your Gram-hosted MCP server. See Mistral’s guide for more details: Configuring a custom connector .
Add a Custom Connector in Mistral
Open Mistral and go to Intelligence > Connectors.
Click Add connector and select the Add custom connector tab.
Fill in the details:
Name: AcmeTodo
URL: Enter the URL of your Gram-hosted MCP server that you copied in the previous step.
For Authentication, select API Token Authentication and add your Gram API key.
Click Connect.
Once saved, the connector appears under the tools dropdown in Le Chat.
Using the connector in a chat
Start a new chat in Mistral and ensure the custom connector is enabled for the conversation.
Ask something that requires the Acme Todo API, for example:
Mistral will use the MCP tools exposed by your Acme Todo server (for example, create/list/update todo tools) and may ask for permission before calling a tool. Once approved, you’ll see the result from the API call as shown in the video above.
Troubleshooting
Connector not connecting: Verify the MCP server URL in the connector matches the one in Gram. You can test the MCP server first in the Gram Playground.
Authentication errors: For private servers, confirm your Gram API key in Settings > API Keys and ensure the Authorization: Bearer ... header is configured in Mistral.
Tools not appearing: Confirm your toolset includes the expected tools and the environment variables are set. Re-publish the server if you updated the toolset.
What’s next
You now have Mistral connected to a Gram-hosted MCP server built from the Acme Todo API. Ready to build your own? Try Gram today and turn any OpenAPI into agent-ready tools your models can use safely.