Mistral MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Used for environment variable management, specifically for storing the Mistral API key.

  • Supported platform for running the MCP server with the Claude desktop application.

  • Used as the runtime environment for the MCP server, specifically tested on v20.17.10.

Mistral MCP 服务器示例

这是一个基于 TypeScript 的 MCP 服务器,提供了两个与 Mistral 通信的工具。这是一个关于如何创建可与模型上下文协议 (MCP)配合使用的服务器的基本示例。

博客文章

该存储库是 Speakeasy 博客文章的一部分:为 Mistral 构建 MCP 服务器

要求

Mistral API 密钥

要与 Mistral AI 平台交互,您需要一个 API 密钥。您可以在mistral.ai上注册以获取密钥。

将您的 API 密钥设置为环境变量。创建.env.example的副本并将其重命名为.env

cp .env.example .env open .env

现在使用您的 Mistral API 密钥更新.env文件:

MISTRAL_API_KEY="YOUR_MISTRAL_API_KEY"

工具

该服务器提供了两个工具。

要使用文本输入与 Mistral 聊天,请使用mistral_chat_text工具:

  • 采用模型和文本输入数组
  • 返回来自 Mistral 的文本响应。

要使用文本和图像输入与 Mistral 聊天,请使用mistral_chat_image工具:

  • 采用模型以及文本和图像输入数组
  • 仅接受托管在公共 URL 上的图片
  • 返回 Mistral 的文本响应

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

安装

要将此服务器与 Claude 桌面应用程序一起使用,请将以下服务器配置添加到您的 Claude 配置文件中:

  • 在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "Mistral MCP Server": { "command": "node", "args": [ // Update this path to the location of the built server "/Users/speakeasy/server-mistral/build/index.js" ], "env": { // Update this with your Mistral API key "MISTRAL_API_KEY": "YOUR_MISTRAL_API_KEY" } } } }

调试

由于 MCP 服务器通过标准输入/输出流 (stdio) 进行通信,因此调试起来可能颇具挑战性。我们建议使用MCP Inspector ,它以包脚本的形式提供:

npm run inspector

MCP Inspector 将提供一个 URL,用于访问浏览器中的调试工具。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

基于 TypeScript 的 MCP 服务器,提供两种与 Mistral AI 模型聊天的工具,支持纯文本对话和图像+文本输入。

  1. Blog post
    1. Requirements
      1. Mistral API key
        1. Tools
          1. Development
            1. Installation
              1. Debugging
            2. License
              ID: cnz4nubw46