MiMo Code: Free Open-Source AI Coding Agent with Persistent Memory

A free-for-limited-time coding agent that works in your terminal, handles repository changes, and connects to Xiaomi MiMo or custom model providers.

MiMoCode is a free, open-source AI coding agent from Xiaomi’s MiMo team. It runs in the terminal, reads and edits repositories, executes commands, manages Git, and works as an alternative to Claude Code.

You can begin with the MiMo Auto model channel. It’s now free for a limited time and requires no account or API key. The agent also accepts Xiaomi MiMo OAuth login, imported Claude Code authentication, and custom OpenAI-compatible providers.

MiMoCode keeps project memory across sessions through files, checkpoints, task records, and SQLite full-text search.

Build, Plan, and Compose modes cover direct coding, read-only analysis, and skill-based orchestration.

Deterministic workflows can divide larger jobs among agents and carry structured results through implementation, verification, review, and merge steps.

Features

  • 3 built-in agents: Build has full tool access, Plan restricts changes for code exploration, and Compose coordinates specs-driven work through named skills.
  • Persistent project memory records knowledge and architecture decisions in MEMORY.md, while checkpoint.md, scratch notes, task progress, and SQLite history carry session state.
  • Context reconstruction draws from the latest checkpoint, project memory, task records, and recent messages when the model approaches its context limit. A token budget controls how much stored material returns to the session.
  • The /goal command defines a natural-language stop condition. An independent judge checks the conversation when the agent tries to finish and returns any unmet requirement.
  • The /dream command extracts durable knowledge from recent session traces and removes outdated memory entries. The /distill command finds repeated manual procedures and packages suitable patterns as skills, agents, or commands.
  • Subagents share the session context and can run parallel or background tasks. The experimental orchestrator adds child-session delegation, progress and stall tracking, fan-in aggregation, and isolated Git worktrees.
  • Built-in Compose, deep-research, and fact-check workflows use fixed phase sequences, bounded retries, structured handoffs, and automatic parallel work where the task permits it.
  • Built-in skills cover office documents, PDFs, spreadsheets, presentations, research, design, video generation, Python development, and skill authoring. Project or personal skills can override a built-in skill with the same name.
  • Slash skills are enabled by default since v0.1.6. Typing one /skill-name loads that skill, while two or more skill references load their contents and add an orchestration plan.
  • The /modalities command configures image, audio, video, and PDF input capabilities for a custom model inside the TUI.
  • Real-time voice input uses TenVAD and MiMo ASR. It requires Xiaomi MiMo login and sox; compatible OpenAI-style providers can supply a separate voice control model.
  • Provider configuration accepts Xiaomi MiMo, the temporary MiMo Auto channel, imported Claude Code authentication, and custom OpenAI-compatible APIs. A local model can connect through a compatible local API endpoint.
  • MCP configuration connects local or remote Model Context Protocol servers. MiMoCode also has LSP integration, custom agents, custom commands, plugins, file hooks, formatters, themes, and custom tools.
  • Permission rules can allow, deny, or ask for specific actions. Destructive shell operations receive a second prompt, and unattended modes carry explicit warnings because they can expose files and commands.
  • Experimental Max Mode generates several candidate responses and uses a judge to select one. It consumes more model calls and tokens than a normal turn.

MiMo Code vs Claude Code

MiMo Code and Claude Code are both coding agents that inspect repositories, edit files, run terminal commands, work with Git, and connect to MCP servers.

MiMoCode exposes its TypeScript source and accepts several model providers. Claude Code is Anthropic’s commercial agent and centers on Claude models through a Claude subscription, the Anthropic API, Amazon Bedrock, or Google Vertex AI.

MiMo CodeClaude Code
ProductOpen-sourceCommercial coding agent
SourceMIT-licensedProprietary distribution
Model accessMiMo Auto, Xiaomi, imported Claude auth, or custom APIClaude subscription, Anthropic API, Bedrock, or Vertex AI
Free accessMiMo Auto is free for a limited timeNo equivalent open anonymous channel
MemoryProject files, checkpoints, task records, SQLiteProject instructions, memory, and session history
Primary modesBuild, Plan, ComposeNormal and permission-based modes
Multi-agent workSubagents, Compose, workflows, experimental orchestratorSubagents and Agent SDK
AutomationHeadless runs and deterministic workflowsHeadless CLI, hooks, SDK, GitHub Actions
LLM ProviderCustom OpenAI-compatible providersClaude endpoints and supported enterprise hosts
CustomizationSkills, agents, workflows, plugins, tools, hooksSkills, agents, hooks, MCP, plugins
Desktop and IDETerminal, desktop app, and IDE extensionsTerminal, desktop, VS Code, and JetBrains
Cost basisTemporary free channel or chosen providerClaude plan, API, or cloud usage

Get Started with MiMoCode

Install MiMoCode on macOS or Linux:

curl -fsSL https://mimo.xiaomi.com/install | bash

Use the native PowerShell installer on Windows:

powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"

The npm package works on all supported platforms:

npm install -g @mimo-ai/cli

Open a project directory and run the mimo command. The first launch presents MiMo Auto, Xiaomi MiMo OAuth, Claude Code authentication import, and custom provider setup. MiMo Auto needs no login or API key during its limited free period. A custom provider needs an OpenAI-compatible base URL, a model entry, and any credentials required by that service.

mimo

Select Build, Plan, or Compose before sending the first message. After v0.1.6, Build and Plan can switch during a session, but entering Compose isolates that session after the first message. This keeps the available skill and tool set stable for the model.

Start with a concrete repository task, review the proposed file access, and inspect the resulting diff. Set a stop condition before a long autonomous run:

/goal all tests pass and the feature branch is committed

Load one skill by typing its slash name. You can reference several skills in a message when the job needs coordinated instructions:

/docx-official /research-paper-writing revise the attached paper

Rebuild a large session from its latest checkpoint when the context needs manual recovery. Use /skip-permissions only in a trusted disposable environment. Forced-ask operations such as destructive shell commands wait for approval and then reject after 60 seconds. Other actions that are not denied can proceed automatically while the toggle is active.

/rebuild

Run memory maintenance after a long project phase, or extract recurring procedures into reusable instructions:

/dream
/distill

Enable Max Mode in .mimocode/mimocode.jsonc when the extra provider usage is acceptable:

{
  "experimental": {
    "maxMode": true
  }
}

MiMoCode Cheat Sheet & Quick Reference

CLI Commands and Flags

CommandCommon options
mimo [project]--continue, --session, --fork, --prompt, --model, --agent, --port, --hostname
mimo run [message..]--command, --continue, --session, --fork, --model, --agent, --file, --format, --attach, --dangerously-skip-permissions
mimo attach [url]--dir, --session
mimo models [provider]--refresh, --verbose
mimo serve--port, --hostname, --mdns, --cors
mimo web--port, --hostname, --mdns, --cors
mimo session list--max-count, --format
mimo stats--days, --tools, --models, --project
mimo acp--cwd, --port, --hostname
mimo uninstall--keep-config, --keep-data, --dry-run, --force
mimo upgrade [target]--method
Global flags--help, --version, --print-logs, --log-level

Subcommands

CommandAction
mimo auth loginConfigure credentials for a model provider.
mimo auth listList authenticated providers.
mimo auth logoutRemove provider credentials.
mimo mcp addAdd a local or remote MCP server.
mimo mcp listShow configured servers and connection status.
mimo mcp auth [name]Authenticate with an OAuth-enabled MCP server.
mimo mcp logout [name]Remove MCP OAuth credentials.
mimo mcp debug <name>Debug an MCP OAuth connection.
mimo session listList saved MiMoCode sessions.

Slash Commands

CommandAction
/connectAdd a model provider and credentials.
/compactCompact the current session.
/detailsToggle tool execution details.
/editorOpen the configured external editor.
/exportExport the conversation to Markdown.
/initCreate or update AGENTS.md.
/modelsList available models.
/newStart a new session.
/redoRestore an undone message and file changes.
/sessionsList and switch sessions.
/shareShare the current session.
/thinkingToggle reasoning-block display.
/undoRemove the last message and revert its file changes.
/goalSet a natural-language stop condition.
/voiceStart streaming voice input.
/dreamRefresh persistent project memory.
/distillExtract reusable procedures from session history.
/rebuildRebuild context from the latest checkpoint.
/modalitiesSet custom model input modalities.
/skip-permissionsToggle unattended permission handling.
/skill-nameLoad a discovered skill by name.

Built-in Agents

AgentRole
buildDefault primary agent with full tool access.
planRead-only analysis and planning.
composeSkill-based orchestration for structured development.
generalGeneral subagent invoked by a primary agent.
exploreCodebase exploration subagent.

Compose Skills

SkillPurpose
compose:tddTest-driven development.
compose:debugSystematic debugging.
compose:verifyVerification before completion.
compose:brainstormFeature brainstorming with you.
compose:planImplementation planning.
compose:executeApproved plan execution.
compose:parallelParallel agent dispatch.
compose:reviewCode review requests.
compose:feedbackReview feedback handling.
compose:worktreeGit worktree operations.
compose:mergeDevelopment branch merge.
compose:subagentSubagent-driven development.
compose:new-skillNew skill authoring.

Built-in Workflows

WorkflowPurpose
composeBrainstorm, design, implement, verify, review, report, and merge a defined development job.
deep-researchPlan parallel research, inspect gaps, write a cited report, and review citations.
fact-checkSearch, extract claims, group duplicates, run adversarial cross-checks, and report findings.

Built-in Skills

SkillPurpose
arxivSearch and analyze arXiv papers.
docx-officialCreate and transform Word documents.
pdf-officialCreate, read, fill, and transform PDFs.
pptx-officialCreate and edit presentations.
xlsx-officialBuild and clean spreadsheets.
design-blueprintPrepare a visual design blueprint and decision trace.
frontend-designApply visual design guidance to interfaces.
html-to-video-pipelineRender HTML to MP4.
research-paper-writingWrite and polish academic papers.
skill-creatorCreate or improve agent skills.
evolveModify agent tools, hooks, knowledge, workflows, or UI.
loopSchedule recurring prompts.
mimocodeLoad MiMoCode feature and configuration reference.

Core Config Files

ScopeFile
Project.mimocode/mimocode.jsonc
Global~/.config/mimocode/mimocode.json
Project TUI.mimocode/tui.json
Credentials~/.local/share/mimocode/auth.json

Core Config Fields

FieldUse
$schemaSchema URL for completion and validation.
modelDefault model in provider and model format.
small_modelModel for lightweight tasks.
providerProvider connections and model entries.
disabled_providersProvider blocklist.
enabled_providersProvider allowlist.
agentCustom agent definitions.
default_agentDefault primary agent.
commandCustom command templates.
permissionAction and skill permission rules.
toolTool invocation settings.
mcpMCP server definitions.
pluginPlugin packages or local paths.
skillsAdditional skill paths and URLs.
lspLanguage Server Protocol integration.
formatterCode formatter settings.
instructionsInstruction file paths or globs.
shareManual, automatic, or disabled session sharing.
autoupdateAutomatic update behavior.
compactionContext compaction policy.
checkpointCheckpoint behavior and quotas.
snapshotSnapshot switch.
watcherFile watcher ignore rules.
serverSettings for web and server commands.
enterpriseEnterprise URL configuration.
usernameCustom display name.
logLevelRuntime log level.
experimentalOpt-in experimental features.

Environment Variables

VariableUse
MIMOCODE_HOMEOverride config, data, state, and cache roots.
MIMOCODE_CONFIGSet a custom config file.
MIMOCODE_CONFIG_DIRSet a custom config directory.
MIMOCODE_CONFIG_CONTENTProvide inline config JSON.
MIMOCODE_TUI_CONFIGSet a custom TUI config file.
MIMOCODE_PERMISSIONProvide inline permission JSON.
MIMOCODE_DBOverride the database file.
MIMOCODE_MODELS_URLSet a custom model manifest URL.
MIMOCODE_MODELS_PATHSet a local model manifest file.
MIMOCODE_GIT_BASH_PATHSet the Git Bash executable on Windows.
MIMOCODE_PUREActivate the pure runtime mode.
MIMOCODE_AUTO_SHAREShare sessions automatically.
MIMOCODE_DISABLE_SHAREDisable session sharing.
MIMOCODE_DISABLE_AUTOUPDATEDisable automatic update checks.
MIMOCODE_ALWAYS_NOTIFY_UPDATEAlways show version notifications.
MIMOCODE_DISABLE_AUTOCOMPACTDisable automatic context compaction.
MIMOCODE_DISABLE_PRUNEDisable old-data pruning.
MIMOCODE_DISABLE_TERMINAL_TITLEDisable terminal title changes.
MIMOCODE_DISABLE_MOUSEDisable TUI mouse capture.
MIMOCODE_DISABLE_DEFAULT_PLUGINSDisable default plugins.
MIMOCODE_DISABLE_LSP_DOWNLOADDisable automatic LSP downloads.
MIMOCODE_DISABLE_BUILTIN_SKILLSRemove all built-in skills.
MIMOCODE_DISABLE_OFFICIAL_SKILLSRemove built-in office and media skills.
MIMOCODE_DANGEROUSLY_SKIP_PERMISSIONSActivate unattended permission handling.
MIMOCODE_EXPERIMENTAL_ORCHESTRATORActivate experimental multi-session orchestration.
MIMOCODE_EXPERIMENTAL_CRONActivate cron and loop scheduling.

Alternatives and Related Resources

Pros

  • MIT-licensed source code.
  • Temporary free model channel.
  • Persistent cross-session memory.
  • Custom model providers.
  • Built-in multi-agent workflows.
  • Agent skills compatibility.
  • Native Windows installer.
  • MCP and LSP integration.

Cons

  • MiMo Auto access is temporary.
  • Permission bypass can expose data.
  • Max Mode consumes extra tokens.

FAQs

Q: What is MiMoCode?
A: MiMoCode is Xiaomi MiMo’s open-source AI coding agent. It works in the terminal and can inspect a repository, edit files, execute commands, manage Git, connect to MCP servers, and retain project knowledge across sessions.

Q: Is MiMoCode free?
A: The source code is available under the MIT License and separate use restrictions. MiMo Auto provides anonymous access with no API key for a limited time. A custom provider may charge for model usage, and Xiaomi-hosted services have their own terms.

Q: Does MiMoCode require signup?
A: MiMo Auto requires no signup during its limited free period. Xiaomi MiMo OAuth and voice input require an account. A custom OpenAI-compatible provider uses that provider’s credential and account rules.

Q: Is MiMoCode an alternative to Claude Code?
A: Yes. Both coding agents can read code, edit files, run commands, work with Git, and connect to MCP servers. MiMoCode is open source and accepts custom model providers. Claude Code is a commercial Anthropic product built around Claude models and Anthropic’s supported cloud channels.

Q: Can MiMoCode use Ollama or a local model?
A: MiMoCode accepts custom OpenAI-compatible providers. You can connect a local model when your Ollama setup or another local gateway exposes a compatible API and the selected model handles the tool calls required for coding work.

Q: Does MiMoCode support MCP servers?
A: Yes. The CLI can add, list, authenticate, debug, and remove local or remote MCP server connections. Permission rules should match the data and actions exposed by each server.

Q: How does MiMoCode preserve context in long sessions?
A: An independent checkpoint writer records structured session state. Context reconstruction draws from the checkpoint, project memory, task progress, and recent messages when the active model window approaches its limit. Budgeted injection limits the stored material returned to the model.

Q: What is the difference between Compose mode and a workflow?
A: Compose is an interactive primary agent that selects named skills during a conversation. A workflow is a deterministic JavaScript program with fixed phases, bounded retries, structured handoffs, and automatic parallel work. The workflow format fits a defined job that can run with little intervention.

Q: What is Max Mode?
A: Max Mode runs several candidate responses and uses a judge to select one. It can improve a difficult decision at the cost of more provider calls and tokens. Enable it under experimental.maxMode only when the extra usage is acceptable.

Q: Is permission skipping safe?
A: Permission skipping can let the agent run commands and access files with little or no confirmation. Use it inside a trusted disposable container, sandbox, or CI job. Keep explicit deny rules for sensitive paths and review the repository for malicious instructions first.

Last updated: July 17, 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!