Claude Code Configuration

Pay-as-you-go MiMo API and Token Plan both support Claude Code. Refer to this guide for configuration and usage.

Prerequisites

Obtain Credentials

Supports two usage methods, but the corresponding credential acquisition methods are different:

Usage Method Description Acquisition Method (BASE_URL and API Key below are examples)
Pay-as-you-go MiMo API Charged based on actual usage, suitable for light use
  • BASE_URL
    • Anthropic Compatibility Protocol: https://api.xiaomimimo.com/anthropic
  • API Key
    • Format: sk-xxxxx

Go to API Keys to create an API Key
Token Plan Fixed subscription fee, with limited calls based on the package
  • BASE_URL
    • Anthropic Compatibility Protocol: https://token-plan-cn.xiaomimimo.com/anthropic
  • API Key
    • Format: tp-xxxxx

After successful subscription, go to Subscription to obtain the exclusive Base URL and API Key

Use Claude Code CLI

Install Claude Code CLI

Claude Code requires Node.js 18 or later.

  • Linux/macOS: No additional setup needed, the default environment is sufficient.

  • Windows: Install WSL or Git for Windows, then run the command below in WSL or Git Bash.

Installation command:

npm install -g @anthropic-ai/claude-code

Verify the installation (a version number output indicates success):

claude --version

Do not launch Claude Code immediately after installation. Complete the configuration below first.

Configure Basic Settings

Before configuring, make sure to clear the following Anthropic official environment variables to avoid API conflicts: ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL

1. Create/edit settings.json

If the .claude directory does not exist, you can create it manually.

  • macOS/Linux: ~/.claude/settings.json

  • Windows: User directory\.claude\settings.json

Please replace BASE_URL (Anthropic Compatibility Protocol) and MIMO_API_KEY as needed.

For MiMo models that support 1M context, you can append the [1m] suffix to the model ID to enable extended context capacity. Example: mimo-v2.5-pro[1m]. After configuration, restart Claude Code and run the /context command to verify whether the long context takes effect.

{
  "env": {
    "ANTHROPIC_BASE_URL": "BASE_URL",
    "ANTHROPIC_AUTH_TOKEN": "MIMO_API_KEY",
    "ANTHROPIC_MODEL": "mimo-v2.5-pro",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "mimo-v2.5-pro",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "mimo-v2.5-pro",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "mimo-v2.5-pro"
  }
}

2. Create/edit .claude.json

  • macOS/Linux: ~/.claude.json

  • Windows: User directory\.claude.json

    {
      "hasCompletedOnboarding": true
    }
    

3. Apply the configuration

After completing the configuration, reopen the terminal window for the changes to take effect.

Use Claude Code CLI

Navigate to your project directory and run:

claude

On first launch, complete the following: select "Trust This Folder" to allow Claude Code to access project files. After startup, use the /status command to verify the current configuration and model status.

Use the Claude Code IDE Plugin

Claude Code provides a VS Code IDE plugin. For configuration reference, see the official documentation Use Claude Code in VS Code.

Install Plugin

Search for and install the Claude Code for VS Code plugin from the VS Code Extensions marketplace.

图片

Configure the Model

Open VS Code settings, search for Claude Code: Environment Variables, and then manually configure it in settings.json:

{
  "claudeCode.preferredLocation": "panel",
  "claudeCode.selectedModel": "mimo-v2.5-pro",
  "claudeCode.environmentVariables": [
    {
      "name": "ANTHROPIC_BASE_URL",
      "value": "BASE_URL"
    },
    {
      "name": "ANTHROPIC_AUTH_TOKEN",
      "value": "MIMO_API_KEY"
    },
    {
      "name": "ANTHROPIC_DEFAULT_SONNET_MODEL",
      "value": "mimo-v2.5-pro"
    },
    {
      "name": "ANTHROPIC_DEFAULT_OPUS_MODEL",
      "value": "mimo-v2.5-pro"
    },
    {
      "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL",
      "value": "mimo-v2.5-pro"
    }
  ]
}

If Claude Code CLI is already installed, the VS Code plugin will automatically reuse the CLI configuration. To configure independently, specify the environment variables in the plugin settings as shown above.

FAQ

Installation fails on Windows?

Ensure the following dependencies are installed:

  • Node.js 18+

  • Git for Windows

If you encounter permission issues with npm, try running the terminal as administrator, or use nvm to manage Node.js versions.

Update Time May 13, 2026
We use cookies and similar technologies of our own to ensure the proper functioning of the website, customize content according to user preferences and analyze users' interactions on the website, as well as their browsing habits. You can find more information in our Cookie Policy. Select an option or go to Cookie Settings to manage your preferences. Learn More.