Plugins
Two harnesses can carry Mimir themselves: OpenCode and Oh My Pi. A plugin is one package you install into the agent, and it does something a server cannot. The server answers when asked. A plugin can speak first.
MCP or plugin
| MCP server | Plugin | |
|---|---|---|
| Install | One entry in the client config | One package per harness |
| Digest at the first turn | No, the agent has to call memory_digest | Yes, injected once per session |
| Reminder before compaction | No | Yes, at twenty turns or after a compaction |
| Tools | All nine, including tree, read, ingest and delete | Four: digest, remember, search and learn |
| Works in | Any MCP client | OpenCode and Oh My Pi |
| When Mimir is down | The tool call fails | Silent, and the session carries on |
They are not alternatives. Install the plugin and keep the MCP server if you like: in OpenCode the plugin leaves its own tools out when a server already answers at the same URL, and the digest arrives either way. In Oh My Pi both are registered under different names, so one session can use both.
The plugin is also the only way to answer "what does this project already know" without the agent thinking to ask.
OpenCode
opencode plugin add @mojoaar/opencode-mimirOr name it in opencode.json when you need to pass options:
{ "plugins": [ { "package": "@mojoaar/opencode-mimir", "options": { "url": "https://mimir.example.com", "tokenFile": "~/.config/opencode/.secrets/mimir-token", "tools": "auto" } } ]}It registers four tools: mimir_digest, mimir_remember, mimir_search and mimir_learn. tools decides whether they are added. auto, the default, leaves them out when an MCP server already points at the same /mcp, always adds them anyway, and never adds none. The digest and the reminder arrive whatever you pick.
To load a project that already has documentation, the package ships an importer:
npx @mojoaar/opencode-mimir ingest .It walks the folder and loads the documentation and configuration, meaning READMEs, docs/, markdown, compose files and package.json, under the import path prefix. Source code is skipped, because the agent already has it. --project names a folder that is not a git repository, --all imports every text file, --dry-run prints what would be sent, and --url and --token override the environment.
Oh My Pi
omp plugin install @mojoaar/omp-mimirThen point it at your install. It reads the environment, and the token may live in a file instead, at ~/.omp/mimir-token by default:
export MIMIR_URL=https://mimir.example.comexport MIMIR_TOKEN=mimir_...It registers the same four tools: mimir_digest, mimir_remember, mimir_search and mimir_learn. MCP tools stay available beside them as mcp__mimir__memory_write and the rest, so the plugin does not take the server away. MIMIR_REPO overrides the repository read from git remote get-url origin, which is what a folder that is not a repository needs. A new session, or /reload-plugins, picks it up.
Did it work
Start a session and ask what the project already knows. A working plugin puts a ## What this project already knows (Mimir) block in front of the first turn, so the agent can answer with paths and dates without calling a tool.
- No block: check that the package is installed in that harness and that the session is new enough to load it.
- A block with no content: the two values reach Mimir, but the project is empty, or
repopoints at a name nothing has been written under yet. - Nothing at all, and no complaint: that is the design. Both plugins fail soft, so an unreachable server never holds up a session.