MiniMax MCP JS

MiniMax MCP JS

By MiniMax-AI GitHub

Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.

text-to-speech mcp
Overview

What is MiniMax MCP JS?

MiniMax MCP JS is a JavaScript/TypeScript implementation of the MiniMax Model Context Protocol (MCP), enabling seamless integration with MiniMax's AI capabilities, including image generation, video generation, text-to-speech, and voice cloning APIs.

How to use MiniMax MCP JS?

To use MiniMax MCP JS, install the package via pnpm and configure it with your API key from the MiniMax International Platform. You can then interact with MCP-compatible clients like Claude AI or Cursor.

Key features of MiniMax MCP JS?

  • Text-to-Speech (TTS) functionality
  • Image and video generation capabilities
  • Voice cloning features
  • Dynamic configuration options
  • Compatibility with various MCP platforms

Use cases of MiniMax MCP JS?

  1. Generating images based on text prompts.
  2. Creating videos from textual descriptions.
  3. Cloning voices for audio applications.
  4. Converting text to speech for various applications.

FAQ from MiniMax MCP JS?

  • What platforms does MiniMax MCP JS support?

    It supports various MCP platforms like ModelScope and others.

  • Is there a cost associated with using MiniMax MCP JS?

    Yes, using these tools may incur costs depending on the usage.

  • How do I configure the API key?

    You can configure the API key through environment variables, command line arguments, or request parameters.

Content

export

MiniMax MCP JS

JavaScript/TypeScript implementation of MiniMax MCP, providing image generation, video generation, text-to-speech, and more.

Documentation

Features

  • Text-to-Speech (TTS)
  • Image Generation
  • Video Generation
  • Voice Cloning
  • Dynamic configuration (supports both environment variables and request parameters)
  • Compatible with MCP platform hosting (ModelScope and other MCP platforms)

Installation

# Install with pnpm (recommended)
pnpm add minimax-mcp-js

Quick Start

MiniMax MCP JS implements the Model Context Protocol (MCP) specification and can be used as a server to interact with MCP-compatible clients (such as Claude AI).

Quickstart with MCP Client

  1. Get your API key from MiniMax International Platform.
  2. Install minimax-mcp-js using pnpm: pnpm add minimax-mcp-js
  1. Install the CLI tool globally:
# Install globally
pnpm install -g minimax-mcp-js
  1. Configure your MCP client:

Claude Desktop

Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include:

{
  "mcpServers": {
    "minimax-mcp-js": {
      "command": "npx",
      "args": [
        "minimax-mcp-js"
      ],
      "env": {
        "MINIMAX_API_HOST": "https://api.minimaxi.chat",
        "MINIMAX_API_KEY": "<your-api-key-here>",
        "MINIMAX_MCP_BASE_PATH": "<local-output-dir-path>",
        "MINIMAX_RESOURCE_MODE": "url"
      }
    }
  }
}

Cursor

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. For more information, see this discussion thread.

That's it. Your MCP client can now interact with MiniMax through these tools.

For local development: When developing locally, you can use npm link to test your changes:

# In your project directory
npm link

Then configure Claude Desktop or Cursor to use npx as shown above. This will automatically use your linked version.

⚠️ Note: The API key needs to match the host address. Different hosts are used for global and mainland China versions:

  • Global Host: https://api.minimaxi.chat (note the extra "i")
  • Mainland China Host: https://api.minimaxi.chat

Transport Modes

MiniMax MCP JS supports three transport modes:

Featurestdio (default)RESTSSE
EnvironmentLocal onlyLocal or cloud deploymentLocal or cloud deployment
CommunicationVia standard I/OVia HTTP requestsVia server-sent events
Use CasesLocal MCP client integrationAPI services, cross-language callsApplications requiring server push
Input RestrictionsSupports local files or URL resourcesWhen deployed in cloud, URL input recommendedWhen deployed in cloud, URL input recommended

Configuration

MiniMax-MCP-JS provides multiple flexible configuration methods to adapt to different use cases. The configuration priority from highest to lowest is as follows:

1. Request Parameter Configuration (Highest Priority)

In platform hosting environments (like ModelScope or other MCP platforms), you can provide an independent configuration for each request via the meta.auth object in the request parameters:

{
  "params": {
    "meta": {
      "auth": {
        "api_key": "your_api_key_here",
        "api_host": "https://api.minimaxi.chat",
        "base_path": "/path/to/output",
        "resource_mode": "url"
      }
    }
  }
}

This method enables multi-tenant usage, where each request can use different API keys and configurations.

2. API Configuration

When used as a module in other projects, you can pass configuration through the startMiniMaxMCP function:

import { startMiniMaxMCP } from 'minimax-mcp-js';

await startMiniMaxMCP({
  apiKey: 'your_api_key_here',
  apiHost: 'https://api.minimaxi.chat',
  basePath: '/path/to/output',
  resourceMode: 'url'
});

3. Command Line Arguments

When used as a CLI tool, you can provide configuration via 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

4. Environment Variables (Lowest Priority)

The most basic configuration method is through 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

Configuration Priority

When multiple configuration methods are used, the following priority order applies (from highest to lowest):

  1. Request-level configuration (via meta.auth in each API request)
  2. Command line arguments
  3. Environment variables
  4. Configuration file
  5. Default values

This prioritization ensures flexibility across different deployment scenarios while maintaining per-request configuration capabilities for multi-tenant environments.

Configuration Parameters

ParameterDescriptionDefault Value
apiKeyMiniMax API KeyNone (Required)
apiHostMiniMax API Hosthttps://api.minimaxi.chat
basePathBase path for output filesUser's desktop
resourceModeResource handling mode, 'url' or 'local'url

⚠️ Note: The API key needs to match the host address. Different hosts are used for global and mainland China versions:

  • Global Host: https://api.minimaxi.chat (note the extra "i")
  • Mainland China Host: https://api.minimaxi.chat

Example usage

⚠️ Warning: Using these tools may incur costs.

1. broadcast a segment of the evening news

2. clone a voice

3. generate a video

4. generate images

Available Tools

Text to Audio

Convert text to speech audio file.

Parameters:

  • text: Text to convert (required)
  • model: Model version, options are 'speech-02-hd', 'speech-02-turbo', 'speech-01-hd', 'speech-01-turbo', 'speech-01-240228', 'speech-01-turbo-240228', default is 'speech-02-hd'
  • voiceId: Voice ID, default is 'male-qn-qingse'
  • speed: Speech speed, range 0.5-2.0, default is 1.0
  • vol: Volume, range 0.1-10.0, default is 1.0
  • pitch: Pitch, range -12 to 12, default is 0
  • emotion: Emotion, options are 'happy', 'sad', 'angry', 'fearful', 'disgusted', 'surprised', 'neutral', default is 'happy'. Note: This parameter only works with 'speech-02-hd', 'speech-02-turbo', 'speech-01-turbo', 'speech-01-hd' models
  • format: Audio format, options are 'mp3', 'pcm', 'flac', 'wav', default is 'mp3'
  • sampleRate: Sample rate (Hz), options are 8000, 16000, 22050, 24000, 32000, 44100, default is 32000
  • bitrate: Bitrate (bps), options are 64000, 96000, 128000, 160000, 192000, 224000, 256000, 320000, default is 128000
  • channel: Audio channels, options are 1 or 2, default is 1
  • languageBoost: Language boost, default is 'auto'
  • latexRead: Enable LaTeX formula reading
  • pronunciationDict: Pronunciation dictionary
  • stream: Enable streaming output
  • subtitleEnable: Enable subtitle generation
  • outputDirectory: Directory to save the output file (optional)
  • outputFile: Path to save the output file (optional, auto-generated if not provided)

Text to Image

Generate images based on text prompts.

Parameters:

  • prompt: Image description (required)
  • model: Model version, default is 'image-01'
  • aspectRatio: Aspect ratio, default is '1:1', options are '1:1', '16:9','4:3', '3:2', '2:3', '3:4', '9:16', '21:9'
  • n: Number of images to generate, range 1-9, default is 1
  • promptOptimizer: Whether to optimize the prompt, default is true
  • subjectReference: Path to local image file or public URL for character reference (optional)
  • outputDirectory: Directory to save the output file (optional)
  • outputFile: Path to save the output file (optional, auto-generated if not provided)

Generate Video

Generate videos based on text prompts.

Parameters:

  • prompt: Video description (required)
  • model: Model version, options are 'T2V-01', 'T2V-01-Director', 'I2V-01', 'I2V-01-Director', 'I2V-01-live', 'S2V-01', default is 'T2V-01'
  • firstFrameImage: Path to first frame image (optional)
  • outputDirectory: Directory to save the output file (optional)
  • outputFile: Path to save the output file (optional, auto-generated if not provided)

Voice Clone

Clone a voice from an audio file.

Parameters:

  • audioFile: Path to audio file (required)
  • voiceId: Voice ID (required)
  • text: Text for demo audio (optional)
  • outputDirectory: Directory to save the output file (optional)

Development

Setup

# Clone the repository
git clone https://github.com/MiniMax-AI/MiniMax-MCP-JS.git
cd minimax-mcp-js

# Install dependencies
pnpm install

Build

# Build the project
pnpm run build

Run

# Run the MCP server
pnpm start

License

MIT

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details