AI Models

How to Use MiniMax M3 in Claude Code (Setup Guide)

Published
Jun 2, 2026
Duration
6:46
Module
AI Models
Click to load the YouTube player

Video summary

Companion notes

You can run Claude Code with MiniMax M3 as the model in roughly four terminal commands — no Anthropic key required.

Prerequisites

You need Node.js + npm and a MiniMax API key. Either the Coding Plan key or pay-as-you-go works. The demo runs on a VPS.

Install Claude Code

Use the China npm mirror for faster installs, then npm install -g @anthropic-ai/claude-code to grab the CLI globally. Caveat from the creator: "Anthropic is trying to remove npm installs completely. They want to push more towards the native install, but for now, this still works." If Anthropic kills the npm path, the rest of this guide breaks.

Clear Conflicting Env Vars

If you've used Claude Code with Anthropic before, unset ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL, and scrub them from ~/.bashrc. Otherwise "Claude Code will hit Anthropic's endpoint instead of MiniMax."

Point Claude Code at MiniMax

In ~/.claude/settings.json, paste MiniMax's official Anthropic-compatible config block. Set the auth_token field to your MiniMax key. For users in China, the base URL is minimaxi.com/anthropic; everywhere else use the standard MiniMax endpoint. No Anthropic key needed — "you just need your MiniMax key for the auth token."

Verify and Use

Run claude, then /context. Confirmed: "model version MiniMax M3" with a 200K token window. The 1M context window MiniMax M3 advertises isn't exposed through this endpoint — "there's no section here that shows that the context window can be adjusted back to 1 million." The creator expects an update but says the current config block is the only accepted one. Good first task: cd into a project directory and ask it to audit code. Enable verbose mode (Ctrl+O) to see think blocks. For web search and image understanding mid-session, add the MiniMax Coding Plan MCP — two extra tools, optional.

Watch on YouTube

Prefer the native player? Open it on YouTube: https://www.youtube.com/watch?v=_jHW4b7VHLo