Setup guide - Documented by MiniMax
Use MiniMax in Claude Code
MiniMax documents a dedicated Claude Code setup: point Claude Code at MiniMax's Anthropic-compatible endpoint (https://api.minimax.io/anthropic) via ~/.claude/settings.json env entries, or use MiniMax's one-click mmx-cli setup wizard.
Last verified 5 steps3 official sources
Steps
- Step 1.
Clear these environment variables first. MiniMax notes they take priority over the settings file and override the MiniMax configuration (also remove any exports of them from ~/.bashrc or ~/.zshrc).
Terminalunset ANTHROPIC_AUTH_TOKEN unset ANTHROPIC_BASE_URL - Step 2.
Option 1 (one-click setup wizard): run the wizard and select Claude Code. It runs the official installer if needed, checks
claude --version, updates~/.claude/settings.json, and adds the MiniMax model list.Terminalnpx -y mmx-cli@latest agent setup - Step 3.
Option 2 (edit the settings file): edit or create ~/.claude/settings.json and replace <MINIMAX_API_KEY> with your Subscription Key.
JSON{ "env": { "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic", "ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>", "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "524288", "ANTHROPIC_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3.1-Flash-Preview[1m]", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3.1-Flash-Preview[1m]" } } - Step 4.
Go to your working directory, run
claude, and select Trust This Folder to start.Terminalclaude - Step 5.
Verify inside the TUI: /status should show ANTHROPIC_BASE_URL pointing to api.minimax.io/anthropic, and /model should show the active model as MiniMax-M3.1-Flash-Preview.
Snippet/status /model
Caveats
- The guide lives under MiniMax's M Plan docs and uses an M Plan Subscription Key. MiniMax's SDK pages state 'MiniMax-M3.1-Flash-Preview is available only through M Plan and MiniMax Code for now.' Pay-as-you-go API key holders would substitute another model listed on the Anthropic-compatible page (for example MiniMax-M3); that substitution is not shown in the Claude Code guide itself.
- The [1m] suffix on the model id is part of MiniMax's documented Claude Code settings (declares the 1M context window to Claude Code); the bare API model id is MiniMax-M3.1-Flash-Preview.
- MiniMax-M3.1-Flash-Preview always enables thinking and cannot turn it off.
- MiniMax recommends a 512K auto-compaction window (CLAUDE_CODE_AUTO_COMPACT_WINDOW=524288); it reports ~20% lower estimated cost vs 1M with similar performance in its own ProgramBench comparison.
- A third documented option uses the third-party CC Switch app; omitted here as it is not an official tool.
More setup guides
Same tool, other providers
Related reading
- MiniMax H3: An Omni-Modal Video Model With Native Audio, 2K Output, and Open Weights ComingMiniMax H3 turns text, image, video and audio input into 2K video with native stereo sound at 0.80 CNY per second, with open weights promised to follow.
- MiniMax M2.5 for Developers: The Anthropic-Compatible Budget Frontier ModelMiniMax M2.5 hits 80.2% on SWE-bench Verified and plugs into the Anthropic SDK with two environment variables. Here is what you need to know before switching.
- Claude Code Idle Compaction: What It Does and How to Turn It OffClaude Code 2.1.299 compacts sessions over 200K tokens after about 54 idle minutes. How the cache math works, the setting to turn it off, and when to keep it.
- Claude Code Desktop SneakPeek Flaw: Fixed Version and What To DoSneakPeek (CVSS 8.7) let a poisoned HTML file read SSH keys and cloud credentials via the Claude Code Desktop preview pane. Fixed in Claude Desktop 1.30096.1.
- Reverse Engineer Anything (REA): What the MCP Server Does and Where the Line IsREA (Reverse Engineer Anything) is an MIT-licensed MCP server that lets Claude Code, Codex or Cursor inspect binaries, Electron apps and APKs. How to try it.
- Claude Code Projects: Coordinator, Threads, and LimitsClaude Code Projects is open to waitlisted Pro and Max users. How the coordinator and cloud threads work, what they cost in plan limits and where it breaks.
FAQ
How do I use MiniMax in Claude Code?
MiniMax documents a dedicated Claude Code setup: point Claude Code at MiniMax's Anthropic-compatible endpoint (https://api.minimax.io/anthropic) via ~/.claude/settings.json env entries, or use MiniMax's one-click mmx-cli setup wizard.
Which MiniMax model ids work in Claude Code?
The official docs read for this guide list MiniMax-M3.1-Flash-Preview, MiniMax-M3, MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5 and MiniMax-M2.5-highspeed. Requests go to https://api.minimax.io/anthropic.
Is this an official MiniMax and Claude Code setup?
MiniMax documents this setup in its own docs. It was last checked against 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- platform.minimax.iohttps://platform.minimax.io/docs/m-plan/claude-code.md
- platform.minimax.iohttps://platform.minimax.io/docs/api-reference/text-anthropic-api.md
- platform.minimax.iohttps://platform.minimax.io/docs/faq/models.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.