Config Files

MiMo Code manages providers, models, server, tools, permissions, and other runtime parameters through JSON / JSONC config files. Multiple layers are merged on load, with the managed layer taking the highest precedence.

For load locations, merge rules, and scenario comparisons, see Config Overrides.


Top-level fields

FieldTypeDescription
$schemastringJSON Schema URL, enables editor completion and validation
modelstringDefault primary model, in the form provider_id/model_id
small_modelstringModel used for lightweight tasks (e.g. title generation)
providerobjectProvider connection and runtime options
disabled_providersarrayList of disabled provider IDs
enabled_providersarrayAllowlist of enabled providers
agentobjectCustom agent definitions
default_agentstringDefault agent
commandobjectCustom command templates
permissionobject | stringPermission rules for tool actions
toolobjectTool invocation style
mcpobjectMCP servers
pluginarrayList of plugin specs (npm package name or local path)
skillsobjectSkill load sources
lspobjectLSP integration
formatterobjectCode formatters
instructionsarrayInstruction file paths or globs
sharestring"manual" / "auto" / "disabled"
autoupdateboolean | "notify"Auto-update behavior
compactionobjectContext compaction policy
checkpointobjectCheckpoint thresholds and quotas
snapshotbooleanEnable snapshots (default true)
watcherobjectFile watcher ignore patterns
serverobjectmimo serve / mimo web server settings
enterpriseobjectEnterprise-related config (url)
usernamestringCustom username
logLevelstringLog level
experimentalobjectExperimental features, unstable

Full example

mimocode.jsonc
{
  "$schema": "https://mimo.xiaomi.com//config.json",
  "model": "mimo/mimo-v2.5-pro",
  "small_model": "mimo/mimo-v2.5-pro",
  "default_agent": "build",
  "share": "manual",
  "autoupdate": true,

  "provider": {
    "anthropic": {
      "options": { "timeout": 600000, "setCacheKey": true }
    }
  },

  "server": {
    "port": 4096,
    "hostname": "0.0.0.0",
    "mdns": true
  },

  "permission": {
    "*": "ask",
    "bash": "allow",
    "edit": "deny"
  },

  "compaction": { "auto": true, "prune": true, "tail_turns": 2 },
  "watcher": { "ignore": ["node_modules/**", "dist/**"] },

  "mcp": {},
  "plugin": ["mimocode-helicone-session"],
  "instructions": ["CONTRIBUTING.md"],

  "disabled_providers": ["openai", "gemini"]
}

TUI-related options (tui / theme / keybinds) go in ~/.config/mimocode/tui.json, not in this file.


Field reference

model /small_model

Set the default models. Format is provider_id/model_id. When small_model is unset, it falls back to the primary model or a cheaper model within the provider. See Models & Providers.

provider

Each provider can be configured individually through options:

FieldTypeDefaultDescription
apiKeystringAPI key
baseURLstringCustom endpoint URL
enterpriseUrlstringEnterprise endpoint (e.g. GitHub Enterprise Copilot)
timeoutnumber | false300000Request timeout (ms), false to disable
chunkTimeoutnumber | falseInter-chunk timeout for streaming (ms), false off
setCacheKeybooleanfalseAlways set a cache key for this provider

options also passes through additional fields to the underlying SDK. For provider-specific fields (e.g. Bedrock's region / profile / endpoint), see Provider-specific options.

server

Server settings for mimo serve / mimo web:

FieldTypeDefaultDescription
portnumberListen port
hostnamestringListen hostname; 0.0.0.0 when mdns is on and unset
mdnsbooleanEnable mDNS service discovery
mdnsDomainstringopencode.localCustom mDNS domain
corsarray<string>Allowed CORS origins

See Server.

permission

Controls whether tool actions run directly, prompt for approval, or are blocked. Can be set globally or per tool:

mimocode.json
{ "permission": { "*": "ask", "bash": "allow", "edit": "deny" } }

For the full rules, see Permissions.

compaction

Automatic context compaction policy:

FieldTypeDefaultDescription
autobooleantrueCompact automatically when context is full
prunebooleantrueRemove old tool outputs to save tokens
tail_turnsnumber2Number of recent turns to keep on compaction
preserve_recent_tokensnumberRecent tokens to force-keep on compaction
reservednumberToken buffer to avoid overflow during compaction

watcher

mimocode.json
{ "watcher": { "ignore": ["node_modules/**", "dist/**"] } }

agent /default_agent

agent defines dedicated agents:

mimocode.jsonc
{
  "agent": {
    "code-reviewer": {
      "description": "Reviews code for best practices",
      "model": "mimo/mimo-v2.5-pro",
      "prompt": "You are a code reviewer.",
      "tools": { "write": false, "edit": false }
    }
  },
  "default_agent": "build"
}

default_agent must be a primary agent. An invalid value falls back to "build" with a warning, applied across all interfaces (TUI / mimo run / desktop / GitHub Action). Agents can also be defined with Markdown files; see Agents.

command

Command templates for repetitive tasks. See Custom Commands:

mimocode.jsonc
{
  "command": {
    "test": {
      "template": "Run the full test suite with coverage report.",
      "description": "Run tests with coverage",
      "agent": "build"
    }
  }
}

share

ValueBehavior
"manual"Share manually via /share (default)
"auto"Auto-share new sessions
"disabled"Fully disabled

autoupdate

ValueBehavior
trueAuto-download new versions on startup
falseDisable auto-update
"notify"Don't auto-update, only notify when a new version is available

Auto-update is enabled when unset. This option has no effect when installed via a package manager (e.g. Homebrew).

formatter

mimocode.json
{
  "formatter": {
    "prettier": { "disabled": true },
    "custom-prettier": {
      "command": ["npx", "prettier", "--write", "$FILE"],
      "environment": { "NODE_ENV": "development" },
      "extensions": [".js", ".ts", ".jsx", ".tsx"]
    }
  }
}

See Formatters.

plugin

Accepts npm package names or local paths:

mimocode.json
{ "plugin": ["mimocode-helicone-session", "./plugins/local.ts"] }

See Plugins.

skills

mimocode.json
{ "skills": { "paths": ["./skills/"], "urls": ["https://example.com/bundle.json"] } }

See Skills.

tool

Controls tool invocation style:

FieldTypeDescription
invocation_stylestringGlobal invocation style (e.g. "json" / "xml")
invocation_style_by_toolobjectOverride per tool name

tool is a different field from the deprecated tools. tools has been merged into permission.

instructions

Inject additional instruction files; accepts paths and globs:

mimocode.json
{ "instructions": ["CONTRIBUTING.md", ".cursor/rules/*.md"] }

See Rules.

disabled_providers /enabled_providers

mimocode.json
{
  "disabled_providers": ["openai", "gemini"],
  "enabled_providers": ["anthropic", "openai"]
}
  • A disabled provider won't load even if its environment variable is set or a key is configured via /connect, and its models won't appear in the selection list.
  • When enabled_providers is set, only providers in the list are enabled; all others are ignored.
  • disabled_providers takes precedence over enabled_providers.

Other fields

  • mcp — MCP servers, see MCP
  • lsp — LSP integration, see LSP
  • enterprise{ "url": "https://enterprise.example.com" }
  • checkpoint — checkpoint thresholds and quotas (thresholds / reserved / push_caps); refer to the schema
  • experimental — experimental features that may change or be removed without notice

Variable substitution

Config values can reference environment variables and file contents:

mimocode.json
{
  "model": "{env:MIMOCODE_MODEL}",
  "provider": {
    "anthropic": {
      "options": {
        "apiKey": "{env:ANTHROPIC_API_KEY}",
        "baseURL": "{file:~/.secrets/anthropic-endpoint}"
      }
    }
  }
}
  • {env:VAR} — replaced with an empty string when unset
  • {file:path} — relative to the config file directory, or an absolute path starting with / or ~
NOTE

Placeholders inside //single-line comments in JSONC are not substituted.


Schema

Config files follow code.xiaomimimo.com/config.json. Add "$schema" at the top of the file to enable editor completion and validation:

mimocode.json
{ "$schema": "https://mimo.xiaomi.com//config.json" }