文档
- 中文詳細
- MiniMax-MCP-JS - MiniMax MCP 的官方 JavaScript 实现
MCP 客户端快速入门
- 从MiniMax获取您的 API 密钥。
- 安装
uv
(Python 包管理器),使用curl -LsSf https://astral.sh/uv/install.sh | sh
安装,或查看uv
repo以了解其他安装方法。 - 重要提示:API 主机和密钥因地区而异,必须匹配;否则,您将遇到
Invalid API key
错误。
地区 | 全球的 | 大陆 |
---|---|---|
MINIMAX_API_密钥 | 从MiniMax Global获取 | 从MiniMax获取 |
MINIMAX_API_主机 | https://api.minimaxi.chat (注意多余的**“i”** ) | https://api.minimax.chat |
克劳德桌面
转到Claude > Settings > Developer > Edit Config > claude_desktop_config.json
以包含以下内容:
⚠️ 警告:API 密钥需要与主机匹配。如果出现“API 错误:无效的 API 密钥”错误,请检查您的 API 主机:
- 全球主机:
https://api.minimaxi.chat
(注意多出来的“i”) - 大陆主机:
https://api.minimax.chat
如果您使用的是 Windows,则必须在 Claude Desktop 中启用“开发者模式”才能使用 MCP 服务器。点击左上角汉堡菜单中的“帮助”,然后选择“启用开发者模式”。
光标
转到Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP Server
以添加上述配置。
就这样。您的 MCP 客户端现在可以通过以下工具与 MiniMax 进行交互:
运输
我们支持两种传输类型:stdio 和 sse。
标准输入输出 | 上交所 |
---|---|
本地运行 | 可以部署在本地或云端 |
通过stdout 进行通信 | 通过network 进行通信 |
输入:支持处理local files 或有效的URL 资源 | 输入:云端部署时,建议使用URL 进行输入 |
可用工具
工具 | 描述 |
---|---|
text_to_audio | 将文本转换为具有给定声音的音频 |
list_voices | 列出所有可用的声音 |
voice_clone | 使用提供的音频文件克隆声音 |
generate_video | 根据提示生成视频 |
text_to_image | 根据提示生成图像 |
query_video_generation | 查询视频生成任务结果 |
常问问题
1. 无效的 API 密钥
请确保您的 API 密钥和 API 主机在区域上一致
地区 | 全球的 | 大陆 |
---|---|---|
MINIMAX_API_密钥 | 从MiniMax Global获取 | 从MiniMax获取 |
MINIMAX_API_主机 | https://api.minimaxi.chat (注意多余的**“i”** ) | https://api.minimax.chat |
2. 生成 uvx ENOENT
请在终端中运行以下命令来确认其绝对路径:
一旦获得绝对路径(例如,/usr/local/bin/uvx),请更新配置以使用该路径(例如,“command”:“/usr/local/bin/uvx”)。
3. 如何在异步模式下使用generate_video
在开始之前定义完成规则:或者,可以在 IDE 设置中配置这些规则(例如,Cursor):
示例用法
⚠️警告:使用这些工具可能会产生费用。
1. 播放一段晚间新闻
2. 克隆声音
3. 生成视频
4. 生成图像
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
使 Claude Desktop 和 Cursor 等 MCP 客户端能够与 MiniMax API 交互,以生成语音、克隆声音、创建视频和生成图像。
Related MCP Servers
- -securityAlicense-qualityThis tool creates a Model Context Protocol (MCP) server that acts as a proxy for any API that has an OpenAPI v3.1 specification. This allows you to use Claude Desktop to easily interact with both local and remote server APIs.Last updated -155742JavaScriptMIT License
- AsecurityAlicenseAqualityAn MCP server implementation that integrates with Minimax API to provide AI-powered image generation and text-to-speech functionality in editors like Windsurf and Cursor.Last updated -21649JavaScriptMIT License
Fastn Serverofficial
-securityAlicense-qualityAn MCP server that enables dynamic tool registration and execution based on API definitions, providing seamless integration with services like Claude.ai and Cursor.ai.Last updated -11PythonMIT LicenseMiniMax MCP JSofficial
AsecurityAlicenseAqualityJavaScript implementation of MiniMax MCP that enables interaction with MiniMax AI services for image generation, video generation, text-to-speech, and voice cloning through MCP-compatible clients.Last updated -667271TypeScriptMIT License