Skip to main content
Glama

minimax-mcp-api

A Model Context Protocol (MCP) server written in NestJS that wraps the MiniMax platform APIs and exposes them as MCP tools over stdio (local) or streamable HTTP (remote). The transport is picked at startup with MCP_TRANSPORT.

Prerequisites

  • Node.js ≥ 22 (per engines.node in package.json). Older versions lack the TypeScript target support used in tsconfig.build.json.

Related MCP server: minimax-llm-mcp

Install

npm install

Build

npm run build

Run (stdio)

node dist/main.js

Run (HTTP)

MCP_TRANSPORT=http MCP_AUTH_TOKEN=change-me PORT=3000 node dist/main.js
# or: npm run start:http   (with MCP_AUTH_TOKEN set in .env)

Serves streamable HTTP at POST /mcp. Every request must send Authorization: Bearer <MCP_AUTH_TOKEN>; anything else gets 401.

Environment variables

Variable

Required

Default

Description

MINIMAX_API_KEY

Yes

—

Bearer token for the MiniMax API

MINIMAX_API_URL

No

https://api.minimax.io

Base URL for the MiniMax API

LOG_LEVEL

No

log

One of debug | log | warn | error

NODE_ENV

No

development

One of development | production | test

MCP_TRANSPORT

No

stdio

stdio or http

PORT

No

3000

HTTP listen port (http only)

MCP_AUTH_TOKEN

When http

—

Bearer token clients must send (http only)

Copy .env.example to .env and fill in MINIMAX_API_KEY before running.

MCP tools

Domain

Tool

Endpoint

Speech

speech_t2a_http

POST /v1/t2a_v2

Speech

speech_t2a_async_create

POST /v1/t2a_async_v2

Speech

speech_t2a_async_query

GET /v1/query/t2a_async_query_v2

Speech

speech_voice_clone

POST /v1/voice_clone

Video

video_text_to_video

POST /v1/video_generation

Video

video_image_to_video

POST /v1/video_generation

Video

video_agent_create

POST /v1/video_generation

Video

video_agent_query

GET /v1/query/video_template_generation

Image

image_text_to_image

POST /v1/image_generation

Image

image_to_image

POST /v1/image_generation

Music

music_generate

POST /v1/music_generation

File

files_upload

POST /v1/files/upload

File

files_list

GET /v1/files/list

File

files_retrieve

GET /v1/files/retrieve

File

files_retrieve_content

GET /v1/files/retrieve_content

File

files_delete

DELETE /v1/files/delete

(16 tools total over 5 domains.)

Configure Claude Desktop

Add to ~/.config/claude_desktop_config.json (note: the path to dist/main.js must be absolute):

{
  "mcpServers": {
    "minimax": {
      "command": "node",
      "args": ["/abs/path/to/minimax-mcp-api/dist/main.js"],
      "env": {
        "MINIMAX_API_KEY": "sk-..."
      }
    }
  }
}

Connect over HTTP (Claude Code)

claude mcp add --transport http minimax http://<host>:3000/mcp \
  --header "Authorization: Bearer <MCP_AUTH_TOKEN>"

Note: files_upload reads file_path from the server's filesystem, so over HTTP it can only upload files that exist on the host running the server.

Probe with MCP Inspector

npm run inspect

Troubleshooting

  • 401/403 from any tool — MINIMAX_API_KEY is missing, malformed, or revoked. Verify with echo $MINIMAX_API_KEY and recopy the key from the MiniMax dashboard.

  • npm run build fails with TypeScript errors — Node version mismatch. Check node -v returns v22.x; older Node lacks the target support configured in tsconfig.build.json.

  • Claude Desktop can't connect — confirm args[0] is an absolute path to dist/main.js (not relative) and that the file exists (run npm run build first).

  • MINIMAX_API_URL change has no effect — stdio MCP servers read environment variables at startup only. Restart Claude Desktop (or the stdio process) after editing .env.

License

UNLICENSED — private project, not for redistribution.

Available Tools

16 tools
files_deleteB

Delete a file by file_id.

Inputs: file_id (required).

files_listB

List uploaded files, optionally filtered by purpose.

Inputs: after, limit, order, purpose.

files_retrieveA

Get metadata for a single file by file_id.

Inputs: file_id (required).

files_retrieve_contentA

Download a file. By default returns a summary (filename + bytes + content-type); pass as_hex=true to inline small file content as a hex string.

Inputs: file_id (required), as_hex.

files_uploadA

Upload a file (document, audio, image, etc.) for downstream use. Use purpose=voice_clone before speech_voice_clone.

Inputs: purpose (required), file_path (required), filename.

image_text_to_imageB

Generate images from a text prompt. Returns image URLs (typically valid 24h).

Inputs: model (required), prompt (required), n, seed, +6 more.

image_to_imageC

Transform a reference image guided by an optional prompt. Returns image URLs.

Inputs: model (required), image_url (required), n, seed, +5 more.

music_generateA

Generate music. Provide lyrics for vocal tracks; set is_instrumental=true for instrumental. music-cover* models require audio_url/audio_base64/cover_feature_id.

Inputs: model (required), lyrics, prompt, stream, +7 more.

speech_t2a_async_createA

Create an async long-text T2A task (up to 1M chars via text_file_id, or 50k via text). Returns a task_id to poll with speech_t2a_async_query.

Inputs: model (required), voice_id (required), vol, text, +13 more.

speech_t2a_async_queryA

Poll an async T2A task created by speech_t2a_async_create. Returns status (success|failed|expired|processing) and a file_id on success.

Inputs: task_id (required).

speech_t2a_httpA

Synchronous text-to-speech synthesis (≤10,000 chars). Returns audio URL + metadata. Use output_format="url" to receive a 24h-valid URL.

Inputs: text (required), model (required), voice_id (required), vol, +18 more.

speech_voice_cloneA

Clone a voice from an uploaded file_id (purpose=voice_clone). Cloned voices must be used within 168 hours or they are auto-deleted. Returns a demo_audio preview URL.

Inputs: file_id (required), voice_id (required), text, model, +6 more.

video_agent_createB

Create a video template/agent task. Returns a task_id to poll with video_agent_query.

Inputs: inputs (required), template_id (required), callback_url.

video_agent_queryA

Poll a video task. Returns status (Preparing|Processing|Success|Fail) and a video_url valid 9h on Success.

Inputs: task_id (required).

video_image_to_videoA

Generate a video from an input image (and optional prompt). Returns a task_id — poll with video_agent_query.

Inputs: model (required), image_url (required), prompt, duration, +3 more.

video_text_to_videoA

Generate a video from a text prompt. Returns a task_id — poll with video_agent_query.

Inputs: model (required), prompt (required), duration, resolution, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool targets a distinct function: file operations, image generation, music generation, speech synthesis (sync and async), voice cloning, and video generation. No two tools have overlapping purposes.

    Naming Consistency4/5

    Tools follow a consistent area_action pattern (e.g., files_delete, speech_t2a_async_create). Minor variations exist like 'image_to_image' versus 'image_text_to_image', and the use of 'agent' for video template tasks, but overall naming is predictable.

    Tool Count4/5

    16 tools cover a broad multi-modal domain without being excessive. Each tool serves a clear purpose, though some sub-areas (e.g., file management) have many tools while others have few.

    Completeness4/5

    File operations are complete (CRUD). Speech covers sync/async TTS and voice cloning. Video covers generation from text/image and agent tasks. Minor gaps like missing audio upload or image editing but domain scope is well-covered.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers