The MiniMax MCP server provides a JavaScript/TypeScript implementation of the Model Context Protocol, enabling AI systems to access image generation, video creation, text-to-speech, and other creative capabilities.
To install MiniMax MCP JS automatically for Claude Desktop:
npx -y @smithery/cli install @MiniMax-AI/MiniMax-MCP-JS --client claude
# Install with pnpm (recommended)
pnpm add minimax-mcp-js
Region | Global | Mainland |
---|---|---|
MINIMAX_API_KEY | Get from MiniMax Global | Get from MiniMax |
MINIMAX_API_HOST | https://api.minimaxi.chat (note the extra "i") | https://api.minimax.chat |
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json
to include:
{
"mcpServers": {
"minimax-mcp-js": {
"command": "npx",
"args": [
"-y",
"minimax-mcp-js"
],
"env": {
"MINIMAX_API_HOST": "<https://api.minimaxi.chat|https://api.minimax.chat>",
"MINIMAX_API_KEY": "<your-api-key-here>",
"MINIMAX_MCP_BASE_PATH": "<local-output-dir-path, such as /User/xxx/Desktop>",
"MINIMAX_RESOURCE_MODE": "<optional, [url|local], url is default>"
}
}
}
}
Go to Cursor → Preferences → Cursor Settings → MCP → Add new global MCP Server
to add the above config.
⚠️ Note: If you encounter a "No tools found" error when using MiniMax MCP JS with Cursor, please update your Cursor to the latest version.
MiniMax-MCP-JS provides multiple configuration methods with the following priority (highest to lowest):
Request Parameter Configuration
meta.auth
objectAPI Configuration
import { startMiniMaxMCP } from 'minimax-mcp-js';
await startMiniMaxMCP({
apiKey: 'your_api_key_here',
apiHost: 'https://api.minimaxi.chat',
basePath: '/path/to/output',
resourceMode: 'url'
});
Command Line Arguments
minimax-mcp-js --api-key your_api_key_here --api-host https://api.minimaxi.chat --base-path /path/to/output --resource-mode url
Environment Variables
# MiniMax API Key (required)
MINIMAX_API_KEY=your_api_key_here
# Base path for output files (optional, defaults to user's desktop)
MINIMAX_MCP_BASE_PATH=~/Desktop
# MiniMax API Host (optional, defaults to https://api.minimaxi.chat)
MINIMAX_API_HOST=https://api.minimaxi.chat
# Resource mode (optional, defaults to 'url')
# Options: 'url' (return URLs), 'local' (save files locally)
MINIMAX_RESOURCE_MODE=url
Convert text to speech audio file.
Tool: text_to_audio
Parameters:
- text: Text to convert (required)
- model: Model version (default: 'speech-02-hd')
- voiceId: Voice ID (default: 'male-qn-qingse')
- speed: Speech speed, range 0.5-2.0 (default: 1.0)
- vol: Volume, range 0.1-10.0 (default: 1.0)
- pitch: Pitch, range -12 to 12 (default: 0)
- emotion: Emotion type (default: 'happy')
- format: Audio format (default: 'mp3')
- sampleRate: Sample rate in Hz (default: 32000)
- bitrate: Bitrate in bps (default: 128000)
- channel: Audio channels (default: 1)
- languageBoost: Enhance language recognition (default: 'auto')
- stream: Enable streaming output
- subtitleEnable: Enable subtitle service (default: false)
- outputDirectory: Directory to save output (optional)
- outputFile: Path to save output (optional)
Play an audio file. Supports WAV and MP3 formats.
Tool: play_audio
Parameters:
- inputFilePath: Path to the audio file (required)
- isUrl: Whether the audio file is a URL (default: false)
Clone a voice from an audio file.
Tool: voice_clone
Parameters:
- audioFile: Path to audio file (required)
- voiceId: Voice ID (required)
- text: Text for demo audio (optional)
- outputDirectory: Directory to save output (optional)
Generate images based on text prompts.
Tool: text_to_image
Parameters:
- prompt: Image description (required)
- model: Model version (default: 'image-01')
- aspectRatio: Aspect ratio (default: '1:1')
- n: Number of images to generate (default: 1)
- promptOptimizer: Whether to optimize the prompt (default: true)
- subjectReference: Path to reference image (optional)
- outputDirectory: Directory to save output (optional)
- outputFile: Path to save output (optional)
- asyncMode: Whether to use async mode (default: false)
Generate videos based on text prompts.
Tool: generate_video
Parameters:
- prompt: Video description (required)
- model: Model version (default: 'MiniMax-Hailuo-02')
- firstFrameImage: Path to first frame image (optional)
- duration: Video duration in seconds (optional)
- resolution: Video resolution (optional)
- outputDirectory: Directory to save output (optional)
- outputFile: Path to save output (optional)
- asyncMode: Whether to use async mode (default: false)
Query the status of an asynchronous video generation task.
Tool: query_video_generation
Parameters:
- taskId: The Task ID to query (required)
- outputDirectory: Directory to save output (optional)
Generate music from prompt and lyrics.
Tool: music_generation
Parameters:
- prompt: Music creation inspiration (required)
- lyrics: Song lyrics for music generation (required)
- sampleRate: Sample rate in Hz (default: 32000)
- bitrate: Bitrate in bps (default: 128000)
- format: Output format (default: 'mp3')
- outputDirectory: Directory to save output (optional)
Generate a voice based on description prompts.
Tool: voice_design
Parameters:
- prompt: The prompt to generate the voice from (required)
- previewText: The text to preview the voice (required)
- voiceId: The ID of the voice to use (optional)
- outputDirectory: Directory to save output (optional)
MiniMax MCP JS supports three transport modes:
Feature | stdio (default) | REST | SSE |
---|---|---|---|
Environment | Local only | Local or cloud | Local or cloud |
Communication | Via standard I/O | Via HTTP requests | Via server-sent events |
Use Cases | Local MCP client integration | API services, cross-language calls | Applications requiring server push |
Input Restrictions | Supports local files or URL resources | URL input recommended for cloud deployment | URL input recommended for cloud deployment |
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "minimax-mcp-js" '{"command":"npx","args":["-y","minimax-mcp-js"],"env":{"MINIMAX_API_HOST":"<https://api.minimaxi.chat|https://api.minimax.chat>","MINIMAX_API_KEY":"<your-api-key-here>","MINIMAX_MCP_BASE_PATH":"<local-output-dir-path, such as /User/xxx/Desktop>","MINIMAX_RESOURCE_MODE":"<optional, [url|local], url is default, audio/image/video are downloaded locally or provided in URL format>"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"minimax-mcp-js": {
"command": "npx",
"args": [
"-y",
"minimax-mcp-js"
],
"env": {
"MINIMAX_API_HOST": "<https://api.minimaxi.chat|https://api.minimax.chat>",
"MINIMAX_API_KEY": "<your-api-key-here>",
"MINIMAX_MCP_BASE_PATH": "<local-output-dir-path, such as /User/xxx/Desktop>",
"MINIMAX_RESOURCE_MODE": "<optional, [url|local], url is default, audio/image/video are downloaded locally or provided in URL format>"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"minimax-mcp-js": {
"command": "npx",
"args": [
"-y",
"minimax-mcp-js"
],
"env": {
"MINIMAX_API_HOST": "<https://api.minimaxi.chat|https://api.minimax.chat>",
"MINIMAX_API_KEY": "<your-api-key-here>",
"MINIMAX_MCP_BASE_PATH": "<local-output-dir-path, such as /User/xxx/Desktop>",
"MINIMAX_RESOURCE_MODE": "<optional, [url|local], url is default, audio/image/video are downloaded locally or provided in URL format>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect