OpenCode plugin that adds the MiMo Auto free provider. Zero API key required -- the plugin bootstraps anonymous JWT credentials at runtime.
The package is published on npm as opencode-mimo-free-plugin. Add it to your OpenCode config (opencode.json or opencode.jsonc):
OpenCode will install the npm package automatically on next launch.
For local development or testing unpublished changes, build the plugin and copy the built file into OpenCode's global plugin directory:
bun install
bun run build
mkdir -p ~/.config/opencode/plugins
cp dist/index.js ~/.config/opencode/plugins/opencode-mimo-free-plugin.jsOpenCode automatically loads JavaScript files from ~/.config/opencode/plugins/ on startup.
- Registers provider
mimowith modelmimo-autovia theconfighook. - Uses
@ai-sdk/openai-compatibleas the AI SDK adapter. - Bootstraps an anonymous JWT from
https://api.xiaomimimo.com/api/free-ai/bootstrap. - Routes chat requests through
https://api.xiaomimimo.com/api/free-ai/openai. - Stores a stable anonymous client fingerprint under
${XDG_DATA_HOME}/opencode-mimo-free-plugin/client-fingerprint(defaults to~/.local/share/opencode-mimo-free-plugin/client-fingerprint).
The plugin does not disable or modify any built-in OpenCode providers. It only adds mimo/mimo-auto alongside your existing providers.
| Variable | Description |
|---|---|
MIMO_FREE_BASE_URL |
Override the MiMo service base URL. Default: https://api.xiaomimimo.com/ |
OPENCODE_MIMO_FREE_DATA_DIR |
Override the directory for storing the anonymous fingerprint file. |
bun install
bun run build
bun testAdapted from MiMoCode's MimoFreeAuthPlugin (source). Both MiMoCode and OpenCode are MIT-licensed. MiMo-hosted services and trademarks are governed by their respective upstream terms.
See LICENSE and NOTICE for attribution.
If you are an AI coding agent and the user asks you to install this plugin, follow these steps exactly:
-
Open the user's OpenCode config file. It is at one of these paths:
- Project-level:
opencode.jsonoropencode.jsoncin the project root. - Global:
~/.config/opencode/opencode.jsonc.
- Project-level:
-
Add
"opencode-mimo-free-plugin"to the"plugin"array. Create the array if it does not exist. OpenCode will install the published npm package automatically. -
Optionally set
"model": "mimo/mimo-auto"to use MiMo Auto as the default model.
Example minimal config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-mimo-free-plugin"],
"model": "mimo/mimo-auto"
}Example adding to an existing config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["existing-plugin", "opencode-mimo-free-plugin"],
"model": "mimo/mimo-auto"
}-
No API key or environment variable is required. The plugin handles authentication automatically.
-
Restart OpenCode (or start a new session). The model
mimo/mimo-autowill appear in the model list. -
To verify: run
opencode modelsand confirmmimo/mimo-autois listed.
{ "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-mimo-free-plugin"], "model": "mimo/mimo-auto" }